BBCodes is unexpected removed from post viewing

Get help developing custom BBCodes or request one.
Post Reply
User avatar
scootergrisen
Registered User
Posts: 187
Joined: Thu Aug 25, 2011 2:25 pm
Contact:

BBCodes is unexpected removed from post viewing

Post by scootergrisen » Sat May 05, 2018 9:34 pm

Using phpBB 3.2.1

I have unexpected behavior with BBCode and posts using BBCode.

I create a BBCode called youtube.

Then i write a post with the following and i see the video in the post:

Code: Select all

[youtube]https://www.youtube.com/watch?v=XXXXXXXXXXX[/youtube]
Then i delete the BBCode in ACP.

Then i write a new post with the same as before:

Code: Select all

[youtube]https://www.youtube.com/watch?v=XXXXXXXXXXX[/youtube]
I now expect to see two post with the same:

Code: Select all

[youtube]https://www.youtube.com/watch?v=XXXXXXXXXXX[/youtube]

Code: Select all

[youtube]https://www.youtube.com/watch?v=XXXXXXXXXXX[/youtube]
But instead i see:

Code: Select all

https://www.youtube.com/watch?v=XXXXXXXXXXX

Code: Select all

[youtube]https://www.youtube.com/watch?v=XXXXXXXXXXX[/youtube]
So the first post (from when the BBCode called youtube existed in ACP) have [youtube] and [/youtube] removed for some reason when the post is viewed.

If i edit the posts they are the same (both have [youtube] and [/youtube]).

It seems like the first post have information that the BBCode called youtube existed at that time and then the tags are removed.
What causes this and how can i avoid it?
I dont want [youtube] and [/youtube] to be removed.

rxu
Extensions Development Team
Posts: 2866
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by rxu » Sun May 06, 2018 4:24 am

That is because the 1st post was parsed and saved to the database with existing bbcode, unlike the 2nd one.
When you edit the 1st one after the BBCode had been deleted, it's got reparsed and saved just like the 2nd one.

If you do things like that and want posts to be looking the same, you'll have to reparse old/all posts after creating/editing/deleting custom BBCode.

User avatar
scootergrisen
Registered User
Posts: 187
Joined: Thu Aug 25, 2011 2:25 pm
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by scootergrisen » Sun May 06, 2018 9:39 pm

How do i reparse the entire board?

User avatar
david63
Jr. Extension Validator
Posts: 14945
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by david63 » Mon May 07, 2018 7:20 am

scootergrisen wrote:
Sun May 06, 2018 9:39 pm
How do i reparse the entire board?
I believe you will need to use CLI
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
scootergrisen
Registered User
Posts: 187
Joined: Thu Aug 25, 2011 2:25 pm
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by scootergrisen » Mon May 07, 2018 9:26 pm

What commando can i run to reparse?

Its annoying because i have phpBB Media Embed PlugIn extension installed and that parses URLs even when they are not inside [media] and [/media] and it cant be turned off.

So it parses the URLs inside [youtube] and [/youtube] and now that i have removed the youtube BBCode in ACP, phpBB Media Embed PlugIn tries to parse the URLs but it fails.

User avatar
3Di
Registered User
Posts: 12999
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by 3Di » Mon May 07, 2018 9:29 pm

The answer is in the search facility, has been discussed to death.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate

:game_die: The new Dice Roller extension for phpBB 3.2 is out! :game_die:

Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

rxu
Extensions Development Team
Posts: 2866
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: BBCodes is unexpected removed from post viewing

Post by rxu » Tue May 08, 2018 1:49 pm

From the board root:

Code: Select all

php ./bin/phpbbcli.php reparser:reparse

Post Reply

Return to “Custom BBCode Development and Requests”

Who is online

Users browsing this forum: Yandex [Bot] and 10 guests