Incorrect destination on administration links

tomws - March 23, 2009 - 21:55
Project:Guestbook
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

As the title says, the Cancel link on the Delete entry confirmation page incorrectly points to http://guestbook/

#1

tomws - August 11, 2009 - 14:47
Title:Delete "Cancel" link points to http://guestbook/» Administration links on entries point to http://guestbook/
Status:active» needs review

This is also a problem for the other administrative links on the guestbook entries. It's a problem with the way the links are built manually in the code. Using the drupal_get_destination() function seems to fix this. Patch attached.

Also attached in a patch that can be applied a version that has my pre-publish moderation patch already applied.

AttachmentSize
guestbook-fix_admin_link_destinations.patch 1.13 KB
guestbook-fix_admin_link_destinations-for_prepublish_patched.patch 1.45 KB

#2

tomws - August 11, 2009 - 15:00
Title:Administration links on entries point to http://guestbook/» Incorrect destination on administration links

Bad title change last time. It's not the links, but the destinations that are flawed. For example, they come out as

http://example.com/guestbook/delete/1?destination=/guestbook
or
http://example.com/?q=guestbook/delete/1&destination=/?q=guestbook

When propagated to the confirmation handler, that translates to a final destination http://guestbook.

The patch still works, but my description was miserable. Apologies, and hope this helps.

 
 

Drupal is a registered trademark of Dries Buytaert.