phocaguestbook + sh404sef = captcha problem

epek
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 01 Jun 2008, 16:15

When using sh404sef,

Post by epek »

When using sh404sef, the URL to the captcha-image get´s malformed - "&view=guestbooki" does not get parsed. (Line 315 in views/phocaguestbook/tmpl/default.php).
Sorry for the cross post, I´ve been mistaken in the first post.

Solution change the line from:
<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'& Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) . '&view=phocaguestbooki'; ?>"
to:
<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'& Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) ; ?>"

After swapping the parameter order, it will work again.

phocaguestbook 1.3.0 + sh404sef 1.0.5 beta build 120

Is anyone interested in writing a sh404sef plugin for phocaguestbook?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48345
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Hi, which version do

Post by Jan »

Hi, which version do you have:

there is:
<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&id='.$this->
id.'&Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) . '&view=phocagues
tbooki'; ?>" alt="<?php JText::_('Captcha Image'); ?>" id="phocacaptcha" />
in 1.3.0 ??? on 315
If you find Phoca extensions useful, please support the project
epek
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 01 Jun 2008, 16:15

1.3.0 beta

Post by epek »

1.3.0 beta
epek
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 01 Jun 2008, 16:15

1.3.0 beta,18/03/200

Post by epek »

1.3.0 beta,18/03/2008
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48345
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

??? I don't hav

Post by Jan »

??? I don't have any:

<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocagu
estbooki&id='.$this->id.'& Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time())))
. '&view=phocaguestbooki'; ?>"


in my 1.3.0 version ???
If you find Phoca extensions useful, please support the project
epek
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 01 Jun 2008, 16:15

Not even in:/c

Post by epek »

Not even in:
/components/com_phocaguestbook/views/phocaguestbook/tmpl/default.php
?

On line 314, forgive me I commented out the original and replaced it by the line I sent you and wrongly identified your code with line number 315.

Unfortunately, there is no Version number in the file´s header.

But it´s 1.3.0 Beta and you may grep for "md5(uniqid(time()))" or "view=phocaguestbooki"
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48345
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

the md5 is there bec

Post by Jan »

the md5 is there because of changing the image (otherwise image CAPTCHA will be not changed, there will be still the same displayed but with other verrification code because of your browser's cache)
If you find Phoca extensions useful, please support the project
epek
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 01 Jun 2008, 16:15

I am aware of that.

Post by epek »

I am aware of that.
The Problem is, that when sh404sef is installed and active, this parameter gets lost and NO captcha is shown.
You can correct the problem by simply reversing the parameter order as posted above and below:

Problem: md5 does not get parsed because of "&":
md5(uniqid(time()))) . '&view=phocaguestbooki';

Solution, reverse order:
<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'& Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) ; ?>"
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48345
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Great I fill fix it

Post by Jan »

Great I fill fix it to work this piece of code with sh404sef

Jan
If you find Phoca extensions useful, please support the project
d3vlabs
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 27 Jul 2009, 05:25

Re: phocaguestbook + sh404sef = captcha problem

Post by d3vlabs »

I couldnt get the fix to work.

Replaced line 542 of default.php with

<img src="<?php echo JRoute::_('index.php?option=com_phocaguestbook&view=phocaguestbooki&id='.$this->id.'& Itemid='.$this->itemid.'&phocasid='. md5(uniqid(time()))) ; ?>" alt="<?php JText::_('Captcha Image'); ?>" id="phocacaptcha" /><?php

and selected Jroute as captcha display method in menu parameters as well as standard captcha. the image for the captcha is still broken.


LIVE SITE:

http://www.gospelfirebrunch.com/guestbook

Can I get some help please?
Post Reply