Page 1 of 1

[solved] Guestbook doesn't work with IE and Opera

Posted: Sun Jul 19, 2009 4:21 pm
by mydom
Hi,

i'm using CMSMS 1.6 with guestbook-module 1.1.10. I can't add guestbook-entrys with IE6, IE7 and Opera. The form is shown but when i send it i get to the entrys-list and the entry isn't in there. Even if i send a totally empty form i get there without getting an error-message. I have allready tried to upgrade the module to the current version 1.1.12 without any changes.
The guestbook works fine with firefox and safari.

Any ideas what could be wrong?

Re: Guestbook doesn't work with IE and Opera

Posted: Tue Jul 21, 2009 9:04 am
by mydom
Am i the only one with that problem?

Re: Guestbook doesn't work with IE and Opera

Posted: Wed Jul 22, 2009 9:21 am
by mydom
OK i got the problem but don't know how to fix that.
It seems like the module can't handle buttons with image-type.

When i use:

Code: Select all

<input class="imagebutton" type="submit" src="{root_url}/data/img/eintragen.gif" name="submitted" value="{$labels.insert}" />
instead of:

Code: Select all

<input class="imagebutton" type="image" src="{root_url}/data/img/eintragen.gif" name="submitted" value="{$labels.insert}" />
it's OK. Any idea why Firefox can handle that and IE and Opera can't handle imagebuttons?

Re: Guestbook doesn't work with IE and Opera

Posted: Wed Jul 22, 2009 10:09 am
by mydom
Ok fixed it. And here is how it works:

Replace in action.default:

Code: Select all

if (isset($_POST['submitted']) && !isset($_POST['cancel'])) 
with

Code: Select all

if (isset($_POST['submitted_x']) && isset($_POST['submitted_y']) && !isset($_POST['cancel'])) 
Replace in action.get-entryform

Code: Select all

$values[$field] = isset($_POST['submitted']) && !isset($_POST['cancel']) ? $_POST[$field] : '';
with

Code: Select all

$values[$field] = isset($_POST['submitted_x']) && isset($_POST['submitted_y']) && !isset($_POST['cancel']) ? $_POST[$field] : '';
Replace in action.get-entrylist

Code: Select all

if (isset($_POST['submitted']) && !isset($_POST['cancel']) && empty($errors))
with

Code: Select all

if (isset($_POST['submitted_x']) && isset($_POST['submitted_y']) && !isset($_POST['cancel']) && empty($errors))$_POST[$field] : '';
Replace in lib\classes\module\class.GuestbookFrontend

Code: Select all

elseif(! (isset($_POST['submitted']) && !isset($_POST['cancel'])))
with

Code: Select all

elseif(! (isset($_POST['submitted_x']) && isset($_POST['submitted_y']) && !isset($_POST['cancel'])))
Now IE and Opera can handle the imagebutton too