Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Denotes questions related to Static Content in Magento2.

0
votes
1answer
18 views

Magento 2 static file paths incorrect after migration

After manually moving Magento 2.2.4 site to a Windows IIS server, the pages are blank. Only a few lines of HTML is loaded, and I can see in the body tag there is an incorrect static file path: ...
2
votes
1answer
24 views

Versioned Static Content not Being Compressed

On my live server my versioned content (the url containing the versioned number) is not returning the static files compressed. However when I check the literal path to the content, by removing the “...
0
votes
0answers
14 views

M2.2 - Does pipeline deployment only benefit JS/CSS updates?

I'm looking at taking advantage of pipeline deployment for our site to keep downtime for updates to a minimum. However, someone mentioned to me that the pipeline deployment is really only beneficial ...
1
vote
0answers
30 views

magento 2 custom email template image/logo not displayed

I am custom template for Magento 2 Created two new email template in admin backend order confirmation email template Shipment notification email template Both are sharing same header and footer ...
2
votes
1answer
82 views

failed to open stream: No such file or directory for static-content deploy

I have recently added a new root source css file for magento storefront by putting it in default_head_blocks.xml throught below statement. <css src="css/custom.css"/> Now I ran upgrade command ...
0
votes
0answers
12 views

Display content between set products on magento 2 category page

I was wondering if there would be a solution to display blocks, with content i can enter in the backend, between or after a set amount of products. I know i can display some static content at the top ...
0
votes
0answers
56 views

Magento 2 Static content deploy error

I try to deploy the static content php bin/magento setup:static-content:deploy -f da_DK en_US But the following error occured. frontend/Magento/blank/da_DK 2291/2291 ============...
1
vote
0answers
28 views

Magento 2 : Error on running magento command

I'm new on Magento 2. (2.2.5, nginx, linux, MySQL 5.7.22, PHP 7.1.21) I was setting the configuration of store and when I refreshed the store page I get diamond question marks, also in admin console, ...
0
votes
2answers
27 views

Uncaught Type Error in magento 2 and 404 error

I've been attempting to set up Magento 2 on a WAMP server and have ran into a few errors. My Magento UI doesn't look right and I have 2 errors in the error log (When you F12 the page). "Uncaught ...
0
votes
2answers
30 views

Pub Folder Not Updating

I've had this issue with my Magento 2.2.3 installation where nothing gets updated in the pub folder. So every time I re-deploy, product images don't get re-populated, and no CSS changes will go ...
3
votes
2answers
106 views

Magento 2 : Custom Layout for Static Page Empty Into Frontend

I've create a custom layout for static page into Magento 2. app/design/frontend/VENDOR/THEME/Magento_Cms/layouts.xml <page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
0
votes
1answer
39 views

Unable to import custom less file in custom theme's modules in Magento2

I have created a custom theme in Magento 2 and I want to add _customvariables.less and _custommixins.less in all other less files. I have added these files in the following location. magento2/app/...
1
vote
1answer
36 views

Magento2.1 - Deployment version issue

In production mode , I tried to deployed the application. Deployment was completed successfully but the changes in js file seems to be old. Static Signing is enabled in admin I checked the pub/static/...
1
vote
2answers
40 views

Magento 2.1 - Deploy static view files without deleting pub/static

How can I deploy static view files over the CLI in Magento 2.1 WITHOUT deleting my complete pub/static/* dir. Our Shop runs in an auto scaling enviroment. Everytime when we want to deploy new style ...
2
votes
2answers
111 views

Magento CSS Not Loading Error

I have tried every suggestion that is out there but im still getting this error In my config data they are figured as: i have tried the solutions none of them are working im still getting the same ...
0
votes
2answers
54 views

Magento2 deploy static files overwrite instead of manually delete

When I run bin/magento setup:static-content:deploy it does not overwrite existing files but leaves them intact. This leads to the unpleasant situation that I have to clear static file before I ...
0
votes
0answers
31 views

Magento2 multiple webservers static directory [duplicate]

I'm trying to run Magento2 on multiple webserves behind a load balancer. So far I have sessions stored in database app/etc/env.php shared across webservers running the site in production mode The ...
1
vote
1answer
291 views

Show terms and conditions on static page

Is there a way to show the terms and conditions on a page via .phtml? I have made a page via a module and now want to show the terms and conditions on that page.
1
vote
0answers
28 views

Adminthtml failing to compile

We have an ongoing issue with our styles.less file that prevents the css being generated for the Magento 2.1.8 back end. Whe i run the command bin/magento setup:static-content:deploy It throws ...
2
votes
1answer
1k views

Custom theme - styles-m.css failed to open stream: No such file or directory

When setting up a new custom theme that has Magento/blank as a parent, we were able to deploy static assets locally but deploying to our staging site failed with an error. [Magento\Framework\...
0
votes
0answers
6 views

Magento Static Content Library for Warranty or Installation Type Information

I am setting a up a Magento catalog with products that contain installation instructions and warranty information specific to each manufacturer. This information is distributed as either PDF or HTML ...
1
vote
1answer
218 views

Magento 2: Static content signing

What is the use and benefit of static content signing in Magento 2 ? Is it recommended to disable it from backend ?
1
vote
0answers
433 views

Magento 2 - Unable to resolve the source file for image

I have created an image and have uploaded this to my theme/web/images folder. I have then ran the following: php bin/magento setup:static-content:deploy However I cannot get the image to show on ...
0
votes
1answer
289 views

Flush static files cache on production mode

There is something about Magento2 that troubles me so much. When I have a website on production mode and I need to make a simple image change how I can do it? I thought changing the image via FTP ...
1
vote
1answer
598 views

Magento Static and Media url's redirect

So what i want to do is have domain.com as a main domain. static.domain.com (that uses the files of domain.com) as my static view url and media.domain.com (that also uses the files of domain.com) for ...
2
votes
3answers
264 views

Check if Magento 2 is using pub directory

How can we check if the website is using pub directory or not, independent of its mode? Is there any Magento function present to check the root document?
0
votes
0answers
40 views

Why is static file signing forcibly disabled in the production mode?

First of all, editing "Stores -> Configuration -> Advanced -> Developer" options are disabled/removed in the production mode. Enabling static file signing (e.g. "static/version1515490414/...
2
votes
1answer
60 views

CSS not loading for Magento 2

After updating Magento 2 from version 2.1.7 to 2.1.8 there is no css loading for the backend (front end works fine). How can I get the css to load for the admin? After deploying static content I got ...
4
votes
4answers
148 views

Css not working after Magento 2 installation on AWS

I've installed Magento 2 on AWS, however, the admin page is appearing like this: What should I do? Thanks!
1
vote
1answer
153 views

error magento 2: FilesystemIterator::__construct(/var/www/html/pub/static/_requirejs/frontend/Magento): failed to open dir: Permission denied [closed]

I'm getting error when , going to clear cache from backend admin. 'flush static cache '( Preprocessed view files and static files) button only. Because of this error i'm not able to clear static ...
0
votes
1answer
56 views

cdn deploy static files magento - still deploying to “normal” directories

I'm trying to get my static files to be deployed in static.domain.com I have pointed my base url and secure base urls like below After I did - the website is trying to pull data from that location ...
1
vote
1answer
193 views

Magento 2 | deploy static content error

I got this error when running setup:static-content:deploy on Magento 2.1.8: Compilation from source: /microcloud/domains/vampm2/domains/mydomains.co.uk/http/vendor/magento/theme-frontend-blank/web/...
3
votes
2answers
1k views

Magento 2: Static files are present but shows 404

I installed Magento 2 in my local environment and executed each command: php bin/magento cache:clean php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento ...
2
votes
1answer
98 views

static-content:deploy not working

I'm overriding a core JS file in my module. When I run php bin/magento static-content:deploy and refresh the page the JavaScript does not seem to change. I started tracking the issue. I found ...
1
vote
0answers
71 views

2.2 Faster way to regenerate css in developer mode

In developer mode, static files are mostly symlinked so making changes is immediately visible in frontend. However, when making changes to CSS this is not the case. The minimal files I have to ...
0
votes
1answer
58 views

How to edit file in app/design/frontend without having to redeploy static content in Magento2?

Using Magento2, version 2.19 We are editing below file: app/design/frontend/xx/xxxxx/Magento_Newsletter/templates/subscribe_popup.phtml How can I show the changes to this file in the frontend of ...
0
votes
0answers
987 views

Unable to retrieve deployment version of static files from the file system

I asked my hosting site to update PHP so that I could configure Payzone to Magento 2. It seems that it may have upset something as when I try to go on the website, magento admin or File zilla I get an ...
0
votes
1answer
359 views

Dont remove pub/static content in setup:upgrade command

It is possible to keep pub/static folder as it is after run setup:upgrade command. Becuase I have multilanguage site and every time when we add new module I run upgrade command and run content deploy ...
1
vote
0answers
165 views

Adding Bootstrap RTL LESS to Magento 2 theme

I need to include bootstrap-rtl LESS files to my theme when using fa_IR locale. So I did: Add those downloaded LESS files to: app/design/frontend/<Vendor>/<Theme_Name>/web/i18n/fa_IR/...
0
votes
1answer
837 views

Magento 2.2 Build system

I trying to setup build system for setup:di:compile and setup:static-content:deploy based on official devdocs. Build system The build system compiles code and generates static view files for ...
0
votes
0answers
97 views

How to change the icon of toggle navigation link in magento2

Please check the screen shot I want to make close button on toggle navigation link.
0
votes
1answer
39 views

Deploying Static Content on M2 doesn't work

I am trying to deploy static content on my production site but I am receiving the error in the screenshot. Why is this occurring?
0
votes
3answers
1k views

Magento 2 checkout not loading on production environment

Magento 2 local development installation is working fine, however the production installation has some issues regarding the checkout. Certain files are not loaded, resulting in an endless spinning ...
1
vote
1answer
63 views

Magento 2: Change only one static file

Sometimes I only need to change one static file, is it possible to do that? Example I have changes to: /static/versionxxxxxxxx/frontend/Superlove/custom/da_DK/Magento_PageCache/js/page-cache.js Can ...
7
votes
2answers
6k views

Strange Error when running setup:upgrade after module installation

I have tried to install wyomind google shopping and have the following error when running bin/magento setup:upgrade. [UnexpectedValueException] Unable to retrieve deployment version of static files ...
2
votes
1answer
2k views

Magento Developer mode not working - still trying to load pub/static

Enabling developer mode in magento is giving some errors for me, it is still trying to load all my static content. Ive disabled the "sign static content" option. Also, when I put my Magento ...
0
votes
1answer
49 views

Pub/static js path wrong in magento2 after install ebizmarts mage monkey plugin

Recently i have tried to install Ebizmarts_MageMonkey plugin in magento2. After install frontend not working properly. Got an error like some js missing. 404 not found error http://test.com/pub/...
2
votes
2answers
2k views

how to speed up static content deploy for development

Especially after changing .html knockout js template files I have to always deploy static content with bin/magento setup:static-content:deploy <languages>. This makes development very slow. I ...
0
votes
2answers
798 views

Magento2 developer mode doesnt generate static files on demand

I am running Magento 2 locally in developer mode After installing i would not expect to have to run setup:static-content:deploy if in developer mode. However, the only directory under static is ...
0
votes
3answers
1k views

Is there a way to export static blocks and cms pages in mass from local to online?

I have a localhost version of Magento and another which is already in Hostgator. My changes on files I can ftp quick and easily, of course. But I would like to know if there is some faster way to "...