Drupal 6.8
Domain Access 6.x-2.0-rc5
Secure Pages 6.x-1.7-beta2
Secure Pages module is used to redirect specific HTTP pages (user, admin, etc) to HTTPS.
Example:
http://www.domain.com/admin should redirect to https://www.domain.com/admin
When this module is enabled and a user tries to access one of the specific pages from an HTTP page, the browser displays a blank page and the httpd error_log shows:
PHP Fatal error: Call to undefined function drupal_get_path_alias() in /var/www/html/drupal-6.8/sites/all/modules/domain/domain.module on line 1296, referer: http://site1.domain.com/
If this user tries to access one of the specific pages from an HTTPS page, the page displays correctly and there is no error_log entry.
Any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | path_alias.patch | 975 bytes | agentrickard |
Comments
Comment #1
agentrickardNo immediate ideas. That's a pretty strange error to be getting then. It would seem to indicate an incomplete drupal bootstrap. The function that is throwing that error is only called from within domain_node_grants(), which means that Drupal has already received a page request and is trying to determine if you can access it.
drupal_get_path_alias() is loaded within path.inc, which should definitely be loaded at this point. Can you figure out why it has not? Perhaps the https site can't read the file? (I suspect a server-level issue somewhere.)
Comment #2
waverate commentedI rebuilt the site and I only enabled the Secure Pages module. The site works as expected. There are no problems changing from HTTP to HTTPS pages depending on the specified list.
I then enabled the Domain Access module and I created a primary domain and one subdomain. I end up with the same problem as before.
One thing I noticed but I do not recall if it occurred in the original build:
From a blank page that was displayed as a result of some error. A refresh actually gets the page to display correctly but the URL is HTTP and not HTTPS.
I am not certain were to look from here.
Comment #3
agentrickardI tracked this down. There is one case (which you have discovered) where SecurePages sends users from the insecure page to secure (or vice versa). In doing so, it calls
securepages_urlfrom within hook_boot(). This function, in turn, callscustom_url_rewrite_outbound, which calls thedomain_grant_allfunction that generates the error.Attached is a patch that should fix the issue. It would mean that any 'special page requests' that you register with Domain Access that are also subject to secure pages must be entered using the drupal internal path instead of a path alias.
That edge case probably won't be an issue for you. This is officially a bug, since I knew this might happen, but had never seen a case where it does.
Comment #4
waverate commentedPatch works great. Problem resolved.
Comment #5
agentrickardCommitted to 6.x.
Comment #6
agentrickardD5 is closed.