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 updating core to version 7.20, uploaded images with AIS aren't visible. Images uploaded before core update show up fine.
Apparently this bug is common with some other image-related modules:
#1923936: Responsive images and styles module doesn't work with Drupal 7.20
#1923336: Insert module doesn't work with Drupal 7.20
Comment | File | Size | Author |
---|---|---|---|
#12 | ais-tokens-1925896-12.patch | 2.38 KB | David_Rothstein |
#11 | ais.1925896.patch | 5.47 KB | srjosh |
#9 | ais.1925896.patch | 8.05 KB | srjosh |
#8 | ais.1925896.patch | 5.53 KB | srjosh |
Comments
Comment #1
spotzero CreditAttribution: spotzero commentedUntil we figuring out a fix, please add this setting into your "settings.php" file:
Comment #2
markusa CreditAttribution: markusa commentedDoes this hold for 7.21?
Comment #3
spotzero CreditAttribution: spotzero commentedYup. Still broken, but the $conf['image_allow_insecure_derivatives'] = TRUE; work around will still work.
Comment #4
kingfisher64 CreditAttribution: kingfisher64 commentedremoved comment as solution found and found out it is not relevant to this thread.
Comment #5
Snowflake6 CreditAttribution: Snowflake6 commentedDrat. I've had this problem since update to 7.21 and the 'image_allow_insecure_derivatives' fix doesn't work.
Comment #6
kristin.e CreditAttribution: kristin.e commentedsubscribing
Comment #7
spotzero CreditAttribution: spotzero commentedSnowflake6: 'image_allow_insecure_derivatives' should work. If it isn't, you may have another problem :S
Comment #8
srjoshThis patch will create a menu callback, reroute via .htaccess to that menu callback, then copy/modify the image_style_deliver() function to deliver the goods. Primary difference between image_style_deliver and this function is that it checks the token for "adaptive" image style, instead of the image style passed into the function.
This allows it to work with the check against the $_GET parameter, which by design is generated from the "adaptive" image style and not the actual image style we're using based on the cookie.
Rolled against latest dev checkout.
Comment #9
srjoshUpdated patch that will actually work (better menu path and style loading handler)
Comment #10
spotzero CreditAttribution: spotzero commentedThanks for the patch srjosh, that's a clever solution.
Can you re-roll your patch against the latest dev? I had to clean out some stuff that would prevent it from working.
Thanks.
Comment #11
srjoshAttached.
Comment #12
David_Rothstein CreditAttribution: David_Rothstein commentedThere is no such permission, so this patch doesn't work for anyone except user 1 :)
Otherwise, it looks like a great approach, but a couple things to note:
I think using hook_menu_alter() may be better here. Attached is a patch that does that; it seems to work for me.
Comment #13
srjoshThat's really smart. I'll test it on my application and get some notes back here.
Comment #14
spotzero CreditAttribution: spotzero commentedI like this patch. I'll test it out and if all goes well, I'll rolled it in.
Thanks a lot!
Comment #15
spotzero CreditAttribution: spotzero commentedThe patch looks good. I've committed it to the dev branch.
Comment #16
Liliplanet CreditAttribution: Liliplanet commentedHi!
I've just upgraded to 7.x-1.5, ran update.php and everything has been working fine up till now ..
Apache Detected
.htaccess file found
Drupal Clean URL Rewrite found
Found RewriteBase rule
RewriteBase correctly configured: /
AIS rules found
AIS rules found before Clean URLs rules
When I upload a new article with an image, the image does not show and there is nothing in the dblog reports.
I upgraded to the 7.x-1.x-dev version of 2 April, still no happiness
then patched as per #12, still nothing
added $conf['image_allow_insecure_derivatives'] = TRUE; to settings.php, no joy
Tried to revert to 7.x-1.4 and going back to that version, website went complete down.
Looking most forward to your urgent reply, and thank you
UPDATE: I've had to revert to a database backup from yesterday, will wait before I upgrade .. thank you for your wonderful module :)
Comment #17
spotzero CreditAttribution: spotzero commented7.x-1.x and 7.x-1.5 are currently exactly the same, and they include the patch from #12.
Try using 1.5, and make sure to run either "drush updatedb" or go to "/update.php" on your site.
Comment #18
spotzero CreditAttribution: spotzero commentedLiliplanet, it's possible you ran into this issue: http://drupal.org/node/1961102.
Try AIS 1.6, if you still have problems, please open a new issue.
Thanks.
Comment #19.0
(not verified) CreditAttribution: commentedLinks added to similar issues from other modules