I have upgraded to Magento 2.4.3. Upgrade was successful but the layout is not proper. Css and Js are not loading. I have tried every solution but none work. It show 404 not found for images and js function not found or no function defined and for css failed to load resources.
What I checked:
-> a2enmod rewrite is enable
-> apche conf is right
<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride All
Require all granted
-> pub/static contain .htaccess file
-> tried to load site through pub folder index.php but no change
-> Run all command setup,di-compile,deploy,cache-clean,flush,permission but
no change
-> I have checked all the requirement of Magento and all requirement are satisfied
-> change table value insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
-
Have you created the virtual host and pointed to the index.php in pub directory? Second issue might be of the static file for the particular lanugage check it and try running command for itAsssd– Asssd2021年10月25日 06:46:58 +00:00Commented Oct 25, 2021 at 6:46
-
yes ServerAdmin webmaster@localhost DocumentRoot /var/www/html/m3_up/pub. I have only one languagenazmul mondal– nazmul mondal2021年10月25日 06:48:49 +00:00Commented Oct 25, 2021 at 6:48
-
check the store/language for which there are 404 and deploy that particular store/languageAsssd– Asssd2021年10月25日 06:55:45 +00:00Commented Oct 25, 2021 at 6:55
1 Answer 1
Can you try this below steps...
I think you have a version issue for all the CSS and javascript files.
Step 1 : Remove version from all static file paths. add below query in core_config_data table
insert into core_config_data (config_id, scope, scope_id, path, value) values (null, 'default', 0, 'dev/static/sign', 0);
Spep 2 : Run static content deploy cmd again and check.
php bin/magento setup:static-content:deploy -f
-
Sorry I forgot to mention but I also tried thisnazmul mondal– nazmul mondal2021年10月25日 07:21:10 +00:00Commented Oct 25, 2021 at 7:21
-
Because in the screenshot it's showing the version, just do the ctrl+u in the frontend... Can you check after this you got the version in CSS and js files ? like : pub/static/version323334/Jitendra Patel– Jitendra Patel2021年10月25日 07:42:11 +00:00Commented Oct 25, 2021 at 7:42
Explore related questions
See similar questions with these tags.