2

enter image description here

Am shift from window to Ubuntu 18.04 I run clean, flush, upgrade and also deploy commands But page layout still destroy. When I face this issue in the window then just run deploy command, page structure would right. But in Ubuntu it still destroys Why ? which command I run to fix the layout.

  • check the console for the erros – Prathap Gunasekaran Mar 8 '19 at 7:45
  • Enable mode rewrite at apache if you using apache as webserver – Amit Bera Mar 8 '19 at 7:47
  • sudo a2enmod rewrite sudo systemctl restart apache2 Enable rewrite mod and restart apache But still page layout not correct – HaFiz Umer Mar 8 '19 at 7:56
  • to i check the console 8 to 10 files has status 404 not found. how fix it ? – HaFiz Umer Mar 8 '19 at 11:09
0

There are few things to debug this issue : 1 - Check if symlinks are configured properly it can be issue due to symlink. ( to check try to access :

http://localhost/domain.com/static/version1551965592/frontend/Company/theme/en_US/mage/calendar.css

see if it loads any css file or gives 404 error if it does then issue is symlink.

2 - Disable static version from admin so magento should not add static version url , follow below path :

Magento Admin -> Stores -> Configuration -> Advanced -> Developer.

Change Sign Static Files setting.

After making changes : remove pub/static/frontend folder and var/view_processed/pub folder and deploy static content again. ( IMPORTANT, don't delete .htaccess file in pub/static folder be careful )

Hope it will fix the issue.

  • Dear ! page layout destroy and also admin page not found 404 . then how perform this. - Disable static version from admin so magento should not add static version url , follow below path : Magento Admin -> Stores -> Configuration -> Advanced -> Developer. – HaFiz Umer Mar 8 '19 at 12:58
0

For Ubuntu edit the file /etc/apache2/apache2.conf

To edit this file use sudo nano /etc/apache2/apache2.conf command

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>

To

<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>

After this run command

sudo service apache2 restart

IF STILL Structure not right and ADMIN SHOW 404 NOT FOUND, FOLLOW THIS STEP

`

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

rm -rf var/cache/*

rm -rf var/generation/*

`

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.