Repository navigation
Keep BBCode when articles are reparsed - #42
Merged
Merged
Conversation
The reparser guessed from the stored text whether an article used BBCode, and for text stored as XML without a bbcode_uid it guessed no, so reparsing turned every [b], [list] and [url] into plain text. The wiki always saves with BBCode, smilies and links on, so the plugin now says so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reparsing wiki articles turned their BBCode into plain text.
What went wrong.
php bin/phpbbcli.php reparser:reparse phpbbmodders_wiki_articlerebuilds each article from its stored text. The wiki table has no column saying whether BBCode was on, so phpBB core guesses from the text, and for XML text with nobbcode_uidit guesses no. Every[b],[list]and[url]in an article then came back as plain text, while[[links]]and[[File:]]survived because the wiki's own tags are added separately. The README and the #40 text tell people to run this command after upgrading, so anyone who did may have unformatted articles.The fix. The wiki always saves articles with BBCode, smilies and links on (see
wiki/edit.php), so the reparser plugin now says so instead of leaving core to guess. Affected articles are repaired by running the same command again once this is installed: the stored text still contains the tags, and reparsing now turns them back into BBCode. I confirmed that on a board where it had happened.Tests
article_reparser_test.php: it fails without the change and passes with it. Unit suite: 126 tests, 265 assertions, all pass.Investigated and written by Claude on behalf of William Jacoby (bonelifer).