Since update to 2.19 I get 500 Internal Server Error messages for many pages - unless the option "Inline CSS on specific pages" (admin/config/development/performance/advagg/mod) is activated:

If "*" is set, I get no error messages. If "" is set, only the start page is accessible. If nothing is set there, no page can be reached.

To avoid misunderstandings, the contents of the .htaccess files in the folders "advagg_css" and "advagg_js" follow.

I use PHP 7, Apache 2.4.

Greetings
Frank

advagg_css:

<FilesMatch "^css__[A-Za-z0-9-_]{43}__[A-Za-z0-9-_]{43}__[A-Za-z0-9-_]{43}.css(\.gz)?">
  # No mod_headers
  <IfModule !mod_headers.c>
    # No mod_expires
    <IfModule !mod_expires.c>
      # Use ETags.
      FileETag MTime Size
    </IfModule>
  </IfModule>

  # Use Expires Directive.
  <IfModule mod_expires.c>
    # Do not use ETags.
    FileETag None
    # Enable expirations.
    ExpiresActive On
    # Cache all aggregated css files for 52 weeks after access (A).
    ExpiresDefault A31449600
  </IfModule>

  <IfModule mod_headers.c>
    # Do not use etags for cache validation.
    Header unset ETag
    # Serve correct content type.
    Header set Content-Type text/css
    <IfModule !mod_expires.c>
      # Set a far future Cache-Control header to 52 weeks.
      Header set Cache-Control "max-age=31449600, no-transform, public"
    </IfModule>
    <IfModule mod_expires.c>
      Header append Cache-Control "no-transform, public"
    </IfModule>
  </IfModule>
  ForceType text/css
</FilesMatch>

advagg_js:

<FilesMatch "^js__[A-Za-z0-9-_]{43}__[A-Za-z0-9-_]{43}__[A-Za-z0-9-_]{43}.js(\.gz)?">
  # No mod_headers
  <IfModule !mod_headers.c>
    # No mod_expires
    <IfModule !mod_expires.c>
      # Use ETags.
      FileETag MTime Size
    </IfModule>
  </IfModule>

  # Use Expires Directive.
  <IfModule mod_expires.c>
    # Do not use ETags.
    FileETag None
    # Enable expirations.
    ExpiresActive On
    # Cache all aggregated js files for 52 weeks after access (A).
    ExpiresDefault A31449600
  </IfModule>

  <IfModule mod_headers.c>
    # Do not use etags for cache validation.
    Header unset ETag
    # Serve correct content type.
    Header set Content-Type application/javascript
    <IfModule !mod_expires.c>
      # Set a far future Cache-Control header to 52 weeks.
      Header set Cache-Control "max-age=31449600, no-transform, public"
    </IfModule>
    <IfModule mod_expires.c>
      Header append Cache-Control "no-transform, public"
    </IfModule>
  </IfModule>
  ForceType application/javascript
</FilesMatch>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Frank.dev created an issue. See original summary.

mikeytown2’s picture

Frank.dev’s picture

Unfortunately I have no root rights and no access to the apache error logs - managed server by 1and1.

mikeytown2’s picture

What hosting service are you using on 1and1? Cloud or Smart?

Have you used this core patch?
#2654406: Log backtrace of PHP errors and exceptions
It might shed some light on the 500.

mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)

I don't have enough info to proceed here :/

skein’s picture

Component: General CSS/JS » Code
Status: Postponed (maintainer needs more info) » Needs review
FileSize
729 bytes

I bumped into this issue as well. It was due to one of my themes removing with hook_js_alter all the css. This causes advagg not to attach the '#attached' key in advagg_get_css, but because it still calls drupal_process_attached without it it will cause the module to throw unsupported operands error.

I have attached a patch that solves this issue.

  • mikeytown2 committed 9323294 on 7.x-2.x authored by skein
    Issue #2825820 by skein: 500 Internal Server Error after update to 2.19
    
mikeytown2’s picture

Status: Needs review » Fixed

Thanks for the patch! It has been committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.