Closed (fixed)
Project:
Persistent URL
Version:
6.x-1.0-beta10
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2010 at 05:11 UTC
Updated:
18 Apr 2013 at 20:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
dave reidOK...why? I don't use PURL so someone would have to help figure out why.
Comment #2
socialnicheguru commentedit doesn't work with purl 10.
purl rewrites urls to a new path by adding a prefix.
for example when I create an organic group i can specify http://myurl.com/
so instead of writing http://myurl.com/node/400 I can access the og at http://myurl.com/mygroup
With url alter, the prefix is never added.
Is there anyway to make these two modules compatible again?
I used to need this to have purl and url_alter work together: http://drupal.org/node/592324
This would allow me to use
global redirect
fb
purl
together on one site by way of url_alter
Comment #3
socialnicheguru commentedadded info above
Comment #4
haffmans commentedI've tried debugging this a little, and hit the same problem. It seems that in url_alter's
custom_url_rewrite_inbound(), any other modules which may depend on it are not fully loaded yet. Thus the result ofmodule_implements('url_inbound_alter')(at least the first time) returns an array with only 'url_alter' in it. This result is statically cached in the module_implements function.Next, every call to
module_implements('url_inbound_alter')will return exactly the same value, omitting any plugins you may actually have, because they were not loaded the first time thecustom_url_rewrite_inbound()was called.What works for me, although it is not a very clean solution I guess, is adding these three lines of code to purl.module, at line 161 (after the
if (!function_exists('custom_url_rewrite_inbound'))block):With that bit of code, the static cache is cleared when purl is loaded. The next time
custom_url_rewrite_inbound()is called, the purl implementation of the hook is properly discovered.Comment #5
dave reidAs shown in the documentation, modules that implement hook_url_inbound_alter() also need to have hook_boot() or hook_exit() to ensure they're loaded by Drupal before the full bootstrap happens.
Comment #6
haffmans commentedAdding an empty hook_boot() to purl.module indeed seems to fix the problem as well (after clearing caches etc.).
Moving this one over to the Persistent URL module.
Comment #7
yhahn commentedConfirmed and committed: http://drupal.org/cvs?commit=358682
Thank you!
Comment #9
rbrandon commentedThis is no longer a requirement for url_inbound alter. However purl needs to hang on to the unmodified querystring from before the first drupal_path_initialize() was run.