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
21 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....
0
votes
3answers
36 views

Magento 2.2.8 | setup:static-content:deploy gives errors | Cannot read contents from file jquery.fileupload-ui.css No such file or directory

I can't deploy static content on my production site. Running command: php bin/magento setup:static-content:deploy en_GB Gives me following error: [Magento\Framework\Exception\FileSystemException] ...
2
votes
2answers
18 views

Page Styling (css) does not appear in the new Theme implementation (descendant of Luma Theme)

I just created empty theme which is descendant of Luma theme. but unfortunately the styling is not appear: theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
1
vote
1answer
92 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
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
1answer
84 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/...
0
votes
2answers
42 views

Get current product name in static web template html file on product view page

I want to get the current product name in static html file which is called in product view page like below file app/design/frontend/Vendorname/themename/Aheadworks_AdvancedReviews/web/template/...
0
votes
0answers
106 views

Magento 2.3.0 : Getting error in static content deploy command

I am using Porto and updated Magento from 2.2.5 to 2.3.0 while deploying static content I am facing error that styles-1.css missing in the theme folder.
0
votes
0answers
246 views

Magento 2.3 Static Content Deployment problem & missing css file

Running Magento 2.3 i noticed a problem with the static content being deployed, well, I believe it to be that anyway. I was messing around with Varnish for a few days and had a nightmare getting it ...
2
votes
1answer
30 views

Does indexer:reindex need “var”, “generated” and “pub/static” to be writable?

I would like to know if, when doing "php bin/magento indexer:reindex" the folders "var", "generated" and "pub/static" have to be writable ? Alternatively, does reindexing only work at database level? ...
1
vote
2answers
543 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
2answers
36 views

Overriding Magento 2 static adminhtml backend isn't working

I've got file : "vendor/magento/module-ui/view/base/web/templates/grid/listing.html" after deploy this file create: "pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/templates/grid/listing....
0
votes
0answers
48 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 ...
2
votes
1answer
204 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" ...
0
votes
1answer
53 views

Magento 2 - Minified static files not used

I enabled the setting to minify and merge JS & CSS. When I run static-content:deploy it does generate files with a .min.(css|js) appendage and the file contents are minified. However, when I load ...
0
votes
1answer
96 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
42 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
270 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
581 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
15 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
283 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
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, ...
0
votes
2answers
122 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 ...
1
vote
3answers
78 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
576 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
240 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
61 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
163 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
3answers
566 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
199 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
39 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
548 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.
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 ...
3
votes
3answers
4k 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\...
1
vote
1answer
528 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 ?
3
votes
0answers
778 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 ...
1
vote
1answer
520 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 ...
2
votes
3answers
460 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
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 ...
4
votes
4answers
217 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
446 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
81 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
384 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/...
4
votes
2answers
2k 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
418 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
135 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
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 ...
0
votes
1answer
2k 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 ...
1
vote
1answer
698 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 ...