Drupal7 doesn't generate Image style when filename contains "&" => error 404

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by heyyo on June 20, 2016 at 5:17pm

I'm using NGINX Perusio configuration. It works great.
I just have an issue with some images with the character "&" inside filename.
Drupal returns an error 404 when browsing image styles version of those images.

When accessing the image directly without image styles it's working as expected.

I thought using LUA NGINX module will resolve my issue, but it doesn't seem the case.

set_by_lua $escaped_uri 'return ngx.escape_uri(ngx.var.uri)';
location / {
....
location ~ ^/sites/.*/files/styles/ {
try_files $escaped_uri @drupal;
}
...
try_files $escaped_uri @drupal;
}

Do you have clue how to solve this issue ?

Comments

I fixed my issue by

Posted by heyyo on June 21, 2016 at 1:27pm

I fixed my issue by replacing:

In fastcgi_drupal.conf:
fastcgi_param QUERY_STRING q=$uri&$args;
by
fastcgi_param QUERY_STRING q=$escaped_uri&$args;

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /