-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{{MEDIA_URL}} in source code #2816
Comments
@ci2014 ... on which page? |
@srenon on every page
|
I having same issue. I have two Magento 2 installations, one installed with sample data for testing, and other one without it. I think it have something to do with STORE > Configuration > [GENERAL] Design > HTML Head > Miscellaneous Scripts. Any help is appreciated, thank you. |
Try running the Magento Minification tool in the admin panel. Then check your front end. Then if it works then turn off the minification tool as this will and should insert the correct URL inside the variable and all pages will have the new URL. Sounds loopy I know! |
Khaleel - Thank you for your suggestion. I not sure how helpful this is, but in "Magento 2 (with) sample data" /pub/media/styles.css contains styling for the sample data.
|
Sorry it did not help. Strange one this. I have also updated to the latest M2 build and I am using (EE) and I am having issues with other plugins and customization. Sorry could not help |
I saw this as well. I found it was due to the use of sample data without the sample data modules installed. It is a poor implementation in the sample data to swap out the MEDIA_URL, and only works if the correct module is installed. As a quick fix, I added the ThemeSampleData module to my composer.json. (i.e. under require... "magento/module-theme-sample-data": "*") |
as you have pointed out, in STORE > Configuration > [GENERAL] Design > HTML Head > Miscellaneous Scripts, there is
I've looked in the pub/media directory, and styles.css was there. Although this is not an actual solution, I've bypassed the problem by editing the configuration to include correct css: Just FYI, this problem occured to me on a Magento instance which was installed via composer. On my other instance installed via zip package, this error did not occur. |
This issue still exists. Steps to reproduce:
Access the home page shows the sample data products without media. Trying to fix this by running
made no difference. So to summarize, to get a fully working installation currently the following order of steps is required:
Or, to fix the issue on an existing installation, I assume the following works:
Suggestion: maybe a notice that |
in my case i just need to enable module-theme-sample-data module, open file app/etc/config.php you add this line |
same problem after upgrading from 2.0.7 to 2.1 (EE), following @YugiHoang suggestion fixed it maybe a real FIX is needed |
Hi! @Vinai Did you execute only this commands to reproducing?
How did you get sample products without installation of sample data packages? I reproduced it after I had set manually Magento_ThemeSampleData to 0. |
@BaDos Thanks for picking up the issue. I don't remember which version was current when I commented on the issue. |
For those troubleshooting this issue on Magento 2.1 and ahead, it appears that this field was relocated to |
Quickfix :
|
I ran into a similar issue, but different root cause. My page source was correctly rendering the To fix this, I needed to run I confirmed that the |
@ci2014 thank you for your report.
|
Solution is quite simple: Comment the HTML line within the backoffice (
|
@ci2014 we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue. |
Preconditions
Steps to reproduce
Expected result
Actual result |
@gerrybarron using xampp? If you using xampp then you may be facing this issue?it may happen for symbolic link |
nope im not using xampp I installed it on our staging server. OS is ubuntu server 16.04 |
have you done reindex. Maybe in design flat table's designs is not assigned? |
yup did that too. but nothing changes |
I have the same issue after |
I just replaced |
@Vinai Solution worked! Thank you. Initially, I ran into this issue after performing a Flush Cache from magento backened. Be aware, you need to setup your composer keys for this to work. Follow this link to learn more: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html You'll have to find composer.json in your project root, Instructions on where to place these keys can be found here: (https://community.magento.com/t5/Magento-2-x-Version-Upgrades/Invalid-credentials-for-https-repo-magento-com-packages-json/td-p/22287/page/3) |
I just replaced |
[honey] MAGETWO-8709: [GITHUB] Child product image should be shown in Wishist if options are selected for configurable product #8168
I wouldn't suggest this fix especially if you're installing with no sample data.
|
Try removing from global scope. It should work then. |
@likemusic same here, bin/magento setup:upgrade solved the problem |
I have the same problem with sample data I tried all possible solutions mentioned here but did not work, and finally I replaced the media URL path in the backend and it is working fine for me. I just replaced with In CONTENT > Design > Configuration > Edit > HTML Head |
Hello everyone,
after a fresh installation of Magento 2, i see this one in my source code:
How may I fix this?
Thank you very much.
The text was updated successfully, but these errors were encountered: