Converting from NodeBB: reformatter removes image tags

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
trockner
Registered User
Posts: 15
Joined: Sun Jan 27, 2019 6:23 pm

Converting from NodeBB: reformatter removes image tags

Post by trockner »

Hello,

I am in the process to migrate from a NodeBB forum to phpbb. So far I got everything working but one thing:
the XML reformatter removes all IMG tags for no apparent reason.

My posts are in HTML format, I insert them as is into the phpbb_posts.post_text field. As long as I don't process them any further, they render fine in a browser.

However, I figured that phpbb uses its own internal post_text XML format and that there's a tool one can use to migrate from imported earlier formats into that XML format.

I executed it like this:

Code: Select all

php bin/phpbbcli.php reparser:reparse --ansi
It ran fine without any errors showing a green OK box in the end.

Now if I look at my post_text's, I see that any IMG tags have been completely removed.

Here's an example. Before reformat:

Code: Select all

<p>trotz Riss sieht es super aus.....und wirkt irre fluffig <img src="/legacy/emoji/1f60d.png"  title=":heart_eyes:" alt="img" />
</p>
After reformat:

Code: Select all

<t>trotz Riss sieht es super aus.....und wirkt irre fluffig <br/>
</t>
All images have been removed. What now? Shall I just not execute the reformatter? Or is there something I can do in preparation of the INSERT's to avoid this?

I am using the latest version 3.2. I wrote the converter myself.


Thanks in advance,
Tom
trockner
Registered User
Posts: 15
Joined: Sun Jan 27, 2019 6:23 pm

Re: Converting from NodeBB: reformatter removes image tags

Post by trockner »

Solved it myself.

I changed two things:

1) I converted all <p> tags to <r>.

2) I changed the generator so that it puts out image tags like this:

Code: Select all

<IMG src="/legacy/emoji/1f602.png"><s>[img]</s>/legacy/emoji/1f602.png<e>[/img]</e></IMG>
And I added the field bbcode_uid and set it to 'uoja'.

Now I can run the reformatter and the images remain in the post_text's AND are visible.


However, thank for the great software!


best,
Tom

Return to “[3.2.x] Convertors”