Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [static-content]

Denotes questions related to Static Content in Magento2.

2
votes
1answer
216 views

Upgrade to 2.2.6 missing static JS files

When I upgraded my Magento 2.2.2 to 2.2.6. I got one critical error in pub/static missing one file named trim-input.js "pub/static/version1540806968/frontend/{...}/{...}/pl_PL/mage/trim-input.js" ...
2
votes
1answer
47 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 “...
2
votes
0answers
306 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
0answers
42 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
62 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 ...
2
votes
1answer
540 views

Images on custom module are not copied on pub/static

I did a custom module and added a custom css. All worked fine, but this css has some images linked directly like: background-image:url(./img/digit-sm.png);. And obviously has its folder img on the ...
2
votes
0answers
249 views

Magento2: Mixin is undefined on deploying static content

I have created several mixins in my custom theme within the file "_mixins.less", these work locally and are loaded properly from my other less files. However, when I want to deploy static content I ...
2
votes
1answer
569 views

Magento 2 static deploy en_US argument invalid on XAMPP

I've cloned a working magento 2 repo, done composer install and when I'm trying do do: setup:static-content:deploy I get the error: [InvalidArgumentException] en_US argument has invalid value, please ...
1
vote
3answers
10k views

Magento2: Wrong path of static contents

I know so many others have asked the same question but still no reliable ans is available. Suddenly my site is hitting the wrong path of static content (CSS/JS/IMAGES) because of this my site is not ...
1
vote
1answer
708 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
1answer
527 views

CSS not load Magento 2

I installed a module, and then I uninstalled it. Since then I do not have CSS. I did not find the frontend nor the CSS but after running this: php bin/magento setup:static-content:deploy php bin/...
1
vote
1answer
295 views

automatic generation of dir/files under pub/static not working

automatic generation of dir/files under pub/static not working. When i google about this find that i have to delete that file in which i did change and then run below given command. php bin/magento ...
1
vote
1answer
115 views

.lib-url-check is undefined Magento 2.3 static content deploy error

Magento 2.3 when deploying static content this error occurs: Compilation from source: /var/www/html/MyProject/vendor/magento/theme-frontend-blank/web/css/styles-m.less .lib-url-check is ...
1
vote
1answer
583 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
4answers
1k views

product images missing after installing extension

When I am installing some extension in Magento 2 using PHP bin/magento then after doing that then my site has a problem which is the all the images including product and everything appears to be ...
1
vote
2answers
460 views

setup:static-content:deploy needs to run very frequently [closed]

Why does my css keep breaking and none of the clicks works in Magento2 frequently, even without any changes done in any of xml files. Everytime I need to run php bin/magento setup:static-content:...
1
vote
3answers
2k views

Static content deploy - Compilation from source

Doing a setup:static-content:deploy never finishes deploying files on a custom theme. Instead gives Compilation from source: frontend/Vendor/theme/en_US/css/email-fonts.less and then stops compiling. ...
1
vote
2answers
95 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 ...
1
vote
1answer
258 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 ...
1
vote
3answers
2k views

Styles are not loading after removing pub/static and run setup:static-content:deploy in Magento 2

I have been facing strange issue, as the part moving modifications in static content. we removed pub/static and deployed setup:static-content:deploy. After doing this, files are generated properly in ...
1
vote
1answer
209 views

Home page not showing the main content area: Magento

I am using Athlete Theme on my website: Site was working fine but today when i have checked it is missing the main page content and footer section. When I directly put all my contents to 1column....
1
vote
1answer
99 views

Missing file from static Magento 2

I have recently upgraded from Magento 2.2.4 to Magento 2.3. This has caused some compatibility issues between some of our modules. One instance of this is that we are missing a file: /pub/static/...
1
vote
2answers
1k views

Magento 2 -All thumbnails not display

I installed Magento in XAMPP, and the installation is fully complete. However, when I go to Fontend and Backend, the loading is very long, also all the thumbnails crash. I tried install again, but the ...
1
vote
3answers
3k views

Magento 2 no css/js loaded after setup:static-content:deploy

Magento is searching for files into below location,(one for example) localhost/magento2/pub/static/frontend/Magento/luma/it_CH/mage/calendar.css but after I run setup:static-content:deploy in pub/...
1
vote
1answer
223 views

Magento 2 grunt:exec removes all static files

Magento 2 grunt exec:theme_name removes all static files, then adds only less files. Yesterday everything was working correctly, today suddenly it's not working. Any ideas how to fix it?
1
vote
1answer
110 views

Including newsletter block in a static block issue

I tried to include the newsletter block in a static block content, like: {{block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"}} But it is not working. Can ...
1
vote
1answer
136 views

Refer to static module asset in code

I've added some images to my module eg. view/base/web/images/some-image.png Having run bin/magento setup:static-content:deploy I now see these have been published to the pub directory pub/static/...
1
vote
1answer
1k views

When I use --clear-static-content and after deploy static content doesn't load any more

I'm using magento 2 and everytime I try to enable a module with --clear-static-content , after I upgrade , clean and deploy , but my static content doesn't load anymore. And when I do deploy , only ...
1
vote
1answer
38 views

Magento2 : Why static content isn't generated properly?

I have seen so many answers related to this question but nothing resolved my issue , this is the issue I have cleared cache , pub/static , generated , var/cache , var/view_preprocessed, setup:...
1
vote
2answers
615 views

Static Content 404 with Magento 2 and Nginx

Preface: I have read through as many posts as I can find about this issue, but I have tried all solutions suggested already. The Issue Using a quick docker setup to get a local instance of Magento 2 ...
1
vote
0answers
33 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, ...
1
vote
3answers
81 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 ...
1
vote
1answer
68 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
168 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 ...
1
vote
1answer
552 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
1answer
534 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
1k 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 ...
1
vote
1answer
468 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 ...
1
vote
1answer
388 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/...
1
vote
0answers
143 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 ...
1
vote
0answers
209 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/...
1
vote
0answers
666 views

Magento 2 - Custom admin theme not working in production mode

I create a custom admin theme to override few admin template files. In developer mode theme work perfect, but when I turn on production mode and make: bin/magento setup: static-content: deploy then: ...
1
vote
1answer
659 views

Cellspacing and cellpadding doesn't apply to tables in WYSIWYG editor in Magento 1.x

In one of my client's websites(Magento CE 1.9.2.4), the product description needs to have a table structured content with cellspacing and cellpadding applied. Now when he tries to apply that style to ...
1
vote
0answers
604 views

Magento 2 static files URL fail

after reading the official guide here Magento Guide I have setup my magento this way: I have created one website in english and one in spanish I have configured Apache this way <VirtualHost *:80&...
1
vote
0answers
252 views

A faster route to deploying static content in Magento 2? Dev to Live etc?

Massive bounty on this guys. Wanted to get some attention here. Maybe move it here instead.. https://stackoverflow.com/questions/38589283/a-faster-route-to-deploying-static-content-in-magento-2-dev-...
1
vote
1answer
389 views

Magento 2 - Conditional Static Block

Is there any way for you to conditionally display a static block? For example, I want a block on the homepage that will only display if there is content in the block. If it is empty, the block ...
1
vote
0answers
297 views

How can I create and update static blocks via a module install script?

I have a number of static blocks and pages I need to create in a few shops and without doing it manually I copied the install script for the sample data for Magento2 to use a .csv to install these ...
1
vote
1answer
956 views

Add static content to product view

I would like add some static text to product views on product-info-main and should be multi language compatible how would I do that? As I understand I can inject static-block content but somehow is ...
0
votes
2answers
2k views

Static files aren't deploying in developer mode

I am using Magento 2 (developer mode) and I just created a new theme, added a local-l.css to my /var/www/vendor/app/design/frontend/vendor/theme/web/css/source/local-l.css and when I refresh the ...
0
votes
2answers
2k 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 ...