[Solved] reparser:reparse breaking [IMG] tag

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Badhon_raj
Registered User
Posts: 124
Joined: Wed Jan 04, 2012 6:33 pm

[Solved] reparser:reparse breaking [IMG] tag

Post by Badhon_raj » Thu Nov 23, 2017 10:51 am

Hi,
I need to reparse all posts due to a bbcode update (Please recommend if there's another better way. I'm replacing old youtube bbcode with media embed extension).


Problem is, if I run reparser:reparse in cli, the it is messing up all [IMG] tag.
Inspecting in the database,
this was the original data in post_text column.

Code: Select all

<r><IMG src="https://i.imgur.com/some-image.jpg"><s>[IMG]</s><URL url="https://i.imgur.com/some-image.jpg"><LINK_TEXT text="https://i.imgur.com/some-image.jpg">https://i.imgur.com/some-image.jpg</LINK_TEXT></URL><e>[/IMG]</e></IMG><br/></r>
This is being changed to

Code: Select all

<r>[IMG]<URL url="https://i.imgur.com/some-image.jpg"><LINK_TEXT text="https://i.imgur.com/some-image.jpg">https://i.imgur.com/some-image.jpg</LINK_TEXT></URL>[/IMG]</r>
after I run the reparse command.

It is breaking the IMG tag.
Image

Why is this happening? shouldn't the reparser leave the IMG bbcode contents untouched?
Last edited by Badhon_raj on Fri Nov 24, 2017 4:36 pm, edited 1 time in total.

User avatar
JoshyPHP
Code Contributor
Posts: 754
Joined: Mon Jul 11, 2011 12:28 am

Re: reparser:reparse breaking [IMG] tag

Post by JoshyPHP » Thu Nov 23, 2017 1:26 pm

Did you disable images for any group of users? Did you see a maximum value for "Maximum image width per post" or "Maximum image height per post"? Do images work when you post them manually?
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

Badhon_raj
Registered User
Posts: 124
Joined: Wed Jan 04, 2012 6:33 pm

Re: reparser:reparse breaking [IMG] tag

Post by Badhon_raj » Thu Nov 23, 2017 3:03 pm

JoshyPHP wrote:
Thu Nov 23, 2017 1:26 pm
Did you disable images for any group of users? Did you see a maximum value for "Maximum image width per post" or "Maximum image height per post"? Do images work when you post them manually?
no,
need to check,
need to check,
yes.

if manually edit one of those broken post, and submit, then it fixes itself.
but reparsing again doesn't help.

User avatar
JoshyPHP
Code Contributor
Posts: 754
Joined: Mon Jul 11, 2011 12:28 am

Re: reparser:reparse breaking [IMG] tag

Post by JoshyPHP » Thu Nov 23, 2017 3:31 pm

Ok, I found the culprit. The reparser has some trouble figuring things out when IMG tags are in uppercase. A fix is already underway but it won't retroactively fix your old posts so I don't know what to do with that, sorry.
I wrote the thing that does the BBCodes in 3.2. Unless it broke yours, in which case it was somebody else with a similar name.

Badhon_raj
Registered User
Posts: 124
Joined: Wed Jan 04, 2012 6:33 pm

Re: reparser:reparse breaking [IMG] tag

Post by Badhon_raj » Fri Nov 24, 2017 4:36 pm

JoshyPHP wrote:
Thu Nov 23, 2017 3:31 pm
Ok, I found the culprit. The reparser has some trouble figuring things out when IMG tags are in uppercase. A fix is already underway but it won't retroactively fix your old posts so I don't know what to do with that, sorry.
It seems to have fixed my issue.
Thanks a lot. :)

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: JoshyPHP, SeeinStripes and 126 guests

cron