Closed Thanerik closed 8 years ago
It seems that you have an invalid value in the option "Comment form args" (see Settings -> Guestbook -> Comment-form settings -> Comment form args) Have you changed something there? Can you please provide the option text?
Yes, my option text is such:
array(
'fields' => apply_filters( 'comment_form_default_fields', array(
'author' => '<div class="form-wrap"><label for="author">Dit navn <span class="req-symbol">*</span></label><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .'" /></div>',
'email' => '<div class="form-wrap"><label for="email">Din email <span class="req-symbol">*</span></label><input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .'" size="30" /></div>',
)),
'comment_field' => '<div class="form-wrap"><label for="comment">' . _x( 'Comment', 'noun' ) . ' <span class="req-symbol">*</span></label><textarea id="comment" name="comment" aria-required="true"></textarea></div>',
'comment_notes_before' => '<p class="mini">I henhold til offentlighedsloven vil anonyme indlæg blive slettet - og det samme gælder indlæg, der ikke overholder en sober tone. Din email adresse vil ikke blive offentliggjort. Krævede felter er markeret med *</p>',
'comment_notes_after' => '',
'class_submit' => 'btn-dovania btn-commentar',
'title_reply' => '<h2>Skriv en indlæg</h2>'
)
I haven't changed anything there, but maybe there are some error in my option args?
The problem is, that a variable with the name $commenter is not available. From where do you have this code?
Now I see! I used the same code as that from the comment template in the regular commentar-section in my site. It defined that $commenter = wp_get_current_commenter();
.
$comment->comment_author
and $comment->comment_author_email
doesn't work, because $comment is not defined either...
But it's not that important to gathering the users informations from the cookie anyway. So I'm dropping the value inserting code, and just start the form blank.
I began to receive those PHP notice issues:
I don't know where I should look at in the code to solve the error.