Questions tagged [static-content]

Denotes questions related to Static Content in Magento2.

Filter by
Sorted by
Tagged with
2
votes
2answers
706 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 ?
2
votes
2answers
96 views

Is static content ever stored in the di / generated folders?

I'm doing some theme development, which I am somewhat new to. I am making changes to some files, and I like to test if they can compile correctly, so I run the setup:static-content:deploy somewhat ...
2
votes
1answer
142 views

How do I view/fix errors on static-content:deploy?

I am installing a theme and when I run bin/magento setup:static-content:deploy I get an error on some of the themes eg: === adminhtml -> Magento/backend -> en_US === ... Successful: 1997 files; ...
2
votes
1answer
22 views

Magento 2.2.6 overriding css or less files or locating the actual file to edit

Not sure why i'm finding this so difficult but I have a file that has some css that needs to be fixed. The file and code are in these files: pub/static/frontend/website/mywebsite/en_US/css/styles-l....
2
votes
2answers
1k 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 ...
2
votes
1answer
262 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
66 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
47 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
3answers
570 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?
2
votes
1answer
63 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
0answers
179 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 ...
2
votes
1answer
594 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
267 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
631 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
11k 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
786 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
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 php bin/magento setup:static-content:deploy if in developer mode. However, the only directory ...
1
vote
1answer
532 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
374 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
196 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
718 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
2k 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
538 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
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
223 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
50 views

Migrate Static Blocks and multi stores from One Magento to Another

What is the best way to migrate Magento Content i.e Blocks, Pages, and All content from one Magento instance to another. I have 2 Magento setups. One of which has all data and another is fresh Magento....
1
vote
3answers
74 views

I can't tell all clients to clear their browser cache!

recently we have changed few files js/CSS/phtml files on our site as we tested them we experienced strange thing in incognito mode the new CSS and js is working fine but if we switched to normal mode ...
1
vote
1answer
204 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
2k 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
246 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
139 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
160 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
41 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
0answers
87 views

Same content (language) for multiple countries (store views)

I'm trying to implement an e-commerce site (using Magento 2) that has the following requirements: be available in N countries (eg http://example.com/country_code/ ) with X languages share the same ...
1
vote
0answers
510 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
35 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
118 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
101 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
194 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
607 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
653 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
468 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
229 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
702 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
726 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
643 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&...