1. 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

Discussion in 'Troubleshooting and Problems' started by Webby, Mar 11, 2016.

  1. Webby

    Webby Member

    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.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    After you make the post and it gets stuck, open the browser tools (F12), and click Console. This should show you any relevant errors.
     
    Webby likes this.
  3. Webby

    Webby Member

    The console didn't show any error code when I clicked post, the error did occur though.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    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. Webby

    Webby Member

    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.
     
  6. Webby

    Webby Member

    Just tried a regular post and the error occured.
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    Does it happen every time?

    What was the last thing you tried to post that failed?
     
  8. Webby

    Webby Member

  9. Webby

    Webby Member

    @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
     
  10. Webby

    Webby Member

    @Chris D I removed adsense from thread pages and will see if that helps.
     
  11. Webby

    Webby Member

    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
     
  12. Webby

    Webby Member

    I tested with amazon banners and ads, no errors occur. Only happens with adsense.
     
  13. Slavik

    Slavik XenForo Moderator Staff Member

    Amaury likes this.
  14. Webby

    Webby Member

  15. Webby

    Webby Member

    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:
     
  16. Brogan

    Brogan XenForo Moderator Staff Member

    Or move the ads out of the post body and place them between posts, at the head and foot of the page, etc.
     
    Webby likes this.
  17. Webby

    Webby Member

    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.
     
  18. Tracy Perry

    Tracy Perry Well-Known Member

    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;
    }
     
    Webby likes this.
  19. Webby

    Webby Member

    What does this exactly do bro? Is this for the ad_message_body or for the below message?
     
  20. Tracy Perry

    Tracy Perry Well-Known Member

    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.
     
    Webby likes this.

Share This Page