Link problem after update 3.2.5 => 3.2.7

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Outi
Registered User
Posts: 26
Joined: Sun Jan 01, 2006 8:14 am

Link problem after update 3.2.5 => 3.2.7

Post by Outi »

Hello,

my problem:

I have updated from version 3.2.5 to 3.2.7 via Auto update.

Now some (since update ??) links and all new links (external) don´t work, they only show text but are not clickable.
Internal links via [url] code are working now after new "update".

I did a new update via deleting "vendors", "cache" and so on and reload them to webspace from full package of 3.2.7.
Then I started "install" again with only update the database, but nothing changed, url is not clickable.

Then I have deactivated extentions to test incompatibility but with no extentions, the problem exists anyway.

I have build a bbcode for external urls in this way:

Code: Select all

[URL2={URL}]{TEXT}[/URL2]

Code: Select all

<img src="/images/links/Link.png" alt="Externer Link" title="Externer Link"></img> <a href="{URL}" target="_blank" alt="{TEXT}" title="{TEXT}"><b><u>{TEXT}</u></b></a>
The small image in front of link (/images/links/Link.png) is not shown too in all Posts where links not working. In all other Posts, where the links are fine, the image is correkt. That is a little bit confusing.

As I wrote, in most posts the links working perfecly, only links since update and new links over bbcode are not working/clickable.
Internal links are fine now.

Please give me any ideas to fix that ….
Last edited by Outi on Sun May 12, 2019 11:01 pm, edited 9 times in total.
Best regards from Outi .... ;) :D
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Link problem after update 3.2.5 => 3.2.7

Post by EA117 »

Do you happen to have a publicly-viewable posts on your board you could link to, one for demonstrating "most posts work fine", and then also "links since update and new links" that fail?

I wanted to say that the board sounds like it might be in need of a message reparse, but the symptoms actually sound "backwards" for that situation. Afraid if you trigger a reparse it might just break all the existing posts, too. So maybe being able to look at what's rendered in the failing post might give someone a clearer idea of what's wrong.
Outi
Registered User
Posts: 26
Joined: Sun Jan 01, 2006 8:14 am

Re: Link problem after update 3.2.5 => 3.2.7

Post by Outi »

Hi, yes, here are links that are working:

https://www.raspifun.de/viewtopic.php?f=46&t=85

Please see 1st post and scroll down a Little bit to section "(4) WLan Konfiguration (RaspberryMatic)".
There are different working external links.


Here in the same area last page:

https://www.raspifun.de/viewtopic.php?f ... 5&start=40

Please see the last Post(s):
Update auf ein neues Image Version 3.45.7.20190511 über int. Updatefunktion installiert.
Änderungen: RaspberryMatic 3.45.7.20190511 Image
(The flag at the end is another bbcode and working.)

The text (example) "Änderungen: RaspberryMatic 3.45.7.20190511" is normally a link (the part "RaspberryMatic 3.45.7.20190511").

This link Shows normally to https://github.com/jens-maus/RaspberryM ... 7.20190511 (<= the link behind it)

This is that, what I want to have back:
Update auf ein neues Image Version 3.45.7.20190511 über int. Updatefunktion installiert.
Änderungen: Image RaspberryMatic 3.45.7.20190511 Image
Best regards from Outi .... ;) :D
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Link problem after update 3.2.5 => 3.2.7

Post by Lumpy Burgertushie »

please copy and paste the actual text in the post. click on the edit button and then copy and paste everything in the text box and paste it here.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Outi
Registered User
Posts: 26
Joined: Sun Jan 01, 2006 8:14 am

Re: Link problem after update 3.2.5 => 3.2.7

Post by Outi »

Update auf ein neues Image Version 3.45.7.20190511 über int. Updatefunktion installiert.
Änderungen: [URL2=https://github.com/jens-maus/RaspberryM ... 7.20190511]RaspberryMatic 3.45.7.20190511[/URL2] [Flagge]en[/Flagge]
Best regards from Outi .... ;) :D
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Link problem after update 3.2.5 => 3.2.7

Post by EA117 »

Interesting. It does "think that this text is part of a link", because the rendered page closes an <a> tag for that block. (Along with closing an underline and bold tag.) The problem is that the actual opening of those tags is missing from the rendered page.

Code: Select all

Änderungen: RaspberryMatic 3.45.7.20190511</u></b></a>
Meaning the only portion of the [url2] BBCode replacement we're seeing there is the "{TEXT}</u></b></a>" portion.

I think I misinterpreted what you meant by "all new links (external) don´t work." I thought only new messages you wrote since the update were broken, but I see now that posts going back as far as 2018 also have these links broken, too. So the problem is not just with "new messages I created after updating to phpBB 3.2.7", and affects older existing messages too.

But you are correct, it is not a situation where "all attempts to use [url2] are broken", because the message from 2016 at the beginning of the thread still shows them correctly.

If the problem occurring here could be solved by "the messages just need to be reparsed", I would expect that writing a new message right now using [url2] would actually be working. That's what makes me afraid that if you actually do trigger a reparse right now, all messages will then show whatever behavior you're seeing right now when writing a new message. Meaning, all usage of [url2] would become broken, including the 2016 message where it's currently working.

I do not have any definitive idea of why that behavior is occurring. The "delete existing /vendor directory" update was important, and so was clearing the /cache directory, but you already performed those steps. Someone with a better understanding might have a good theory.

If it were my board, the next steps I would attempt would be to make a database backup of the board, and then delete and re-create the [url2] BBCode definition. If, AND ONLY IF, writing a new message using the [url2] works at that point, then I would trigger a reparse of the other existing messages.

But if deleting and re-creating [url2] doesn't give you a working link even for newly-created messages, I'm stumped.
Outi
Registered User
Posts: 26
Joined: Sun Jan 01, 2006 8:14 am

Re: Link problem after update 3.2.5 => 3.2.7

Post by Outi »

Hi EA117,

thanks for your informations.

The links worked till update to 3.2.7.
I know that, because a few days before the last post #354 from 11th of May I wrote post #353 at 05th of May and after every posting of new versions from the linked Software, I check the links.

In case of no difference between the code of working and non working links, I think, there will be a Problem in the database, as you wrote.
Meaning the only portion of the [url2] BBCode replacement we're seeing there is the "{TEXT}</u></b></a>" portion.
I dont´t know, what you mean ….

The tags are complete and at the correct position.

Code: Select all

<img src="...."></img> <a href="{URL}" target="_blank" alt="{TEXT}" title="{TEXT}"><b><u>{TEXT}</u></b></a>
EDIT:
Is it possible, that the Problem occurs, because I did not update to 3.2.6 where a url problem was existing, wich was fixed in 3.2.7 ??
I mean, there was changed something in the 3.2.5 database over update 3.2.7, what did not exist there before ??
I could not find informations about the fixes in url between 3.2.6 and 3.2.7 but I think, Maybe 3.2.7 autoupdate has something to do with it.

EDIT2 (I forgot):
No, new links generated over bbcode now are broken anymore, only internal URLs are fine now.
And I have deleted and recreated the bbcode [URL2].
Best regards from Outi .... ;) :D
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Link problem after update 3.2.5 => 3.2.7

Post by EA117 »

Outi wrote: Sun May 12, 2019 11:36 pm
Meaning the only portion of the [url2] BBCode replacement we're seeing there is the "{TEXT}</u></b></a>" portion.
I dont´t know, what you mean ….
I mean that in the messages where [url2] is broken, it's not a situation of "the [url2] BBCode isn't being applied at all." The HTML being generated when displaying the broken posts shows that "some" but "not all" of your BBCode replacement text actually does exist. The [url2] BBCode wasn't "100% ignored", it just wasn't "100% applied."

Meaning instead of the HTML page (when I look at your live site) having showed the results of applying "<img src="/images/links/Link.png" alt="Externer Link" title="Externer Link"></img> <a href="{URL}" target="_blank" alt="{TEXT}" title="{TEXT}"><b><u>{TEXT}</u></b></a>" as the replacement text, the HTML page only shows "the last portion" of that replacement text, as though the BBCode replacement was actually only "{TEXT}</u></b></a>".

Which is why I think one recommendation, after making a current database backup, would be to simply delete the current [url2] definition from the BBCodes page in ACP, and re-create it. To see if that alone fixes something that is unexpected or wrong about the BBCode that was defined prior to the phpBB 3.2.7 update.

Outi wrote: Sun May 12, 2019 11:36 pm Is it possible, that the Problem occurs, because I did not update to 3.2.6 where a url problem was existing, wich was fixed in 3.2.7 ??
There is no change like that which is "obvious" or immediately makes sense to me, anyway. The changes related to the BBCode processing that I'm aware of are:
  • The se9\text-formatter vendor library was updated to the current version, which is part of why deleting the existing /vendor directory is important. But this just "improves how the parsing is done", and not that there was an expected or intended change to "the support of existing custom BBCodes."
    • In phpBB 3.2.7, the phpBB text-formatter helper functions were changed to no longer shorten the text that appeared between the built-in [url] BBCode, even if that text was itself a URL. i.e. [url=http://longurl]http://longurl[/url] no longer becomes shortened when displayed.
    If the updated se9\text-formatter framework has introduced a subtle dependency here, that's hopefully one of the things that deleting & re-creating the [url2] definition in ACP might help correct. Note I'm talking about deleting the entire definition of [url2] from the BBCodes page in ACP; not simply re-typing the BBCode "replacement" text. Delete [url2] entirely from the BBCodes page in ACP, and then re-create the entire [url2] definition.


    edit: Note the announcement messages for phpBB 3.2.6 and phpBB 3.2.7 have links for listing the actual bug changes out of the tracker. If you get really curious, you can also browse the code differences.
    Outi
    Registered User
    Posts: 26
    Joined: Sun Jan 01, 2006 8:14 am

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by Outi »

    Thanks for your time and informations and links.

    I deleted the bbcode [URL2] already over acp and recreated it completely new but error is not fixed.

    Ok, I now see, what you mean. The parsed HTML code does not show all tags.

    Now ist late in Germany (02:32am) and I will check the rest next day.

    Thx and good night.

    EDIT:
    In Database (section phpbb_posts) the URLs are complete and there I can´t find any differences between the working and nonworking links in different Posts. So there is maybe a problem in the tags parsing.
    Best regards from Outi .... ;) :D
    User avatar
    EA117
    Registered User
    Posts: 2158
    Joined: Wed Aug 15, 2018 3:23 am
    Contact:

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by EA117 »

    I finally was able to sit down and test creating such a BBCode. For me, I see exactly the same issue as you describe, and it starts as soon as I try to include the alt="{TEXT}" or title="{TEXT}" in the BBCode replacement's <a> tag.

    Meaning in exactly the same scenario where phpBB will present this warning:
    phpBB 3.2.7 ACP Posting BBCodes wrote:Warning
    The BBCode you are trying to add seems to use a {TEXT} token inside a HTML attribute. This is a possible XSS security issue. Try using the more restrictive {SIMPLETEXT} or {INTTEXT} types instead. Only proceed if you understand the risks involved and you consider the use of {TEXT} absolutely unavoidable.
    [Yes] [Cancel]
    Even though it says you're allowed to proceed with creating the BBCode this way, proceeding with this is when attempting to use the BBCode actually fails for me. It gives me exactly the same behavior of "only RaspberryMatic 3.45.7.20190511</u></b></a> is rendered", as though the replacement text had been only "{TEXT}</u></b></a>". So that may be a bug, or the new se9/text-formatter enforcing a restriction it didn't enforce before.

    If I eliminate that condition, then [url2] works for me. Just be sure and replace all instances of {TEXT} with {INTTEXT}, such that your BBCode replacement is:

    Code: Select all

    <img src="/images/links/Link.png" alt="Externer Link" title="Externer Link"></img> <a href="{URL}" target="_blank" alt="{INTTEXT}" title="{INTTEXT}"><b><u>{INTTEXT}</u></b></a>
    For me, anyway, that works. Let us know what you find.

    Edit: Based on testing here, also now https://tracker.phpbb.com/browse/PHPBB3-16053.
    Outi
    Registered User
    Posts: 26
    Joined: Sun Jan 01, 2006 8:14 am

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by Outi »

    Thanks, I will try it soon.

    I changed from TEXT to SIMPLETEXT, but this did´t changed anything.
    So I will test your tip with INTTEXT.

    I will give Feedback in a vew minutes here.

    But confusing: ist not on every link with TEXT or SIMPLETEXT
    Best regards from Outi .... ;) :D
    Outi
    Registered User
    Posts: 26
    Joined: Sun Jan 01, 2006 8:14 am

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by Outi »

    Ok, here the results:

    1. New links working with INTTEXT
    2. New links definitively NOT working with TEXT or SIMPLETEXT
    3. Not all but some old links are now correct displayed
    4. Some links can be fixed with resave (edit and save post without changing something)
    5. Some links can be fixed with resave and they NEED a review before save.
    6. Some links can be fixed only if resaved backwards (newer links first, then older) very curious ….
    7. Some links can not be fixed with resave or on other way, they are corrupt anymore
    8. ALL links are displayed correct in preview but only some links are ok after (re)save

    New problem of (only) incorrect links now: Images shown (anchor and flag) but no text now (new error) ****

    I hope, this helps a little bit.

    **** EDIT:
    I found a way to fix the rest of not working URLs (with INTTEXT):
    Open post, change 1 char (i.e. add 1 space in link text at end / it will automatically removed at saving), save post => working.
    Best regards from Outi .... ;) :D
    User avatar
    EA117
    Registered User
    Posts: 2158
    Joined: Wed Aug 15, 2018 3:23 am
    Contact:

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by EA117 »

    Outi wrote: Mon May 13, 2019 4:42 pm **** EDIT:
    I found a way to fix the rest of not working URLs (with INTTEXT):
    Open post, change 1 char (i.e. add 1 space in link text at end / it will automatically removed at saving), save post => working.
    Now that is the kind of symptom I would expect when "the only issue remaining is the need to trigger a re-parse of the messages."

    It sounds like there are still some messages which aren't parsed correctly and need reparsed after having made the update and/or BBCode definition change. Your observation of "sometimes it matters which links appear before others" I suspect it due to what we were seeing in your rendered HTML, and that there are a bunch of "tags being closed that were never opened", and getting some "random" behavior because of that because of the invalid and incomplete HTML constructs.

    My recommendation at this point is to make that database backup, and then trigger a reparse of all the messages and other places the BBCodes could have been used. And see what if any link issues remain at that point.

    Note I chose {INTTEXT} just because it "made sense" that Unicode characters (more than just Latin A-Z) would be desirable to support, even regardless of whether it happens to be a non-English-speaking board or not.
    User avatar
    JoshyPHP
    Code Contributor
    Posts: 1288
    Joined: Mon Jul 11, 2011 12:28 am

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by JoshyPHP »

    I think there's a bug in the code that handles rendering this BBCode. It's an edge case in a specific code path that's going to take me a while to diagnose so in the meantime the best workaround is to add the following code to your template:

    Code: Select all

    <xsl:if test="0"><xsl:apply-templates/></xsl:if>
    That means your template will be something like that:

    Code: Select all

    <xsl:if test="0"><xsl:apply-templates/></xsl:if>
    <img src="/images/links/Link.png" alt="Externer Link" title="Externer Link"></img> <a href="{URL}" target="_blank" alt="{TEXT}" title="{TEXT}"><b><u>{TEXT}</u></b></a>
    
    The code doesn't do anything by itself, it only forces a particular condition to be reached.
    I wrote the library that handles markup in phpBB 3.2+.
    Outi
    Registered User
    Posts: 26
    Joined: Sun Jan 01, 2006 8:14 am

    Re: Link problem after update 3.2.5 => 3.2.7

    Post by Outi »

    @EA117
    Thanks, I have now korrektet all broken links I found, so this problem is fixed for me at this time.

    Other problem: the internal restore function does not work, I found this in other posts in this forum.

    Error message:
    Information
    Die ausgewählte Backup-Datei ist ungültig.
    « Zurück zur vorherigen Seite
    It means: Selected backup file is invalid.

    As I remember, there is a typo in restore code.

    @JoshyPHP
    Thanks, this is an interesting workaround but I wait for next release/update.
    Best regards from Outi .... ;) :D
    Post Reply

    Return to “[3.2.x] Support Forum”