As anonym user I tried to add a site guestbook entry:

Notice: Undefined index: anonemail guestbook_form_entry_form_submit() in function (/home/o2981/web/go-na.hu/new2/profiles/media_dev/modules/guestbook/guestbook.module row 625).
Notice: Undefined index: anonwebsite guestbook_form_entry_form_submit() in function (/home/o2981/web/go-na.hu/new2/profiles/media_dev/modules/guestbook/guestbook.module row 626).

I realyzed that the issue disappers if I enable the following fields in the guestbook configuration:

"Anonymous poster fields
E-mail
Website
Additional information that anonymous posters may supply."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

workonwomen’s picture

Any workaround to not force anonymous user to give email/webpage detail?

Eric_A’s picture

I think this bug simply has been around since at least 6.x-2.0. It has been reported early in the Guestbook D7 cycle by @Michèle in #1014194: Port Guestbook to Drupal 7.
Can't do a patch right now, but I will later unless somebody else beats me to it.

Eric_A’s picture

Status: Active » Needs review
FileSize
1.41 KB

This patch should fix the bug and preserve D6 behavior.
Please test. Those of you that don't have git available can try something like "patch -p1 < ~/guestbook-error-message-1386136-3.patch".

workonwomen’s picture

Works fine, thanks!

sun’s picture

Guestbook should follow the implementation of core's Comment module with regard to this.

This should also be backported to D6.

sun’s picture

#5 allows to dramatically simplify the form submit handlers. Didn't notice that earlier.

Eric_A’s picture

Yeah, #5 is just what the doctor ordered. Let's commit this in a day or two.

Eric_A’s picture

Title: Error message » Undefined indexes in guestbook_form_entry_form_submit()
Version: 7.x-2.x-dev » 6.x-2.x-dev
FileSize
2.7 KB

Pushed #5 to 7.x-2.x. Here's a patch for 6.x-2x.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

Eric_A’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs backport to D6

Thanks all! Pushed to 6.x-2.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.