Can't fix Invalid use of NULL value upon upgrade

Naz

XenForo developer
Staff member
Affected version
2.0.0
Code:
Running upgrade to 2.0.0 Alpha, step 1... done.
Running upgrade to 2.0.0 Alpha, step 2... done.
Running upgrade to 2.0.0 Alpha, step 3... done.
Running upgrade to 2.0.0 Alpha, step 4... done.
Running upgrade to 2.0.0 Alpha, step 5... done.
Running upgrade to 2.0.0 Alpha, step 6... done.
Running upgrade to 2.0.0 Alpha, step 7... done.
Running upgrade to 2.0.0 Alpha, step 8...
                                                      
  [XF\Db\Exception]                                   
  MySQL query error [1138]: Invalid use of NULL value
 
Does your xf_conversation_message table already have a like_users field, perhaps from another add-on?
 
That would explain it. Thought I'd made sure table-wise everything was sound but apparently missed that one. :D

Thanks!
 
Just to clarify, was this from an add-on, or were you doing some manual table manipulations?
 
Just to clarify, was this from an add-on, or were you doing some manual table manipulations?
From an add-on. I thought I'd checked beforehand to make sure there weren't going to be any column name clashes but i'd missed the xf_conversation_message table so mistakenly thought it was a core issue. :)
 
So if we have this addon, what has to be done prior to attempting an upgrade? Just removing the addon, or does a table have to be edited / column deleted?
 
Looks like it will be a simple case of upgrading it to a soon to be released version before carrying out the upgrade.
 
So if we have this addon, what has to be done prior to attempting an upgrade? Just removing the addon, or does a table have to be edited / column deleted?
There'll probably be an update out for it which will rename the conflicting column name for XF1 users, most likely.
 
googles "pull request" :rolleyes:
Most of Xon's add-ons are open source and available in code repositories for anyone to download and anyone to contribute back.

A pull request is when someone proposes changes to a repository (i.e. contributing fixes or features for an add-on).
 
I was using "`like_users` blob DEFAULT NULL," so disabling the add-on doesn't break XF1 conversations. I guess I'll just rename it away, and in the XF2 version drop those columns.
 
Just never use unprefixed tables or columns. They’re not fun come upgrade time.
I do that now, but this was one of my first add-ons. I think I've got a fix for it done, just need to test the upgrade process to make sure I got it :)

(restoring a 6gb gz compressed sql file to my dev environment is paaaainful)
 
Top Bottom