cancel
Showing results for 
Search instead for 
Did you mean: 

Pub/Static 404

SOLVED
Highlighted

Pub/Static 404

it tries to locate files in pub/static/version1542993587

tried to move files into dir, same...

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>

but i still get 

Cannot create a symlink for
Warning!symlink() has been disabled for security reasons

deleted all exept .htaccess in pub/static dir, removed var cache view_preprocesed

runed static-content:deploy

cache:clean

 

INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/static/sign', '0');

 tried chmod nothing helps... any solutions?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Pub/Static 404

 

solved somehow restored old backup, please delete theard.

 

 


 

View solution in original post

5 REPLIES 5
Highlighted

Re: Pub/Static 404

Hi @drakasmag

 

Just wanted to ask you why - you would like to move that pub/static/version1542993587 move into the directory ? 

 

As it is there in the directory and that's the reason its showing on version directory,

 

Meaning whenever we run command called : php bin/magento setup:static-content:deploy -f

 

It will deploy all the assets/css/js files from our module into the pub/static directories.

 

So can you please give more insight on this issue exactly what you are trying to achieve ? so its helps us to troubleshoot the issue !

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution
Highlighted

Re: Pub/Static 404

hi @Manthan Dave

 

It's just one of trick that I tried. Then I deleted all and tried without version dir... all the same. I got 404 on pub/static js and css files. In console url: pub/static/version624884/... I seted symlinks to copy in di.xml but I still get symlinks warning in css i also tried php bin/magento setup:static-content:deplo

Highlighted

Re: Pub/Static 404

Hello @drakasmag,

 

Please run below command in magento root directory 

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml

To generate static content

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
rm -rf pub/static/frontend/* pub/static/adminhtml/* var/cache/ var/generation/ var/page_cache/ var/view_preprocessed/ var/composer_home generated/
php -dmemory_limit=6G bin/magento setup:static-content:deploy -f
chmod -Rf 777 pub/ var/
php bin/magento cache:clean

--
If my answer is useful, please Accept as Solution & give Kudos

Highlighted

Re: Pub/Static 404

 

solved somehow restored old backup, please delete theard.

 

 


 

View solution in original post

Highlighted

Re: Pub/Static 404

I had the same issue, the .htaccess file was missing, add that back to static and you'll be back in business.