Style/html-css issue with forum topics

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 3:47 am

Hello. I'm sorry if this isn't the place to put this. I hope it is.

I encountered an issue after updating my board to 3.2.7. Currently on my forum, if a topic page goes on for long enough, the replies/posts and bottom of the page become transparent and the posts begin to widen. If you scroll down this page, for example, the issue can be seen: http://law-rp.com/forum/viewtopic.php?f=76&t=3535

Is there a way I can go about rectifying this? I feel like it should be a minor change to one of the files in the style folder that I use (I'm using the latest version of KBlueTurtle - https://www.phpbb.com/customise/db/styl ... 26#p670426)

Can someone please help?

Thank you.

User avatar
Mannix_
Registered User
Posts: 474
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: Style/html-css issue with forum topics

Post by Mannix_ » Sat May 18, 2019 6:36 am

My bet is that there is at least 1 closing div tag missing in viewtopic_body.html file. Compare the one you have with the one from prosilver and see if I'm right.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Re: Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 4:41 pm

Mannix_ wrote:
Sat May 18, 2019 6:36 am
My bet is that there is at least 1 closing div tag missing in viewtopic_body.html file. Compare the one you have with the one from prosilver and see if I'm right.
I tried your advice and although it looks like there's unclosed divs in the overall_header.html file, closing them seemed to only make this issue worse. Is there another file I should be looking at?

User avatar
Mannix_
Registered User
Posts: 474
Joined: Sun Oct 25, 2015 2:56 pm
Contact:

Re: Style/html-css issue with forum topics

Post by Mannix_ » Sat May 18, 2019 4:49 pm

I installed that style on my test board and everything works ok here so my first proposal wasn't useful. So maybe there is a rogue extension that is causing that issue try to disable all the extension and see if that fixes it. If it does then turn the extension one by one and check which one is causing the issue.
-=-=-=-=-=-=-=-=-=-=-=-=-My Styles-=-=-=-=-=-=-=-=-=-=-=-=-
HexagonHexagonRebornCleanSilverProject Durango
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Want me to port a style to 3.2.x etc. contact me here or on twitter.

winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Re: Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 4:57 pm

Ah I'm blind. You told me specifically which file to look at. I'm sorry. I'll check again.

User avatar
EA117
Registered User
Posts: 581
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Style/html-css issue with forum topics

Post by EA117 » Sat May 18, 2019 5:20 pm

I'm suspicious of the signature text I can see which appears as:
</div>
"
Open to PMs at any time. Also, all the time on Discord: Vcom7418#0756"
Is there possibly a BBCode definition in use in that signature which has a malformed replacement, and is what's unbalancing the <div> pairs whenever it appears. Or maybe somehow that content is being pulled from an external site that is malfunctioning / giving incomplete HTML for a feature it intended to "plug in" to the signature.

winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Re: Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 5:34 pm

EA117 wrote:
Sat May 18, 2019 5:20 pm
I'm suspicious of the signature text I can see which appears as:
</div>
"
Open to PMs at any time. Also, all the time on Discord: Vcom7418#0756"
Is there possibly a BBCode definition in use in that signature which has a malformed replacement, and is what's unbalancing the <div> pairs whenever it appears. Or maybe somehow that content is being pulled from an external site that is malfunctioning / giving incomplete HTML for a feature it intended to "plug in" to the signature.
What's really bugging me is that it seems to happen only when the topic goes on for a specific length. I checked the signature in question and there's no </div> there, at least. I tried finding more examples like this one: http://law-rp.com/forum/viewtopic.php?f ... 2&start=10 and only those pages with enough text to make it to a certain page length trigger this issue. I also tried looking at the viewtopic_body.html file but I couldn't find a file with a name similar enough to this in the style folder for KBlue_Turtle. I'm very lost on how to tackle this. I suppose I can try turning off extensions. Though I currently have several extensions in use so it may take a while.

User avatar
EA117
Registered User
Posts: 581
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Style/html-css issue with forum topics

Post by EA117 » Sat May 18, 2019 5:44 pm

I agree with Mannix that the template HTML files look fine. There isn't a viewtopic_body.html in the style as used in your forum (nor in the standard K_Blue_Turtle), and proSilver's viewtopic_body.html (which is what K_Blue_Turtle therefore inherits) is fine on your server, too. K_Blue_Turtle does include an overall_header.html template which would have the ability to "throw off the entire page", but even with the custom edits you made in yours, it still looks fine.

I'm saying you need to look at what's generating the content from the user's signature block that I pointed to. When you look at the entire page source, it appears there are actually two </div> tags closing blocks that were never opened, in between the "WHAT BAR?!" output and the "Open to PMs at any time. Also, all the time on Discord" output:

Code: Select all

<div id="sig67530" class="signature">
<a href="http://law-rp.com/forum/viewtopic.php?f=21&amp;t=1925&amp;p=32293" class="postlink"><strong class="text-strong"><span style="text-decoration:underline"><span style="font-size: 200%; line-height: normal">WHAT BAR?!</span></span></strong></a>
<a href="http://law-rp.com/forum/viewtopic.php?f=12&amp;t=52" class="postlink">Melody Serperior - Middleweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2488" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?f=12&amp;t=135" class="postlink">Navi Florges - Middleweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2489" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?f=13&amp;t=136" class="postlink">GASTER - Lightweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2490" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?p=19002" class="postlink">Lyanna Eon - Middleweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2491" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?p=31850" class="postlink">Yoko Kitsune - Heavyweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2492" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?p=41642" class="postlink">Alice Gaster - Lightweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=2493" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?p=42640" class="postlink">S.A.S. - Tag Team</a> <a href="http://law-rp.com/forum/viewtopic.php?f=68&amp;t=2494" class="postlink">Mixed Profile</a><br>
<a href="http://law-rp.com/forum/viewtopic.php?f=12&amp;t=3161" class="postlink">La Mariposa - Middleweight</a> <a href="http://law-rp.com/forum/viewtopic.php?f=66&amp;t=3162" class="postlink">Mixed Profile</a>
</div></div>
Open to PMs at any time. Also, all the time on Discord: Vcom7418#0756</div>
Which is a good explaination for why "nothing seems wrong with the style", because it doesn't have anything to do with the style. It's HTML being output in response to what's in the signature block, and either a "bad BBCode definition" in your BBCode list in ACP is causing this, or somehow something else that is included in the signature may be causing it.

Mannix is still correct, that it could also be an extension causing this output, too. But looking at what's in this user's signature, and then looking at any BBCodes or externally-retrieved HTML it was pulling in, is worth looking at as well.

If the issue really is the two "</div></div>" shown in the signature block above, the "only happens after a certain number of posts" is just the random magic of when there are enough unbalanced blocks that don't fall into a case the user agent was able to ignore or recover in a way that wasn't immediately obvious. Entirely dependent on everything else that happened to be going on in the page, and no "one answer fits all."

winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Re: Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 5:53 pm

Understood. Thank you very much for the breakdown. That was insightful.

It seems that I'll need to put a little bit of time into troubleshooting this on multiple fronts. To be clear, it doesn't seem to be after a certain number of posts. From what I've seen, it occurs after the posts collectively pass a certain point on the page if they're all long enough. Full pages with short posts don't seem to cause this issue.

I'll try looking at my BBCodes and my extensions. Hopefully, it won't be super difficult to pinpoint where this is happening. Thank you for verifying that my style and edits aren't the cause!

User avatar
EA117
Registered User
Posts: 581
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Style/html-css issue with forum topics

Post by EA117 » Sat May 18, 2019 6:07 pm

Don't know why it didn't come to mind while writing earlier, but tying the start of this behavior to "it began after I updated to phpBB 3.2.7" might also be a symptom of the https://tracker.phpbb.com/browse/PHPBB3-16053 issue, which caused issues like what's described here.

Meaning, there might not even be anything "wrong" with the BBCode definition, but the BBCode is still what's causing the issue. A legal use of the {TEXT} token could be triggering a bug in the underlying se9/text-formatter that was delivered in phpBB 3.2.6 and phpBB 3.2.7. And which is causing "only the tail-end of the HTML replacement to be rendered", which is why we're seeing only the closing the <div> tags and not where they were opened.

So if you look at all of the BBCodes that are being referenced in this signature block and don't see anything wrong with them, maybe post the BBCode definitions and their replacement HTML definitions here, in case any further suspicions could be made. And/or try JoshyPHP's suggestion of adding "<xsl:if test="0"><xsl:apply-templates/></xsl:if>" to the beginning of the HTML replacement for each of the BBCodes that were being referenced in the signature block, and see if that resolves the symptom.

winner3
Registered User
Posts: 15
Joined: Thu Mar 22, 2018 4:29 pm

Re: Style/html-css issue with forum topics

Post by winner3 » Sat May 18, 2019 6:39 pm

You were completely right. This was an instance of that bug. The error was caused by my html replacement for the spoiler BBCode that I was using.

<div class="spoiler">
<div class="spoiler-header spoiler-trigger">
<span class="spoiler-title">
<xsl:choose>
<xsl:when test="@spoiler">
<xsl:choose>
<xsl:when test="string-length(normalize-space(@spoiler)) > 0">
<xsl:choose>
<xsl:when test="string-length(normalize-space(@spoiler)) > 65">
<xsl:value-of select="concat(substring(normalize-space(@spoiler), 0, 65), '…')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(@spoiler)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>{L_SPOILER}</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>{L_SPOILER}</xsl:otherwise>
</xsl:choose>
</span>
<span class="spoiler-status">{L_SPOILER_SHOW}</span>
</div>
<div class="spoiler-body">{TEXT1}</div>
</div>


Adding <xsl:if test="0"><xsl:apply-templates/></xsl:if> at the top fixed this issue!

Will I need to remove this line when the bug is corrected, I assume in a future phpbb release?

User avatar
EA117
Registered User
Posts: 581
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Style/html-css issue with forum topics

Post by EA117 » Sat May 18, 2019 7:22 pm

winner3 wrote:
Sat May 18, 2019 6:39 pm
Will I need to remove this line when the bug is corrected, I assume in a future phpbb release?
I'm assuming not "immediately", meaning the presence of this XSL in your replacement HTML template will continue to be benign even once the issue is fixed. Same as the presence of this XSL is benign in terms of changing your output right now; other than the fact that it's causing the parser to take a branch that avoids the current breaking issue.

Still best to remove it eventually; it doesn't serve some kind of useful purpose other than the current workaround. Just saying I don't suspect "the site will be immediately broken again until you remove this" once the underlying bug is fixed. Though you'll certainly know exactly how to fix that even if it turns out I'm wrong. 😃

Post Reply

Return to “[3.2.x] Styles Support & Discussion”