Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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>
Comment | File | Size | Author |
---|---|---|---|
#6 | advagg-500error-2825820-6-7.x.patch | 729 bytes | skein |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedAny more details on the 500 error?
http://unix.stackexchange.com/questions/115972/how-do-i-find-where-apach...
http://unix.stackexchange.com/questions/38978/where-are-apache-file-acce...
Comment #3
Frank.dev CreditAttribution: Frank.dev commentedUnfortunately I have no root rights and no access to the apache error logs - managed server by 1and1.
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedWhat 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.
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedI don't have enough info to proceed here :/
Comment #6
skein CreditAttribution: skein commentedI 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.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for the patch! It has been committed.