Page 1 of 1

### Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 12:21 pm
My initial post in reply to "Error updating 3.2.0 -> 3.2.2 The installer detected a timeout":
Got the same problem when upgrading from 3.2.1 to 3.2.2. I've already tried those 3 fixes from here* and changing $dbms in config to mysqli with no effect. Normally I'm using "automatic update" package, although my board has no changes to the core files (I like to see event changes in prosilver, so I can reflect them in my own style). This time it failed (asking to replace phpbb/content_visibility.php over and over), so I downloaded "full package" as suggested. What I'm trying to do is update database only. I have followed these instructions step by step until #9. As you can see, my error looks exactly the same: The errors reported is: Code: Select all [Mon Mar 12 12:22:33.820162 2018] [:error] [pid 16644:tid 1980] [client ::1:52511] PHP Fatal error: Call to a member function get() on null in forum\\install\\update\\new\\phpbb\\db\\migration\\data\\v32x\\merge_duplicate_bbcodes.php on line 49, referer: forum/install/app.php/update Edit - found a fix: An hour later: Lesson learned. I should always pay attention to whole error report, not just the message and filename. The problem was caused by leftover files in /install folder. Appearently, the tutorial for full upgrade doesn't mention, it should also be cleared of any old content (room for improvement?). The original "automatic update" version also had file merge_duplicate_bbcodes.php (in old and new folders). So I deleted it and uploaded only content from "full package". This fixed "The installer detected timeout" error. Or maybe not... But a new error appeared. Maybe I should make a separate topic for that? Not sure, if these two are connected... This seems to be an error message from vendor\s9e\text-formatter\src\Plugins\BBCodes\Configurator\BBCodeMonkey.php: Code: Select all protected function addAttributes(array$definitions, BBCode $bbcode, Tag$tag)
{
$composites = [];$table = [];
foreach ($definitions as$_e874cdc7)
{
list($attrName,$definition) = $_e874cdc7; if (!isset($bbcode->defaultAttribute))
$bbcode->defaultAttribute =$attrName;
$tokens =$this->parseTokens($definition); if (empty($tokens))
throw new RuntimeException('No valid tokens found in ' . $attrName . "'s definition " .$definition);
// Is this it?
Is something wrong with my BBCode definitions? Or is there something wrong with new version of textFormatter? I'm running out of clues here. Any suggestions?

Edit - conflicting bbcodes:
Seems like this is completely separate issue. There are two similar BBCodes on my board:
And merge_duplicate_bbcodes.php is trying to somehow merge them, but fails? Can I do that manually? I'm still missing some simple manual for writing custom BBCodes in 3.2.x. There are some docs for s9e/textFormatter out there, but they seem a little overkill. Probably should give it a try in the meantime.

Edit - attachments on this board seem to be broken:
Just a quick note: Every time I edit a post with multiple attachments, these attachments (except one) disappear and I have to upload them again. Am I the only one having this issue? Where should I report it?

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:07 pm
Electrix wrote:
Mon Mar 12, 2018 12:21 pm
Edit - attachments on this board seem to be broken:
Just a quick note: Every time I edit a post with multiple attachments, these attachments (except one) disappear and I have to upload them again. Am I the only one having this issue? Where should I report it?
This is already known, the solution can be found here: viewtopic.php?f=556&t=2453611 (always a good idea to read the well hidden sticky topics )

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:10 pm
canonknipser wrote:
Mon Mar 12, 2018 1:07 pm
This is already known, the solution can be found here: viewtopic.php?f=556&t=2453611 (always a good idea to read the well hidden sticky topics )
But I did read that topic. I wasn't talking about my board of course. My board is currenty down, because I can't proceed with update (see above). I was talking about this board (phpbb.com). I don't know, if there is connection between this bug and what happens on this board (phpbb.com). But shouldn't it be fixed especially on this board (phpbb.com), if the solution is already known?

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:15 pm
Ah, sorry, misunderstood that - I think it's known here already, but as this board is afaik running a vanilla phpBB version just with a different style, the website maintainers are waitung for 3.2.3 (as we all do )

But feel free to report it in the website tracker: https://tracker.phpbb.com/projects/WEBS ... openissues

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:38 pm
Look, I didn't want to be offensive to anyone and especially anyone trying to help me. Truly sorry about that. It is just...I'm growing sick of these problems every time I try to upgrade phpBB. Every time someone comes up with "read this" and "read that", or even "oh, you still haven't read that?". I'm fine with reading. But shouldn't all the important informations like that be gathered in one place? Shouldn't I see at least a BIG RED NOTICE - UPDATE ISN'T WORKING UNLESS YOU CHANGE THESE LINES..., when downloading update package? It is 2018 for Christ's sake, not 1995.

Since 3.2.x I've faced nothing but troubles, filled numerous reports, to which nobody responded and/or cared about. Ok, now I'm overreacting...but after almost a year, my board is still affected by those errors. When 3.2 came out I really thought upgrading from 3.1.x is a nice idea (emoji, fontawesome, quotes, ...). Now I regret that decision. I started using phpBB in 2012 and to be honest, this is the first time in these 6 years I'm seriously thinking about its alternatives. And I don't want that, because I like the idea of open source software and phpBB's community. I'm just not sure if I can afford to lose this much time any longer.
Uh-oh. I apologize for offtopic.

So...yeah. I'll probably fill in another error report and wait 5 thousand years to get noticed. Or I can solve it myself by spending few hours digging in a code and finally modifying core like I did in 3.0.x. Which is fine until next update, right?

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:45 pm
There is a solution, but it's manual fix and not auto. Updating something is as hard as one makes it to be. Always keep a previous version & latest backup, then use full pack to update. If there are some errors like in 3.2.2, then fix manually if required. That's why having development/testing environment on a local machine is as good as morning coffee)

PS. If you give up, there's no hope! Never give up! All written above is a must if you want to to learn or just to be informed.

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 1:55 pm
GanstaZ wrote:
Mon Mar 12, 2018 1:45 pm
Always keep a previous version & latest backup, then use full pack to update. If there are some errors like in 3.2.2, then fix manually if required. That's why having development/testing environment on a local machine is as good as morning coffee)
Yeah, I rolled back to v3.2.1 backups in the meantime. I usually use testing enviroment only for bigger updates. I didn't expect problem of this magnitude in security release, which is completely my fault and I admit this. But I did it only to save a little time.

Anyway, thank you for positive reply!

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 2:52 pm
Just a quick update:
The reason for second error is indeed a BBCode definition. There are two definitions for table BBcode, one of them with argument and one without it. If I delete one of those codes from database, the installation finishes without any error.

Guess I'll need to find some way to merge those two manually, since the automatic process failed and I want to keep them both.

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Mon Mar 12, 2018 5:38 pm
Another update:
Finally got a partial solution - deleted all "table" bbcodes and added following one:

Code: Select all

[table={PARSE=/(?<align>\w+)/} align={CHOICE=left,center,right;optional;defaultValue=inherit}]{TEXT}[/table]

Code: Select all

<table class="inpost" style="text-align: {CHOICE}">{TEXT}</table>
In phpBB 3.2.2 this seems to work fine ([table=center] has centered text). But in phpBB 3.2.1 both [table=center] and plain [table] result in HTML <table class="inpost" style="text-align: inherit">. The behavior is only consistent when the parameter is entered via its full name ([table align=center]). Does anyone know why? Is this a bug or defined behavior? Is the behavior going to change every time the phpBB or textFormatter is updated?

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Tue Mar 13, 2018 11:37 am
My board is now running on 3.2.2 with the BBcode tweak mentioned above (aplied via 3.2.1 before upgrade), so this problem is kind of solved. With a bit of luck I won't need to rewrite all BBcodes every time new version is released. Let's wait for 3.2.3/3.3.0 and hope for the best.

This topic can be locked .

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Tue Mar 13, 2018 2:01 pm
Entries in the bbcode table are created solely by the user. This table is empty in standard phpBB. If you have some suggestions as to how we can know what entries a user might add to that table, perhaps we can figure out a way to ensure that updates proceed in spite of problems with them.

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Tue Mar 13, 2018 2:26 pm
stevemaury wrote:
Tue Mar 13, 2018 2:01 pm
Entries in the bbcode table are created solely by the user.
Are you implying that my BBCodes were wrong according to 3.2 syntax? Then phpBB software should check input on these fields (probably best option is via textFormatter).
stevemaury wrote:
Tue Mar 13, 2018 2:01 pm
This table is empty in standard phpBB. If you have some suggestions as to how we can know what entries a user might add to that table, perhaps we can figure out a way to ensure that updates proceed in spite of problems with them.
You probably won't like it, but that is what you get when relying on 3rd party software, that doesn't care about backwards compatibility. Look, I'm in no position to lecture you or anyone else, but isn't this a step back since 3.0.x? Of course, the BBCode capabilities have skyrocketed since then, but if I remember it right, most of BBCodes on my board were fine without any changes for 5 years. Then Rhea comes out and in 2 separate minor versions lot of these BBCodes stopped working. I would expect consistent bahavior at least between minor versions. Won't you?

But the problem is not only in backwards compatibility. Have you ever tried to create a bit more advanced BBCode using s9e/textFormatter manual? Simple example out of many:
This is from textFormatter manual
bbcode.png (10.32 KiB) Viewed 844 times
These two should be functionally same, right? Well, they are. Except for the first one doesn't work at all. The BBCode simply doesn't render and plain text is shown. That's weird.

Don't get me wrong, I still believe in phpBB and I highly appreciate the work of devs on it. But this seems like a bad decision to me. There are so many boards using custom BBCodes, you will probably lose count. And you don't need to go far from this topic to see a lot of them are having huge troubles reimplementing them in 3.2. Don't they at least have a right to be angry, when phpBB forces them to rewrite these codes every single update?

### Re: Error updating 3.2.1 -> 3.2.2 - No valid tokens found in table's definition center

Posted: Tue Mar 13, 2018 10:20 pm
A lot of things have changed and will change again in the future. And that's a fact. What worked a year ago, may not work now. As much as i know about bbcodes, a lot of those codes use inline scripts (onklick and so on and on).. This will change as well))