Magento 2: Issues when deploying static content on EFS

When running the static content deploy with jobs option, we get this error:

In Queue.php line 366:    Error while waiting for package deployed: 42; Status: 0     setup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>...] 

Static content deploy command: magento setup:static-content:deploy --jobs 5

Is there any possible way by which I can run the header(‘location:FILE’) function in php after deploying the app on gcloud?

I am trying to deploy my php application on google cloud, however, it seems that when the url hits the index.php, the page remains blank. As soon as the session starts the code runs the connect.php and generates the usermanagement table successfully, however fails to run the header(‘location:login.php’) function.

<?php session_start() require_once('connect.php'); if (isset($  _SESSION) && !empty($  _SESSION)){     return view("home.php");  } else {     //echo "\nhi";     return view('login.php');  } ?> 
<?php /*$  connection = mysqli_connect("localhost","root","","test"); if (mysqli_connect_errno()) {   echo "Failed to connect".mysqli_connect_error(); }*/    $  host = null;   $  user = "root";   $  password = "root";   $  database = "temp";   $  port = null;   $  socket = "****";   $  conn = new mysqli($  host,$  user,$  password,$  database,$  port,$  socket);   if(mysqli_connect_error())   {     echo mysqli_connect_error();     //exit();   }    $  sql = "CREATE TABLE usermanagement (     id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,     username VARCHAR(255) NOT NULL UNIQUE KEY,     ne VARCHAR(255) NOT NULL,     email VARCHAR(255) NOT NULL UNIQUE KEY,     password VARCHAR(255) NOT NULL,     city VARCHAR(255) NOT NULL,     num BIGINT(10) UNSIGNED NOT NULL     )";     if (mysqli_query($  conn, $  sql)) {         echo "Table created successfully";     } else {         echo "Error creating database: " . mysqli_error($  conn);     }     // mysqli_close($  conn);  ?> 
<?php  session_start(); require_once('connect.php'); if (isset($  _SESSION) && !empty($  _SESSION)){   $  smsg =  "Already Exists" .$  _SESSION['username']; }  if (isset($  _POST['username']) && !empty($  _POST)) {   $  username = $  _POST['username'];   $  password = $  _POST['password'];   $  sql = "SELECT * FROM `usermanagement` WHERE username = '$  username'";   $  res = mysqli_query($  connection,$  sql);   $  count = mysqli_num_rows($  res);   $  passp=md5($  password);   if ($  passp==mysqli_fetch_array($  res)['password']){   $  _SESSION['username'] = $  username;   header('location:home.php');   }   else {     $  fmsg =  "Please register first";   } } ?>    <html>   <head>     <title>User Login</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" > <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" > <link rel="stylesheet" href="styles.css" > <script src="https://code.jquery.com/jquery-3.3.1.js" ></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>   </head>   <body>   <nav class="navbar navbar-default">   <div class="container">     <div class="navbar-header">       <a class="navbar-brand" href="home.php">Files App</a>     </div>   </div>   </nav>     <div class="container">       <?php if(isset($  smsg)) { ?><div class="alert alert-success" role="alert"><?php echo $  smsg?></div><?php } ?>       <?php if(isset($  fmsg)) { ?><div class="alert alert-danger" role="alert"><?php echo $  fmsg?></div><?php } ?>       <form class="form-signin" method="POST">         <h2 class="form-signin-heading">Login</h2>         <div class="input-group">              <span class="input-group-addon" id="basic-addon1">@</span>             <input type="text" name="username" id="username" class="form-control" placeholder="Username" required>             <span id="usernameLoading" class="input-group-addon"></span>         </div>         <label for="inputPassword" class="sr-only">Password</label>         <input type="password" name="password" id="inputPassword" class="form-control" placeholder="Password" required>         <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button>         <a class="btn btn-lg btn-primary btn-block" href="register.php">Register</a>       </form> </div>   </body> </html> 

Custom Css issue on deploying theme on magento 2.3.1

I m working on custom extension and I stumble across this

The contents from the “/var/www/html/pub/static/frontend/Magento/blank/en_U
S/ImaginationMedia_SocialOrder/css/orders/list.css” file can’t be read. War
ning!file_get_contents(/var/www/html/pub/static/frontend/Magento/blank/en_U S/ImaginationMedia_SocialOrder/css/orders/list.css): failed to open stream: No such file or directory

More information

> Deploy using quick strategy frontend/Magento/blank/en_US            > 0/2335              >-------------------frontend/Magento/blank/en_US   > 890/2335            ==========>---------frontend/Magento/blank/en_US   > 1517/2335           ==================>--------- 64% %   2 secs > #0 /var/www/html/vendor/magento/framework/App/View/Asset/Publisher.php(74): > Magento\Framework\View\Asset\File->getSourceFile() > #1 /var/www/html/vendor/magento/framework/App/View/Asset/Publisher.php(62): > Magento\Framework\App\View\Asset\Publisher->publishAsset(Object(Magento\Framework\View\Asset\File)) > #2 /var/www/html/vendor/magento/module-deploy/Service/DeployStaticFile.php(89): > Magento\Framework\App\View\Asset\Publisher->publish(Object(Magento\Framework\View\Asset\File)) > #3 /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php(184): > Magento\Deploy\Service\DeployStaticFile->deployFile('css/orders/list...', > Array) > #4 /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php(131): > Magento\Deploy\Service\DeployPackage->processFile(Object(Magento\Deploy\Package\PackageFile), > Object(Magento\Deploy\Package\Package)) > #5 /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php(102): > Magento\Deploy\Service\DeployPackage->deployEmulated(Object(Magento\Deploy\Package\Package), > Array, false) > #6 [internal function]: Magento\Deploy\Service\DeployPackage->Magento\Deploy\Service\{closure}() > #7 /var/www/html/vendor/magento/framework/App/State.php(187): call_user_func_array(Object(Closure), Array) > #8 /var/www/html/vendor/magento/module-deploy/Service/DeployPackage.php(103): > Magento\Framework\App\State->emulateAreaCode('frontend', > Object(Closure)) > #9 /var/www/html/vendor/magento/module-deploy/Process/Queue.php(310): Magento\Deploy\Service\DeployPackage->deploy(Object(Magento\Deploy\Package\Package), > Array) > #10 /var/www/html/vendor/magento/module-deploy/Process/Queue.php(229): Magento\Deploy\Process\Queue->execute(Object(Magento\Deploy\Package\Package)) > #11 /var/www/html/vendor/magento/module-deploy/Process/Queue.php(208): Magento\Deploy\Process\Queue->executePackage(Object(Magento\Deploy\Package\Package), > 'frontend/Magent...', Array, false) > #12 /var/www/html/vendor/magento/module-deploy/Process/Queue.php(162): Magento\Deploy\Process\Queue->assertAndExecute('frontend/Magent...', > Array, Array) > #13 /var/www/html/vendor/magento/module-deploy/Strategy/QuickDeploy.php(76): > Magento\Deploy\Process\Queue->process() > #14 /var/www/html/vendor/magento/module-deploy/Service/DeployStaticContent.php(112): > Magento\Deploy\Strategy\QuickDeploy->deploy(Array) > #15 /var/www/html/setup/src/Magento/Setup/Console/Command/DeployStaticContentCommand.php(140): > Magento\Deploy\Service\DeployStaticContent->deploy(Array) > #16 /var/www/html/vendor/symfony/console/Command/Command.php(255): Magento\Setup\Console\Command\DeployStaticContentCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), > Object(Symfony\Component\Console\Output\ConsoleOutput)) > #17 /var/www/html/vendor/symfony/console/Application.php(893): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), > Object(Symfony\Component\Console\Output\ConsoleOutput)) > #18 /var/www/html/vendor/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Setup\Console\Command\DeployStaticContentCommand), > Object(Symfony\Component\Console\Input\ArgvInput), > Object(Symfony\Component\Console\Output\ConsoleOutput)) > #19 /var/www/html/vendor/magento/framework/Console/Cli.php(102): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), > Object(Symfony\Component\Console\Output\ConsoleOutput)) > #20 /var/www/html/vendor/symfony/console/Application.php(145): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), > Object(Symfony\Component\Console\Output\ConsoleOutput)) > #21 /var/www/html/bin/magento(23): Symfony\Component\Console\Application->run() 

I tried to create the directory needed for both luma & blank a new “list.css” and chmod for permission, then deploy again .It works but ended up with a magento2 with no CSS(Just work no picture no css) at all,am I missing anything here?

Help for deploying Magento2 on AWS

Help for deploying Magento2 on AWS

Implanted the following project

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/

By accessing

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/magento/

The home page should be displayed but the installation page is loaded even though the files

app/etc/config.php app/etc/env.php 

According to the documentation at https://devdocs.magento.com/guides/v2.3/config-guide/config/config-php.html

Another thing I noticed is that when executing the command ./bin/magento as images in the local environment the “cache” option is displayed but in AWS or any server this command possibility is not displayed

https://imgur.com/IoZznX7 https://imgur.com/hcxYlpW

If necessary, you can confirm the presence of the files by accessing the

http://648050603631-test-webapp011.us-east-2.elasticbeanstalk.com/backdoor/commando/

and running

cat /var/app/current/magento/app/etc/config.php cat /var/app/current/magento/app/etc/env.php 

Best approach to deploying new features across multiple environments

We currently have four environments in AWS, development, test, beta and production. Previously, we released from develop to beta at the end of each sprint (2 weeks). We would create feature branches off of develop.

We would then deploy to beta and production every month by merging across environments. Such as merging beta into production, test into beta. This process was both slow to deliver value, and high-risk as lots of changes by different teams would build-up.

So I’ve attempted to alter the process so we branch off of master, and create pull requests into each environment instead. With the intention of releasing smaller deliverables, more often.

However we’re now in a position where we’re dealing with misaligned branches, changes getting out of sync. Being unable to pull any change other than master into our feature branches, otherwise we ‘pollute’ our feature branches with other teams changes.

My initial intention was for us to deploy things to beta/production as soon as they’re ready, but the business is insisting on two week cycles still. Which means changes are building up again.

So it’s led me to despair, surely it’s possible to just deploy small sets of changes across several environments? I just wondered if anyone has a solution to this, or any advice at all?

when deploying HP workstations with MAAS I get screen “RCO/USBR boot failed”

Here is the screen: https://imgur.com/a/t2ngUTW If I start up the machine or deploy it with MAAS I have to press esc to continue boot and get deployed. But when its not connected to a screen or keyboard it won’t work because it gets stuck on this screen. I have turned off boot from USB in BIOS and don’t know what else to try…

Deploying Multiple Versions in One App Package

This is a question about Android, and iOS apps. The technology is Xamarin (C#) but this is not really important. The app will be deployed to the stores. The client app must be compatible with the back end up. As we know, a user can reject an upgrade at any time, so the client must try to work with the current version of the back end if possible. However, in my situation, the client could also be upgraded before the back end (long story and completely out of my control). So, the client version could be behind, or in front of the back end.

The only solution I can think of is to compile multiple versions of these things in every release:

  • Database structure
  • Business logic (rules)
  • UI

This would mean that the client / back end would find the best fit version and work together as best they can. If no compatible versions are found, then the client would just throw up an error and ask the user to upgrade the app in the hope that this would fix the problem.

My question is: what is best practice for this scenario? What are some techniques that can be used to mitigate the bifurcation in the code? What successful strategies have worked in the past? Is this doomed for failure?

What are best practices for deploying different configurations per environment in Kubernetes/OpenShift?

Kubernetes provides a very elegant mechanism for managing configuration for pods using ConfigMaps. What’s not clear from the documentation is what the recommended practice is for using ConfigMaps to manage different configurations for different environments, and also to deploy configuration changes when they occur.

Assume I’m using a ConfigMap for my pod to set various environment variables or to inject cofiguration files into my container. Evidently some (or all) of those variables or files need to be different depending on which environment the pod is deployed to.

In an ideal world I can make configuration changes and deploy those to the pod without re-building or re-deploying the container image. The implication is that those configuration settings, and the ConfigMap, should probably be stored in a separate source code repository (otherwise a build of the image would be triggered every time configuration changes).

What are some recommended practices for:

  1. maintaining different configuration settings per environment (e.g. separate branch per environment)

  2. automatically deploying configuration changes when they change under source control, but only to the respective environment

When I am deploying Ap-ppart getting error

SP.SOD.executeFunc("SP.js", "ClientContext", initilise_function); 

function initilise_function() {

//_url = _spPageContextInfo.webAbsoluteUrl;  _url = _spPageContextInfo.webServerRelativeUrl; 

}

function CreateListItem_Rest() { var listName = “RESTList2”; var newItemTitle = “New Title Item”; CreateListItemWithDetails(listName, newItemTitle, function () { console.log(“New Item has been created successfully.”); }, function () { console.log(“Ooops, an error occured. Please try again.”); }); }

function CreateListItemWithDetails(listName, newItemTitle, success, failure) {

var dt = new Date(); var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();   var itemType = GetItemTypeForListName(listName); var item = {     "__metadata": { "type": itemType },     "Title": newItemTitle + String(time),     "Test1": String(time),     "Test2": "Rest data insert 2" };  $  .ajax({     url: _url + "/_api/web/lists/getbytitle('" + listName + "')/items",     type: "POST",     contentType: "application/json;odata=verbose",     data: JSON.stringify(item),     headers: {         "accept": "application/json;odata=verbose",         "content-type": "application/json;odata=verbose",         "X-RequestDigest": $  ("#__REQUESTDIGEST").val(),         "IF-MATCH": "*"     },     success: function (data) {         //success(data);         //console.log(data);         alert(data.d);     },     error: function (data) {         //console.log(data);         alert(data.d);     } }); 

}

// Get List Item Type metadata function GetItemTypeForListName(name) { return “SP.Data.” + name.charAt(0).toUpperCase() + name.split(” “).join(“”).slice(1) + “ListItem”; }

Now I have published it to SharePoint online . Added the App part in page.

Please help.

//Error //SCRIPT5007: Unable to get property ‘executeFunc’ of undefined or null reference

//The same JS working perfectly in Default.aspx page . //When I am doing it as web part getting this error .

//SEC7120: [CORS] The origin ‘https://xxxxx.sharepoint.com’ failed to allow a cross-origin document resource at ‘ms-appx-web:///assets/errorpages/forbidframingedge.htm#https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=89bee1f7-5e6e-4d8a-9f3d-ecd601259da7&redirect_uri=https%3A%2F%2Fwebshell.suite.office.com%2Fiframe%2FTokenFactoryIframe&state=8d63f13b-4539-4fe4-98f7-60b9f0ed8912&client-request-id=0f9915f5-24ed-4404-a0c4-55ccefabbee4&x-client-SKU=Js&x-client-Ver=1.0.15&nonce=6c61e5c7-9520-4ad5-8c04-4ce9966ea0d0’.

SEC7120: [CORS] The origin ‘https://xxxxxxx.sharepoint.com’ failed to allow a cross-origin document resource at ‘ms-appx-web://microsoft.microsoftedge/assets/errorpages/forbidframingedge.htm#https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=89bee1f7-5e6e-4d8a-9f3d-ecd601259da7&redirect_uri=https%3A%2F%2Fwebshell.suite.office.com%2Fiframe%2FTokenFactoryIframe&state=8d63f13b-4539-4fe4-98f7-60b9f0ed8912&client-request-id=0f9915f5-24ed-4404-a0c4-55ccefabbee4&x-client-SKU=Js&x-client-Ver=1.0.15&nonce=6c61e5c7-9520-4ad5-8c04-4ce9966ea0d0’

List created in Visual Studio 2017 not deploying into Sharepoint 2013 properly

I’ve been trying to create both list and library add-ins in VS 2017 for Sharepoint 2013 and when I deploy to my sharepoint dev site, the link to the list or library doesn’t work. I have followed a number of tutorials and they all put the link as such:

<a href="...lists/List1">Library</a>   

(‘Library’ is the name of the library I created)

However, when I follow the same convention, the project won’t recognise the folder.

Anyone have any idea as to why the project won’t recognise this folder?