Redirect URL after deleting guestbook entry

Phoca Guestbook - creating guestbooks in Joomla! CMS
jbudd
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 24 Mar 2009, 14:04

Redirect URL after deleting guestbook entry

Post by jbudd »

The code in controllers/phocaguestbook.php to refresh the screen after deleting an item is

Code: Select all

// Redirect
$link	= 'index.php?option=com_phocaguestbook&view=phocaguestbook&id='.$id.'&Itemid='.$itemid.'&limitstart='.$limitstart;
$link	= JRoute::_($link);
$this->setRedirect( $link, $msg );
On my site (localhost with wampserver) it gets translated to

Code: Select all

index.php?option=com_phocaguestbook&view=phocaguestbook&id=1&Itemid=297&limitstart=0
(The & is replaced by &)

None of the guestbook parameters defined on the menu item are applied - presumably because the itemid is not correctly assigned.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48706
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Redirect URL after deleting guestbook entry

Post by Jan »

Hi, this should be OK, these & are added by standard Jommla! method JRoute, so everything should run ok :idea:
If you find Phoca extensions useful, please support the project
jbudd
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 24 Mar 2009, 14:04

Re: Redirect URL after deleting guestbook entry

Post by jbudd »

Jan wrote:Hi, this should be OK, these & are added by standard Jommla! method JRoute, so everything should run ok :idea:
For example: the parameters on the menu item specify font colours and that the form should be hidden. The page displayed after the redirection does not have these parameters applied.

The URL is otherwise correct, if I go through and delete all the amp;'s and refresh the page, it applys the parameters.
jbudd
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 24 Mar 2009, 14:04

Re: Redirect URL after deleting guestbook entry

Post by jbudd »

The problem goes away if I turn on SEO - (because with SEO URLs Joomla goes and retrieves an itemid from the menu)?
Post Reply