I've been having no end of headaches trying to figure out the following problem but I've finally found a resolution.
Problem:
I have Event Attendance, Event Forums and the bridge installed on my vB3.6.8pl2 board.
When I post using quick reply from a threaded-mode view to an event whose RSVPs have closed, I get the following message:
Quote:
Invalid Event specified. If you followed a valid link, please notify the administrator
|
This does not happen when replying from linear mode, via quick reply or not.
Solution:
After lots of investigation, false starts, long pauses and just ignoring it, I've discovered the following in version 1.2.1, in the calendar_rsvp_form template.
Code:
<input type="submit" class="button" value="$vbphrase[submit]" />
</td></tr>
</table>
</form>
</if>
<if condition="$expires[0]<0">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr><td class="alt2" align="center" valign="center" height="75"><font size="2"><b>$vbphrase[calendar_rsvp_closed]</b></font></td></tr>
</table>
</if>
Notice the </form> tag? That's the closing tag for a form opened at the top of this template, except the form was opened outside of the if block. When RSVPs close, the closing form tag is lost.
The easy resolution is to change the block above to the following:
Code:
<input type="submit" class="button" value="$vbphrase[submit]" />
</td></tr>
</table>
</if>
<if condition="$expires[0]<0">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr><td class="alt2" align="center" valign="center" height="75"><font size="2"><b>$vbphrase[calendar_rsvp_closed]</b></font></td></tr>
</table>
</if>
</form>
Notes:
The reason this does not affect linear mode posters is because the posting is done via AJAX. However, for threaded-mode users the posts are actually POSTed. Normally, they'd be posted off to the newreply.php script correctly but because a form block further up isn't close, the submit information for the quick reply block now believes its supposed to be posting to calendar.php. That'd be fine, except that the action "newpost" is not recognised by calendar.php so it eventually falls back to its default action of posting an error. Also, because none of the rest of the body in calendar.php is called, none of the calendar hooks fire (fortunately, otherwise this would have been
impossible to debug) so the hook that forcibly forwards the user to the thread for that event (Event Forums functionality) doesn't fire.
But all this is ultimately caused by a misplaced </form> tag inside the Event Attendance code. Hence the bug report/solution here.
Hope that helps.