Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

refresh to post bug?

Quote Reply
refresh to post bug?
I'm having problems with the 'After Posting: Display Confirmation & refresh to post' option.

The post_post.html template only allows a refresh to a forum view and not the message just posted.

I've just tested and it doesn't work here either...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [moog] refresh to post bug? In reply to
Just tested again and found that the link on the confirmation page works but the automatic redirect doesn't...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [moog] refresh to post bug? In reply to
Hi moog,

This is indeed a bug. The fix is to edit the post_post.html, post_reply_post.html, and post_edit.html template as follows:

Near the top of each, there should be a <meta> tag that looks like this:
Code:
<meta http-equiv="refresh" content="5;url=gforum.cgi?do=forum_view&forum=<%forum_id%>&<%hidden_query%>">

The tag needs to be changed to this:

Code:
<meta http-equiv="refresh" content="5;url=gforum.cgi?<%if current_user_do_after_post eq post_confirm_post%>post=<%post_id%>;<%hidden_query%><%unless current_user_id and not current_user_default_post_display%>#<%post_id%><%endunless%><%else%>do=forum_view&forum=<%forum_id%>&<%hidden_query%><%endif%>">

Then further down the page, there is the text in all three:

Code:
You will be automatically redirected to the forum shortly.

This should be changed to:

Code:
You will be automatically redirected to <%if current_user_do_after_post eq post_confirm_post%>your post<%else%>the forum<%endif%> shortly.

Of course, if you haven't modified the templates, it will be much easier to just grab the three attached templates and place them in your admin/templates/default directory.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] refresh to post bug? In reply to
Thanks for the patch Jason... I had worked something similar out but I missed the text mod further down the page(s)....

My only grumble now is the fact that IE 5.5 doesn't honor the anchor tag in the redirect.... Unsure


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [moog] refresh to post bug? In reply to
It seemed to work for me (although with IE6, not 5.5).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] refresh to post bug? In reply to
I made these changes and it has definately screwed something else up! (All I did was substitute your files!)

Now when some people post, they get the screeen that says "Your message has been posted and you will be taken back to the forum" and then they get
Home: Permission Denied
Oops! You are not authorized to view that page.
at the next screen!

Unfortunately, I just substituted your files for the orginals via FTP (I couldn't find the templates to change) so now I need the originals back!

Steve

Visit The Guitar Diner
Quote Reply
Re: [Boomer] refresh to post bug? In reply to
The attachments have a seemingly random (it took 4 different computers here before we were able to reproduce it) bug that causes the redirect to contain a URL that, occassionally, is only partially understood by IE (and only IE - Mozilla and Netscape do not exhibit the problem). In any event, I pulled the original attachments from the above post and I've attached the proper ones here.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Jagerman] refresh to post bug? In reply to
Hi Jason,

This is still a sick puppy... I'm working on post_reply_post, in line 22

Code:
<meta http-equiv="refresh" content="5;url=index.cgi?<%if current_user_do_after_post eq post_confirm_post%>post=<%post_id%>&<%hidden_query%><%unless current_user_id and not current_user_default_post_display%>#<%post_id%><%endunless%><%else%>do=forum_view&forum=<%forum_id%>&<%hidden_query%><%endif%>">


the ampersand after <%post_id%> is causing problems on posts with an id within the asci character range... the above line gives...

Code:
<meta http-equiv="refresh" content="5;url=index.cgi?post=54&#54">


in the html output the &#54 gets translated into a 6 and then the forum moans that post

http://loc.forum/index.cgi?post=546

doesn't exist... post id 64 translates to @ and so on....

I have now tried all permutations of using ; and \; (also # and \#) and the asci equivalents but nothing works.

This looks like an obscure OS/browser patch issue but it's really bugging me... I'm having this problem on all of my machines, a mix of: win98, 2000; IE5, 5.5, 6 and a mac on OS9...


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [moog] refresh to post bug? In reply to
Oops... Just change the last & to &amp;

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com