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

Not a Bug "Async Ads Codes" have a Problem while "reply a thread on quick reply"

Discussion in 'Resolved Bug Reports' started by maxicep, Oct 9, 2015.

  1. maxicep

    maxicep Active Member


    Our problem is that;
    If we put the async ad codes in the ad_message_body or ad_message_below templates and someone reply the thread via quick reply, thread doesn't update with new content and post doesn't show on thread page. Users should refresh for see them.

    We have 2 different async adsense code in our forum. They are:
    1. every first post in threads (all pages of thread)
    2. every second post in threads (all pages of thread)

    So if we edit the the first or second post of thread or second post of thread inline, then it disappear and we cant see them until the refresh page. However, if someone reply the thread and if this reply the new first or second post of thread's pages then same problem. Post cant show and ajax loader waiting at right of the corner of the screen.

    I have searched this problem in xenforo, and i found same problem from others;

    He says that, if switch to normal code and remove the async code, post replies works without problem but i cant switch now because responsive adsense codes have no standart code, they are async only.

    I think it is a xenforo's bug and it should be fixed.
    OperaManiac likes this.
  2. HWS

    HWS Well-Known Member

    We also experienced this problem long time ago.

    We implemented a solution for it, just cannot recall what it was...
  3. Mike

    Mike XenForo Developer Staff Member

    The thing is, you're adding arbitrary JavaScript into a template. We can't really account for that. JS like this can do things that violate assumptions or outright break the page if they attempt to write to the document in certain ways. This is why a lot of systems actually have explicit APIs that are generally to be used when it comes to ajax requests.

    I you post any errors in the JS console we might be able to account for things a bit, but in general, we can't necessarily be defensive against arbitrary template changes.
  4. maxicep

    maxicep Active Member

    You should support that i think @Mike

    Why we can't use some ads codes on xenforo forum software? If you are not interesting with that problem due personel template edits then you must add ad placement feature on your software.

    I'm sorry sometimes really because we switch from vbulletin.

    Thank you.
  5. Mike

    Mike XenForo Developer Staff Member

    There is an ad placement feature via the templates, but it's still arbitrary code going into the page that we don't necessarily have control over.

    But to emphasize, without some further details about the errors logged in the console, it would be very difficult for us to make any recommendations whatsoever.
  6. Mr Lucky

    Mr Lucky Well-Known Member

    Surely arbitrary code is one thing, but Google Adsense is so endemic to web sites that it is something that should be accommodated for, notwithstanding its arbitrariness.
  7. Optic

    Optic Well-Known Member

    Has anyone found a workaround for this?

    I am also using responsive AdSense codes (which are only asynchronous) and as a result it is breaking many of the XF inline features:
    • Quick Reply not inserting post automatically without manual refresh (as mentioned above)
    • Quick Edit overlay not updating post automatically without manual refresh
    • Revealing soft deleted posts not working
    Or will this be addressed in XF2?

Share This Page