CSS/JS on the page returns 404 error on first load

Created on 7 June 2023, over 1 year ago
Updated 14 July 2023, over 1 year ago

This is similar to issue ( https://www.drupal.org/project/advagg/issues/2920125 β†’ ) but only happens with first CSS file and randomly on one of the JS files.

- Only happens when HTTPRL has callbacks enabled
- First of the freshly aggregated CSS file returns 404 for around 10 seconds on first load, occasionally same issue with 1-2 JS files.
- A 2nd refresh after 10 seconds returns 200 status.

I have tried adding $conf['advagg_http_200_code'] = 203; to settings file which fixes this issue but messes with some 302 redirects set up on the site.

Other information:
PHP 7.3
Using with CDN Module (cloud front)

πŸ’¬ Support request
Status

Closed: works as designed

Version

2.35

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia standingtall

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @standingtall
  • πŸ‡¦πŸ‡ΊAustralia standingtall

    It turned out to be an issue with perusio config for Nginx.

    Adding this fixed the issue.

    Apparently it was giving 404 to some files, forcing Advagg to then regenerate those files.

       ###
        ### advagg_css and advagg_js support
        ###
        ###
        location ~* files/advagg_(?:css|js)/ {
          gzip_static on;
          access_log  off;
          expires     max;
          add_header  ETag "";
          add_header  Cache-Control "max-age=31449600, no-transform, public";
          try_files   $uri $uri/ @drupal;
        }
    
  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΈπŸ‡°Slovakia poker10

    Thanks for info!

Production build 0.71.5 2024