When anonymous users click the claim link they are taken to the registration page. After registration, they should be redirected to the node claim page, but instead are sent to the homepage.
I found the problem to be with the following code from the nodeownership_node_view function contained in the nodeownership.module file.
// If the user is anonymous.
if (!$user->uid) {
$link = l($text, 'user/register', array('query' => array('redirect' => 'node/' . $node->nid . '/claim')));
}
I was able to fix the problem by replacing 'redirect' with 'destination' as follows:
// If the user is anonymous.
if (!$user->uid) {
$link = l($text, 'user/register', array('query' => array('destination' => 'node/' . $node->nid . '/claim')));
}
Comments
Comment #1
sja1 commentedAttaching patch.
Comment #2
sja1 commentedFixing malformed patch
Comment #3
ashishdalviComment #4
rasikap commentedComment #6
ashishdalvi