• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Must reload page after post

#1
Hi,

Whenever I post on my forum I have to reload the page after clicking post or else I just get the loading sign in the top right corner. I have tried posting from multiple computers and different locations but I keep having the same problem. How can I resolve this where I can post without issue. I am also seeing members make double posts by accident due to this issue. I have not updated to the latest xenforo however I am with xenforo 1.5

Thanks.
 

Chris D

XenForo developer
Staff member
#2
After you make the post and it gets stuck, open the browser tools (F12), and click Console. This should show you any relevant errors.
 

Chris D

XenForo developer
Staff member
#4
What browser are you using when this happens?

I just registered and made a post using Chrome and Windows 10 and it seemed to work fine.
 
#5
What browser are you using when this happens?

I just registered and made a post using Chrome and Windows 10 and it seemed to work fine.
I am using chrome on windows 7, it also occurs with safari on mac. Try posting a few pictures and links in a post, because I posted without images and the error didn't occur but when I posted with attached images I got the error.
 
#9
@Chris D

Bro so I tried posting and the same problem occurred again, this time in safari I caught a lot of errors, they all seem to be ad related. It shows over 1000 errors and they have been racking up for over a minute, I expect that they will continue to pile up.

This is all happening when trying to post. I also did what you told me to do on another computer and the errors were also ad related. I am using google adsense.

Screen Shot 2016-03-13 at 6.51.49 PM.png
 
#11
Every time I or my members post something on my forum they have to refresh the page after hitting the post button to see their post. Thanks to some help from @Chris D I have narrowed the issue down to adsense. If I remove adsense from my site the issue does not occur, as soon as I add it the issue comes up. More specifically if I place ads in message body. As of now the only thing that solves the problem is to remove ads, I am sure everyone understands that this isn't a very good work around.

@Brogan @Mike @Jeremy @Slavik @Jake Bunce @Kier
 
#15
Here is a temporary work around. Only display ads to visitors as this issue only effects people that can post. Visitors can navigate the site with no issue and click on ads with no issues. :D

<xen:if is="!{$visitor.user_id}">
Ad code
</xen:if>

Thanks to brogan for the above code.:coffee:
 
#17
Or move the ads out of the post body and place them between posts, at the head and foot of the page, etc.
I have a problem when I add the ads to below message body, they overlap with the next post. Is there anyway that particular problem could be resolved?

Here is an example:

https://xenforo.com/community/threads/ad-after-first-post-which-template.17313/#post-1034695

Ad revenue is way down since I removed the ads from within posts. Ad revenue wasnt very high before anyway but now I am demoralized. I don't have much personal wealth anyways.
 

Tracy Perry

Well-known member
#18
CSS is your buddy.
I do something like this in my ad template
Code:
<p id ="adsense_ad_guest">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Bent Bike responsive footer -->
<ins class="adsbygoogle"
     style="display:block"
<rest of adsense crap below>
and in EXTRA.css
Code:
#adsense_ad_guest {
padding-top:8px;
padding-bottom:5px;
margin-left:auto ;
margin-right:auto;
text-align:center;
}
 
#19
CSS is your buddy.
I do something like this in my ad template
Code:
<p id ="adsense_ad_guest">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Bent Bike responsive footer -->
<ins class="adsbygoogle"
     style="display:block"
<rest of adsense crap below>
and in EXTRA.css
Code:
#adsense_ad_guest {
padding-top:8px;
padding-bottom:5px;
margin-left:auto ;
margin-right:auto;
text-align:center;
}
What does this exactly do bro? Is this for the ad_message_body or for the below message?
 

Tracy Perry

Well-known member
#20
Basically it's some CSS for positioning and assigning it in that template.
Actually looking I need to change it as the p tag doesn't allow center for positioning and maintain HTML5 compliance.
If you aren't familiar with CSS and how to insert a tag in a template for custom use - then I'd do some research. That's the only way you are going to learn.
And it wraps your template ad portion (doesn't matter which one of those).

You should be able to use a custom class ID to achieve the same results.