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

Submit after Edit thread blank field

Discussion in 'Troubleshooting and Problems' started by HSP, Mar 3, 2016.

  1. HSP

    HSP Member

    When i am going to edit mode of a particular thread and submit i get a blank screen and the loading bar jammed on loading.

     
  2. Amaury

    Amaury Well-Known Member

    Are you able to reproduce this here on XenForo?
     
  3. Chris D

    Chris D XenForo Developer Staff Member

    Generally speaking this kind of problem would be down to some sort of javascript erroring in the page, or some other server side issue.

    You may want to try looking at the browser's javascript console after submitting. This would indicate any client or server side failures with that process.
     
  4. HSP

    HSP Member

    In English?
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    1. Edit post
    2. Submit an edit
    3. Open your browser console (usually by pressing F12)
    4. See if there are any errors listed in the "Console" section
     
    HSP likes this.
  6. HSP

    HSP Member


    I have the following error: TagError: adsbygoogle.push() error: No slot size for availableWidth=0

    Code:
    XenForo.activate(%o) [object HTMLDocument] xenforo.js:223
    "flash url: http://lionsground.com/js/swfupload/Flash/swfupload.swf" attachment_editor.js:7:292
    Attachments changed, total files: 0, images: 0 attachment_editor.js:14:30
    XenForo.init() 75ms. jQuery 1.11.0/1.2.8-dev xenforo.js:209:316
    OverlayLoader for posts/2615/edit-inline xenforo.js:288:363
    Loaded css 0, post_edit_inline xenforo.js:250:374
    XenForo.activate(%o) [object Object] xenforo.js:223
    Event: %s AutoValidationDataReceived xenforo.js:342
    message_html: Okay xenforo.js:352:131
    undefined: Okay xenforo.js:352:131
    Event: %s AutoValidationComplete xenforo.js:344
    DeCache  Object { 0: <div.xenOverlay>, selector: "", context: undefined, length: 1 } xenforo.js:285:106
    TagError: adsbygoogle.push() error: No slot size for availableWidth=0
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    This suggests it is something to do with Google ads code. Have you added code for Google ads to any of your post / message templates?
     
  8. HSP

    HSP Member

    Yes, ad_message_body:

    Code:
    <xen:hook name="ad_message_body" />
    
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
    <style>
    .responsive-site-post-800 { width:auto; height:auto; display: inline-block; padding: 0px; float: right; margin: 15px; position: relative; }
    </style>
    
    <!-- Site-Inpost-News -->
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="xxxxxx"
         data-ad-slot="xxxxxx"
         data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </xen:if><br /><br />
    ad_below_top_breadcrumb:

    Code:
    <xen:hook name="ad_below_top_breadcrumb" />
    <xen:if is="{$contentTemplate} == 'forum_list'">
    <!-- Site-Header-News -->
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="xxxxxxxxxx"
         data-ad-slot="xxxxxxxx"
         data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </xen:if>
     
  9. HSP

    HSP Member

    @Chris D it is caused by the following code in the ad_message_body template:

    Code:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">
    <style>
    .responsive-site-post-800 { width:auto; height:auto; display: inline-block; padding: 0px; float: right; margin: 15px; position: relative; }
    </style>
    
    <!-- Site-Inpost-News -->
    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="xxx"
         data-ad-slot="xxx"
         data-ad-format="auto"></ins>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </xen:if><br /><br />
    Here is the error code again: the following error: TagError: adsbygoogle.push() error: No slot size for availableWidth=0

    What do you advice?
     
  10. Tracy Perry

    Tracy Perry Well-Known Member

    instead of width:auto, try assigning a maxwidth?
    I think that's a similar issue with Burning Board in that it doesn't properly display the responsive ads because of using width:auto... but since I'm removing ads off all my sites I didn't delve into it to deeply.
     
  11. Mike

    Mike XenForo Developer Staff Member

    I would likely recommend trying to identify a conditional to not output the script tag on edit at least, as the embedded script isn't working correct (likely because it's being run before/as the HTML is inserted into the DOM).
     
    Cyb3r likes this.
  12. HSP

    HSP Member

    That didn't help.

    Sorry, what?
     
  13. Mike

    Mike XenForo Developer Staff Member

    I haven't tested this, but try adding:
    Code:
    AND {$viewName} != 'XenForo_ViewPublic_Thread_ViewPosts'
    To the condition.
     
    HSP likes this.
  14. HSP

    HSP Member

    It continued without an error, but after submitting the change the Advertisement disappeared.

    The new code:

    Code:
    <xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id} AND {$viewName} != 'XenForo_ViewPublic_Thread_ViewPosts'">
     
  15. Chris D

    Chris D XenForo Developer Staff Member

    That's basically the expected behaviour with that approach.

    Instead of that you could try changing:

    Code:
    (adsbygoogle = window.adsbygoogle || []).push({});
    To:
    Code:
    setTimeout(function()
    {
        (adsbygoogle = window.adsbygoogle || []).push({});
    }, 500);
    This should delay the ads loading by half a second, which may give it enough time to detect the correct width for the ad slot.

    Beyond that, this is really an issue to take up via Google support channels.
     
    HSP likes this.
  16. HSP

    HSP Member


    Thanks for your support guys, i super appreciate it.

    That solution didn't work, however i don't bother if the poster alone don't see the the top Ad Banner after he/she submit changes. More important the bug is solved.
     
  17. HSP

    HSP Member

    @Chris D , do you have a code when submitting a reply on a thread it will refresh upon submitting? Because I see the forum sometimes have issues with the ad units and people keep clicking submit because nothing happens and i need to remove double posts.

    Than this issue is solved.

    ps: Is this glitch going to be fixed in the next Xenforo update?
     

Share This Page