Fixed phpBB 3.2.4 some html tags left.

Rimesia

Member
Hey Guys,

Seems like the importer is not uptodate anymore?
Because i get some text really good imported and some have html tags left.
Quotes in Quotes doesn't work, only the inner Quote gets migrated.
Seems like phpBB has changed the BBCode kinda html hybrid.
Here a example from the migration on my test environment: https://cryptoevo.de/ft/index.php?threads/analysen-spekulation-bitcoins-altcoins-icos-etc-mega-thread.41/#post-143

Best regards,

You can use this addon in order to bulk clean this extra bbcodes.
 

hibiskus

Member
We already support importing from phpBB 3.2 to XenForo 1.5 so at this point it's recommended to do the import into XF 1.5 and then upgrade to 2.0.

We don't currently have an ETA for further importers but they are planned as time goes on.
I quote this to raise more attention because i paid 150€ and get bud raped with my time plan...

What it seems to me i should not have updatet to phpBB 3.2.4 because they added these disgusting symbiotic HTML/BBCode inbreed cripple tags.

My question will there be any update soon, is this even on your radar?
 

Chris D

XenForo developer
Staff member
It is the first time I've seen this thread, if I'm honest, as we've mostly been focusing on other priorities related to XF 2.1 (and we're partly still catching up after some time off over Christmas).

For future reference if you ever need a response from a staff member directly, you can submit a ticket from your customer area. You will usually get a response within an hour (depending on volume of tickets and time of day).

I assume you still have a copy of the PhpBB database? If so, do you think you would be able to send a copy to us? If you can zip it up and upload it to your server and submit a ticket with the URL then I'll download it and test locally to see if we need to make any changes to our code.

Hopefully we can get that sorted then you will be able to re-do the import to fix the problem.
 

JoshyPHP

Well-known member
@hibiskus @Chris D For what it's worth, phpBB 3.2.x uses my library s9e/TextFormatter to parse their new posts (anything posted on phpBB 3.1 may retain their old format while they're being converted via a cron job in the background.) The markup you see in those posts isn't HTML, it's XML, the storage format used for posts and other rich text. In order to retrieve the original (plain) text, you can either load the XML in a DOMDocument and read the textContent of its root node, or you can simply remove all XML tags before decoding XML special characters.

For instance, the following XML in the database:
XML:
<r><COLOR color="red"><s>[color=red]</s>red text<e>[/color]</e></COLOR> <EMOJI seq="1f600" tseq="1f600">&#128512;</EMOJI></r>
Will be converted back to this:
PHP:
$xml = '<r><COLOR color="red"><s>[color=red]</s>red text<e>[/color]</e></COLOR> <EMOJI seq="1f600" tseq="1f600">&#128512;</EMOJI></r>';
echo html_entity_decode(strip_tags($xml), ENT_QUOTES, 'UTF-8');
Code:
[color=red]red text[/color] 😀
Feel free to tag my in any relevant discussion if you have any questions.
 

Chris D

XenForo developer
Staff member
Thanks @JoshyPHP.

We actually had code to handle it (though perhaps a little more overengineered than pretty much stripping tags) but there was a bug in the code which pretty much prevented that from running... oops!

We'll look at your much more elegant conversion when we give this some attention when we move the importer over to XF2.

@hibiskus I'll be sending you a PM shortly with the updated files. Performing the import again should resolve the problems you faced.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (1.5.24).

Change log:
Sanitize the BB code in posts before prepending the subject text to the post content. Bonus: add support for bringing in the username from quote attributions.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 

eduvit

New member
It is the first time I've seen this thread, if I'm honest, as we've mostly been focusing on other priorities related to XF 2.1 (and we're partly still catching up after some time off over Christmas).

For future reference if you ever need a response from a staff member directly, you can submit a ticket from your customer area. You will usually get a response within an hour (depending on volume of tickets and time of day).

I assume you still have a copy of the PhpBB database? If so, do you think you would be able to send a copy to us? If you can zip it up and upload it to your server and submit a ticket with the URL then I'll download it and test locally to see if we need to make any changes to our code.

Hopefully we can get that sorted then you will be able to re-do the import to fix the problem.
Thanks!
 
Top