Submit after Edit thread blank field

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.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
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.
 
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.

In English?
 
  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
 
  • Like
Reactions: HSP
  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


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
 
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?
 
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>
 
@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?
 
What do you advice?

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.
 
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).
 
I haven't tested this, but try adding:
Code:
AND {$viewName} != 'XenForo_ViewPublic_Thread_ViewPosts'
To the condition.

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'">
 
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.
 
  • Like
Reactions: HSP
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.


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.
 
@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?
 
Back
Top Bottom