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

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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?
Attachments
new error
old error
Last edited by Mick on Mon Mar 12, 2018 12:29 pm, edited 1 time in total.
„Only a life lived for others is a life worthwhile.“[A. Einstein]
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

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

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 )
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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?
Last edited by Electrix on Mon Mar 12, 2018 1:38 pm, edited 2 times in total.
„Only a life lived for others is a life worthwhile.“[A. Einstein]
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

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

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
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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?
Last edited by Electrix on Mon Mar 12, 2018 5:44 pm, edited 3 times in total.
„Only a life lived for others is a life worthwhile.“[A. Einstein]
GanstaZ
Registered User
Posts: 804
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

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.
"When answer lies in the question,.. question becomes redundant!"
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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!
„Only a life lived for others is a life worthwhile.“[A. Einstein]
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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.
„Only a life lived for others is a life worthwhile.“[A. Einstein]
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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?
„Only a life lived for others is a life worthwhile.“[A. Einstein]
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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 .
„Only a life lived for others is a life worthwhile.“[A. Einstein]
stevemaury
Support Team Member
Posts: 51681
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

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

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.

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Electrix
Registered User
Posts: 41
Joined: Mon Apr 13, 2015 10:21 am
Location: Czech Republic

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

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 841 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?
„Only a life lived for others is a life worthwhile.“[A. Einstein]
GanstaZ
Registered User
Posts: 804
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

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

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))
"When answer lies in the question,.. question becomes redundant!"