Page 1 of 1

[Solved] reparser:reparse breaking [IMG] tag

Posted: Thu Nov 23, 2017 10:51 am
by Badhon_raj
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?

Re: reparser:reparse breaking [IMG] tag

Posted: Thu Nov 23, 2017 1:26 pm
by JoshyPHP
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?

Re: reparser:reparse breaking [IMG] tag

Posted: Thu Nov 23, 2017 3:03 pm
by Badhon_raj
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.

Re: reparser:reparse breaking [IMG] tag

Posted: Thu Nov 23, 2017 3:31 pm
by JoshyPHP
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.

Re: reparser:reparse breaking [IMG] tag

Posted: Fri Nov 24, 2017 4:36 pm
by Badhon_raj
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. :)