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.
I am updating from 1.9 to 1.10 on top of my D6.28 and I immediately receive this error:
Fatal error: Call to undefined function drupal_strtolower() in /...my...path.../sites/all/modules/securepages/securepages.module on line 219
Line 219 is:
$path = drupal_strtolower(trim($path, '/'));
I haven't modified core and even verified that this function exists in my unicode.inc file. Why isn't the function loaded? I don't understand why this doesn't work.
Help is much appreciated! :-)
Mike
Comments
Comment #1
William Haller CreditAttribution: William Haller commentedAlso occurs on our site. Reverted to 1.9. The strange thing is drupal_strtolower appears in other modules, although it's possible they aren't in an executed portion. Does just changing it to strtolower do anything for you?
Comment #2
BigMike CreditAttribution: BigMike commentedGood to know I am not the only one. I thought about just using strtolower but looking at https://api.drupal.org/api/drupal/includes!unicode.inc/function/drupal_s... there are other parts going on depending on what is sent to the function.
Comparing 1.9 to 1.10, this one line was added, the rest is the same (although "*/autocomplete/*\n*/ajax/*" was removed from the $ignore variable).
Doing some testing now...
Comment #3
BigMike CreditAttribution: BigMike commentedOk, this module is calling that function before the Drupal bootstrap, so the function does not exist.
Solution - at least for now - is to manually invoke unicode.inc by placing a require somewhere above the $path variable, like this:
Verified this works for me and I completed the site upgrade process without any errors.
BigMike
Comment #4
sterndata CreditAttribution: sterndata commentedWill there be another update in the works with corrected code?
Comment #5
William Haller CreditAttribution: William Haller commentedPatch works here as well. Thanks.
Comment #6
gordon CreditAttribution: gordon commentedThis has been fixed in both 2.x and 1.x.
basically the issue is that securepages_match() is called from securepages_boot() which is before unicode.inc is loaded.
Comment #7
gordon CreditAttribution: gordon commentedI have added changed to both the dev branches, It would be great if you can test this so I can create new releases.
Comment #8
BigMike CreditAttribution: BigMike commentedConfirmed 6.x-1.10+2-dev (2013-Nov-08) works just fine!
BTW I have a question. What is the difference between 6-1.x and 6-2.x? It doesn't list any differences on the main project page. I am only using v1.x because when I first began using Secure Pages there was no 6.x-2.x. Should I upgrade? Benefits? Thanks gordon!
Mike
Comment #9
gordon CreditAttribution: gordon commentedThanks I will release new versions with the fix.
The main difference between 6.x-1.x and 6.x-2.x is that this is some stuff backported from 7.x-1.x
Comment #10
BigMike CreditAttribution: BigMike commentedThank you Sir