Fixed Text-only Thread Prefixes Hidden after Upgrade

rfc0001

Well-known member
Affected version
2.0.1
We use text-only prefixes for [ADMIN] and [MOD] threads (required thread prefix in those respective forums), which is an easy way to know a thread is MOD only or ADMIN only (the tag is only allowed on those forums). The reason I use text prefixes is in case there is an actual prefix (like "Read Me") then I can manually add [MOD] before the Title, so effectively have two prefixes.

However, with XF 2.0 a text-only prefix is converted to a hidden prefix:

1514654162256.webp

Seems like text prefexis were repurposed in XF 2.0, which doesn't provide any backwards compatibility for folks using them as actual prefixes (I can see other scenarios like wanting a "News: " or "Read Me:" or "Important:" text prefix before a title rather than the icon. Any way around this?

Thanks,
Russ
 
I'm not totally following what you're reporting - the "hidden" label is effectively text only - a prefix that has no styling, border, background etc. and displays only the text.
 
It looks like this is only impacting Thread Prefixes that existed on XF 1.5 after upgrading to 2.0.1 If I add a new Thread Prefix "[Test]" it works. Also, if I change one of the 7 existing text-only Thread Prefixes from label--hidden to something else and back, it works.
 
Last edited:
When viewing a thread list that contains these now hidden prefixes, if you right click on one, and click "Inspect Element" can you let us know what the class names are on those prefixes? (Or just screenshot the result that pops up in the element inspector).
 
Unfortunately, I fixed them all by changing them to some other prefix and back. You should be able to repro if you create a text-only thread prefix on one of your 1.5 test forums and upgrade it to 2.0. I know that's not trivial, but probably easier for you than me :)
 
Fixed now. Fundamentally, all that needs to happen is this query:
SQL:
UPDATE xf_thread_prefix
SET css_class = 'label label--hidden'
WHERE css_class = '';
Followed by a simple edit of any other prefix in order to rebuild the cache.

The upgrade to 2.0.2 fixes this automatically, and the XF1->XF2 upgrade has been fixed.
 
And FWIW, here is a screencap of a forum that had test posts in XF1 using various prefixes, followed by the XF2 results after applying the fix:

1517432221513.webp 1517432237418.webp
 
... aaaand I've just updated the CSS to more reflect the behaviour from XF1, where 'hidden' prefixes were indistinguishable from the titles they sit with:

1517433509156.webp
 
Back
Top Bottom