Questions tagged [static-content]

Denotes questions related to Static Content in Magento2.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

How to serve static files via CDN in production mode for Magento 2.3.2

I have a fresh install of Magento 2.3.2 and I configured my CDN (Cloudfront) on /pub/static while I was in default mode. I have now switched to production mode and invalidated my CDN distributions. ...
0
votes
0answers
13 views

Use relative URL's for static content in Magento 2

Is it possible to use relative URL's in Magento 2? So change links like https://www.domain.com/my-product-title to /my-product-title. And also use relative URL's for javascript and css references?
0
votes
2answers
30 views

Magento 2 - Site not loading properly in Developer mode

I am working on M2 and I set M2 developer mode.My site home page works fine but the other pages not loading.Just showing errors/warnings on inner pages. Screenshot
0
votes
1answer
28 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
65 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 ...
0
votes
1answer
39 views

After upgrade static content is set with out pub/

<html lang="en"> <head > <script> var BASE_URL = 'http://mage.test/'; var require = { "baseUrl": "http://mage.test/static/version1561748846/frontend/Brent/...
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....
0
votes
3answers
273 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
20 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
147 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
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
1answer
145 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
67 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
184 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
419 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
31 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? ...
2
votes
2answers
817 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
40 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
71 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
238 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
88 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
129 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
62 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 “...
3
votes
0answers
381 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
802 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
19 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 ...
1
vote
0answers
386 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
34 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
140 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
92 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
725 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
283 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
82 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
179 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
742 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
248 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
53 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
638 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
44 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
5k 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\...
2
votes
1answer
625 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
930 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
579 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
514 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 ...
4
votes
4answers
239 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
549 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
98 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
421 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/...