Old-style BBCode in database after migration, reparse won't fix, how to then?

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
Ambis
Registered User
Posts: 16
Joined: Sat May 26, 2007 8:48 am

Old-style BBCode in database after migration, reparse won't fix, how to then?

Post by Ambis » Sat Jul 15, 2017 9:55 am

Upgrade path is SMF 2.0.14 -> phpbb 3.0.11 (clean install) -> phpbb 3.2 (clean upgrade)

From SMF, my posts and PM's contain the basic BBCode from SMF, like:

Code: Select all

[quote="authorname"]...[/quote]
or
[img]https://example.com/someimage.jpg[/img]
When I run ./phpbbcli.php reparser:reparse, I does add <t> etc tags into the bodies, but it will not fix the old-style BBCode.

With MariaDB 10.2's REGEXP_REPLACE I have updated the BBCode to match that of 3.2, but the reparser strips all of it.

Code: Select all

<QUOTE author="dude"><s>[quote="dude"]</s>...<e>[/quote]</e></QUOTE> // gets stripped down to [quote="dude"]...[/quote] by the reparser
What is the best approach to getting the plain-style BBCode to work automatically?

If I edit a broken post in the forum, it does fix the BBCode, but I need to do this automagically for all posts and PMs.

Ambis
Registered User
Posts: 16
Joined: Sat May 26, 2007 8:48 am

Re: Old-style BBCode in database after migration, reparse won't fix, how to then?

Post by Ambis » Sat Jul 15, 2017 10:35 am

Just found this:
https://github.com/AlexSheer/phpBB3.2-STK

With it, I'm able to reparse the old-style bbcode! Yay!

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

Re: Old-style BBCode in database after migration, reparse won't fix, how to then?

Post by JoshyPHP » Sat Jul 15, 2017 8:36 pm

Ambis wrote:
Sat Jul 15, 2017 9:55 am
With MariaDB 10.2's REGEXP_REPLACE I have updated the BBCode to match [...]
Don't do that, you risk corrupting your data.

What exactly does not work, you didn't say. Give us an example of original input, expected output, actual output.
I wrote the thing that does BBCodes in 3.2.

Ambis
Registered User
Posts: 16
Joined: Sat May 26, 2007 8:48 am

Re: Old-style BBCode in database after migration, reparse won't fix, how to then?

Post by Ambis » Sat Jul 15, 2017 8:44 pm

Problem was that after conversion (from SMF) all BBCode was plain [quote]'s and [img]'s even in the actual rendered post.

I did not find any way to convert these to display properly, like the quote you just wrote. They got updated to proper working BBCode if I manually edited a post, but I needed an automatic solution for all content.

I actually ended up using the old STK for phpBB 3.0 (since that version is what my migration happens against, from SMF). Nicer than the 3.2 STK since the old one is/was officially supported.

The STK solved my problem.

After migration I reparse BBCode with STK and then I upgrade it to phpBB 3.2.

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

Re: Old-style BBCode in database after migration, reparse won't fix, how to then?

Post by JoshyPHP » Sat Jul 15, 2017 8:55 pm

Ok, I understand now, the BBCodes appeared in plain text after the conversion. I don't know how the convertors work so I wouldn't know where to start.

Glad you found a way to make it work though.
I wrote the thing that does BBCodes in 3.2.

Post Reply

Return to “[3.2.x] Support Forum”