Sage theme dist folder assets not showing properly

Hi there,

We are using Sage theme in our WP website.
We are seeing lots of 404 errors due to non existing files (css, js, images) in our site.

https://prnt.sc/XZhZ2gVGrgjn
https://prnt.sc/jy4j_ppTDCRh

After analyzing, i can see that we have some images, css, js in themes/theme-name/dist/ folder with some random digits in the file name [ https://prnt.sc/cqXYgrxFgUDk ]. But our front end files calling the original css & image name[ https://prnt.sc/wD0UYOij_Gqv ]. This causing 404 and the images are also not visible in site.

What to do with this? Do i need to rename the files under dist/ ?
For example, for the facebook icon do i need to rename as facebook@2x.png from facebook@2x_8c3e0862.png ???
Kindly give me the solution.

Thank you.

What environment is this happening on?

If not on local dev, how are you deploying Sage?

1 Like

Hi ben,
This is happening in all environments dev, stage & in production.
Earlier previous developing team installed sage in local & commit to the server.
For now, we don’t have local setup for this project. All task working in dev/stage servers directly.

Issue: We recently found lots of 404 errors due to non existing assets(images, css, js) (screenshot attached in main content).
Please let me know for further details.

Thank you.

If you’d like to hire someone from the Roots community to work on your project, or to do one-on-one troubleshooting or training, we have a “jobs” section for posting work requests.

Is there any documentation related to compiling assets file with versions???

Then what is the procedure to hire roots community member?

Typically the yarn build command will compile assets without version numbers, and the yarn build:production command will compile them with. This is why Ben asked what your deployment method is.

Hi MVDelaney,

Earlier previous developing team installed sage in local & commit to the server. So we are unsure about this commands was ran by them by previous team.

Can i run this command ‘yarn build’ command in our current dev server directly& deploy changes to test & production ? or need to run it in local setup (having server backup) and deploy to all three servers?

Note: We have same files & db structure in all environments. However do we need to run yarn build:production command in production server separately ???

Please let me know the answers.
Thank you.

I’m not okay with you using these resources to get free help on a project that you previously paid to get work done on

You can attempt to try things yourself, or use the existing resources on here as a reference, or you can hire someone from the community