After upgrading to Colorbox 7.x-2.17, we encountered a 500 server error on a site running PHP 5.3. This was tracked down to the line
if (empty(variable_get('colorbox_dompurify_hide_warning', 0))) { on line 71 of colorbox.install , which was introduced as part of the fix for https://www.drupal.org/project/colorbox/issues/3262686.

PHP versions 5.3/5.4/5.5 are still technically supported for Drupal 7 despite being EOL and unsupported by PHP, and the nature of this error means it is not possible to access any pages of the website (even those that do not use Colorbox).

While it would be best for those affected to upgrade to a newer version of PHP, that is not always an option. In such cases the only solution is to downgrade Colorbox to 7.x-2.16 and go without the fixes, or to edit the install file to assign variable_get('colorbox_dompurify_hide_warning', 0) to a variable before using if (empty()) on the variable.

CommentFileSizeAuthor
#3 3279001-colorbox-install.patch748 byteskewesley

Comments

kewesley created an issue. See original summary.

paulmckibben’s picture

@kewesley, thanks for the report. It looks like you may have a good enough understanding of the issue to offer a patch. If you're willing to edit the colorbox.install file as you suggest, verify that it works for you, and attach the patch here (or create an issue fork/MR), I'll review and commit it. Thanks!

kewesley’s picture

StatusFileSize
new748 bytes

Thanks @paulmckibben.

Editing the install file as suggested in the initial report does work for us. The patch is attached.

fibie’s picture

Thank you @kewesley that worked for me.

jeffschuler’s picture

Status: Active » Reviewed & tested by the community

Good to go. Thank you.

  • kewesley authored 1e0b3cc4 on 7.x-2.x
    Issue #3279001 by kewesley, fibie, jeffschuler: Colorbox 7.x-2.17 causes...
paulmckibben’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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