Closed (duplicate)
Project:
Persistent URL
Version:
6.x-1.0-beta3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Jul 2009 at 14:45 UTC
Updated:
10 Jul 2012 at 03:12 UTC
I'm trying to create a 'popup' PURL, so that I can pop things up in a window, and theme them a little differently but not have to worry about keeping track of the fact that it is in a popup window.
So I'd like to be able to popup:
/popup/node/123/edit
and for it to show the node edit form.
I've got a module that should set up the PURL properly:
/**
* Implementation of hook_purl_provider().
*/
function MODULENAME_purl_provider() {
$items = array();
$items['MODULENAME'] = array(
'name' => t('Popups'),
'description' => t('Is the window a popup window.'),
// TODO: This callback should set the page template:
'callback' => 'MODULENAME_this_is_a_popup',
//'callback arguments' => array($type),
'example' => 'popup',
);
return $items;
}
/**
* Implementation of hook_purl_modifiers().
*/
function MODULENAME_purl_modifiers() {
$items = array();
$items['MODULENAME'] = array(
array('value' => 'popup', 'id' => 1),
);
return $items;
}
And it works when I go to any page that is not path aliased, as soon as the path has an alias (i.e. node/123 aliased to: content/my-node) I get a redirection loop. Am I missing something or is PURL fundamentally incompatible with path aliases?
Comments
Comment #1
jmiccolis commentedPurl *should* be compatible with path aliases.
Does your alias contain the prefix? What exactly is the path that triggers the redirection loop?
Comment #2
steven jones commentedHmmm...it works on one site, but not another.
The site it works on is not running a plain version of Drupal, our silly clients have hacked it to pieces, and probably broken it very badly.
I'll see if I can locate the problem and report back.
Comment #3
steven jones commentedThe issue is that PURL doesn't like the global redirect module.
Comment #4
steven jones commentedOkay turns out global redirect doesn't play nicely with other modules that do custom URL rewriting.
There's a patch that hopes to fix that, but it doesn't work with PURL: #346911: Redirect Loop and custom_url_rewrite ignored
Looks like global redirect inspects the
$_REQUEST['q']string to see if it should redirect to an 'alias'. But PURL has changed$_REQUEST['q'], so it never matches, and voila, redirection loop.Comment #5
AdrianB commentedSubscribing
Comment #6
yhahn commentedhttp://drupal.org/node/623886
Comment #7
socialnicheguru commentedThe patch mentioned in the other issue does not solve my similar problem of having global redirect enabled :(
I hope there is a fix. For now, I had to disable global redirect.
Comment #8
obrienmd commentedI can confirm this is still a problem w/ global redirect.
Comment #9
sebas5384 commentedme too, this is still happening :(
Comment #10
pfournier commentedSee #1351212: Incompatible with Global Redirect, patch #7.