I am getting this:
Fatal error: Call to undefined function drupal_urlencode() in /var/www/html/modules/securepages/securepages.module on line 321
When going to a non-secured URL that should be "switched" to a secured URL. It also happens when I go to a "secure" URL that does not need to be secured.
It's important to note that the particular node I am seeing this on is a webform, but I have seen this on other core forms, like the login page, and regular old "Pages".
Also interesting if I remove the page cache for the node, it works the first time around, but then breaks on a reload.
If I input the function (from drupal's api core) into that securepages.module file, I get an already declared function error.
This also only happens for anonymous users, so that leads me to believe that there is some caching issue causing a problem here.
So here's what I got:
Drupal 5.11
Secure Pages 5.x-1.x-dev
Other possibly conflicting modules or enabled functions
Clean URL's are On
Performance Caching is On
Webform 5.x-2.3
So my option is to make a duplicate function with a different name and call it within the module file? Not sure, but I will give it a try.
Comments
Comment #1
beekerstudios commentedInputing this at line 277....
and changing line 331 (previously line 321) to this:
Resolved the issue, but I think this is pretty much a kludged solution. Longterm this module doesn't know a thing about drupal_urlencode. Doesn't appear to be a caching issue, but is actually a secure pages issue.
Comment #2
beekerstudios commentedP.S. Going to the /?q=url/alias did direct to the proper url, prior to this fix, so it may very well be clean url's acting up here too.
Comment #3
alan d. commentedI just the same error on Drupal 6.6 using Beta 1
My temp hack was:
I'm guessing that this is due to the early calls via hook_boot, but I haven't looked into it.
Comment #4
alexmarkley commentedI was also getting this error on Drupal 6 using securepages 6.x-1.7-beta1.
PHP Fatal error: Call to undefined function drupal_urlencode() in /home/web/malexmedia/malexmedia/modules/contrib/securepages/securepages.module on line 491Comment #5
ebeyrent commentedI am getting:
Fatal error: Call to undefined function drupal_urlencode() in sites/all/modules/securepages/securepages.module on line 378
I am also seeing:
extract() First argument should be an array in sites/all/modules/securepages/securepages.module on line 128.
Comment #6
alan d. commentedRelated to the use of hook_boot, try the latest version or use the above hack. This is fixed in 6 version.
Comment #7
grendzy commentedThe 5.x branch is no longer supported. If this issue is still present in a current version of Secure Pages, please update the issue summary, change the version field, and re-open the issue.