I have upgraded magento2 instance with latest git code today.
after upgrade and static files deployment.
static files url contains deployed version because of this 404 error comes.
[http://domain]/pub/static/version1474443317/frontend/Magento/luma/en_US/mage/calendar.css
static files exist if we remove version1474443317 from url and check but site all url contains this version1474443317.
Please check this bug.
@ankursachdeva11 looks like your web server configured incorrectly.
If you're using apache - make sure that your server configured correctly and reads .htaccess file. Also make sure that you have .htaccess file in pub/static/ directory. Because it contains needed rewrite: https://github.com/magento/magento2/blob/develop/pub/static/.htaccess#L16
If you're using nginx - make sure that it contains following lines:
https://github.com/magento/magento2/blob/develop/nginx.conf.sample#L123
@ankursachdeva11 thank you for your feedback.
Please, format this issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result.
Please also specify Magento versions which you updated from and to.
@veloraven, I have updated from git repository to "Magento ver. 2.2.0-dev".
and i am using "FPM/FastCGI" Server
@veloraven ,
Steps to reproduce
Expected result:
Static Link should be like this:
[http://domain]/pub/static/frontend/Magento/luma/en_US/mage/calendar.css
Actual result:
Now Static link is like this:
[http://domain]/pub/static/version1474443317/frontend/Magento/luma/en_US/mage/calendar.css
Thanks!
@ankursachdeva11 this is expected behavior. Why don't you want to have static version in URL?
Such URLs will be correctly handled by magento. If you have any issues - check your server configuration (see my prev reply).
This feature needed to prevent any issues for customers that already have cached files in browser from old static version.
@ankursachdeva11 This is not a bug, this option is set in config Stores>Configuration>Advanced>Developer>Sign Static Files (dev_static_sign).
Thanks @sevos1984
I was not able to find this setting because after fresh install UI not working because of version number present in static urls. So, i tried to set this path in database and it works.
@sevos1984 Thank you so much!
Thanks @sevos1984 for hinting the proper location to look at.
For us the solution was to point web root dir of server to "pub" dir in magento
Thanks, Guys,
Quick solution:
insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
Check below link for same issue:
http://magento.stackexchange.com/questions/150418/static-content-is-not-loading-after-upgrade-to-2-1-3
Thanks @ihor-sviziev . It works for me. I have accidentally deleted .htaccess file from static folder
I am using Fedora 25 , having
Apache/2.4.25 (Fedora)
PHP Version 7.0.18
MySql 5.7.18
I have just installed magneto 2.1.6 , after successfull setup run, its getting css and js files not found issue and they are loading from pub/static//version1494143163/frontend/Magento/luma/en_US/css/styles-m.css
version1494143163 is not even existed.
Beside this the admin url is also not accessible .
Can anyone can help me
Hi @nafisakanwal !
You can follow these instructions:
Stores>Configuration>Advanced>Developer>Sign Static Files(Yes->No)
Or Access the database and execute the command:
insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
Then remove the cache and reload the page.
Hi @kientran175
Thankyou so much for replying . i already executed this sql command but no success .
Is there have any other solution to resolve this ?
Hi @nafisakanwal !
Error in running sql command? Or sql command is executed but version1494143163 still exists?
Can you add me on Skype, let me support you!
Skype: trantrungkien175
Regards,
Kiên Trần.
Please flush cache after disabling version
On Mon, May 8, 2017 at 9:59 AM, Kiên Trần notifications@github.com wrote:
Hi @nafisakanwal https://github.com/nafisakanwal !
Error in running sql command? Or sql command is executed but
version1494143163 still exists?
You can add me on Skype, let me support you!
Skype: trantrungkien175
Regards,
Kiên Trần.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/6688#issuecomment-299788394,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AByXUUXsDAzYYHx-BkmRGlXqrXc9NbO5ks5r3r1jgaJpZM4KCf90
.
Oh thankyou guyz @ihor-sviziev @kientran175
css and js files not loading issue just resolved , but still i am unable to access admin
it says 404 Not found page
Hi @nafisakanwal !
Check the access path to admin, to make sure the path is correct: 'frontName' in \app\etc\env.php
@kientran175
i verified i am accessing the correct admin path, but it is saying 404 page Not found
@kientran175
any other solution to resolve this ?
Hi @nafisakanwal !
Please try Below solutions:
1) Delete var/cache folder
2) Go to database SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites' and make it 0
3) Then enter url in your browser magento_base_url/index.php/your_admin_url
Try and let me know if you face any issue.
@kientran175
tried all of above three steps, but no success
Hi @nafisakanwal !
Try this tutorial to see if it fixes the problem?
https://magento.stackexchange.com/questions/123915/404-error-magento2-admin-page-not-working
Hi @kientran175
It resolved my issue. Thankyou soo much 👍
The fix with adding
insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
to DB helps.
Thanks.
# now i know why can't linking style ,but i don't know why this?
because install path no version1499055289 folder ,and i add it style work
but i don't know why it can't add version1499055289 folder itself in During the installation process
Hi @mengbo123456, please stop flooding unrelated issues.
version1499055289 isn't a real folder, these requests are supposed to get rewritten by the webserver.
In case you're using nginx: There is a nginx.conf.sample
provided With Magento2. Please update your config accordingly.
Alternatively, you could try using the following SQL query as a workaround: insert core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
If you are looking for some help or an advice regarding setup or development please refer to the Community Forums or the Magento Stack Exchange.
The GitHub issue tracker is intended for tracking technical issues (read: "bugs") only.
The issues which cannot be consistently reproduced on a clean installation of Magento 2 CE running on a supported platform aren't likely to get resolved in here.
@komsitii,my webserver windows iis7.5 +php7+mysql5.6 how to setting rewritten ?
about version1499055289 question
iis7 +mysql5.6 +php7.1
install successfull but no index.php web
@mengbo123456
Magento2 is not guaranteed to run on IIS flawlessly, you'd have to figure it out on your own.
Please consider using one of the supported platforms instead.
I believe the Nginx rewrite isn't correct in the Magento 2.1.7 Nginx sample config file (and possibly versions before) for the static files. I've had to make an edit:
location /pub/ {
location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
deny all;
}
alias $MAGE_ROOT/pub/;
add_header X-Frame-Options "SAMEORIGIN";
location ~ ^/pub/static/version {
rewrite ^/pub/static/(version\d*/)?(.*)$ /pub/static/$2 last;
}
}
@franciskim: I've had to make the same edit on an install today of version 2.1.8.
It seems the sample file is setup as though static content were residing at /static/versionXYZ/...
but the frontend file are all written to client as /pub/static/versionXYZ/...
.
Hi! I encountered a problem with my Magento site...I'm not a developer of Magento. I just edited the "REQUEST PATH" on my /MARKETING/URL RE-WRITE, then i also changed the setup of "SIGN STATIC FILES" to "yes" value. I flush the cache storage, now my website is broken. Please see live site http://www.alohapearls.net/. Maybe you can help me figure out the problem?
Thanks
Hi, I had this issue and now resolved steps i took are :
Please try these steps i hope it will be resolved.
Thanks.
this cmd solved my prob :
php bin/magento setup:static-content:deploy -f
@Tarek-Adra When i tried your command "php bin/magento setup:static-content:deploy -f" then i got below error
[RuntimeException]
The "-f" option does not exist.
so can you please check
I'm wondering what's the root cause?
Having this issue on Magento 2.3 via nginx.
Set up following guide here
https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
a)Firstly keep the pub/static .htaceess file backup don't remove this file
b) Remove the cache pub/static and generated
php bin/magento rm -rf pub/static/frontend/ var/cache var/composer_home var/page_cache var/view_preprocessed generation
c) Then run compile command
php bin/magento setup:di:compile
d) run deploy command
php bin/magento setup:static-content:deploy -f
I hope pub/static/version1474443317 issue will be resolve
@charultyagi18 & @ThakurPradeep 's solution worked for me. Magento 2.3.1, nginx 1.17 (alpine)
@Tarek-Adra depending on your OS environment, you might not need the php
at the start of that command, try just running it as bin/magento setup:static-content:deploy -f
Most helpful comment
Thanks, Guys,
Quick solution: