I’m now getting the following error when I try to install/upgrade some modules, notably “core” v13.0.9 and “recordings” v13.0.4 :-
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘helptext’ in ‘field list’
I’m relatively inexperienced in this stuff, but it looked like a possible corrupt table in some database so I ran > mysqlcheck -u root --check --auto-repair --all-databases but it hasn’t solved the problem.
I have a feeling I shouldn’t be on this distro at all - probably should have stayed at 6.12.65-31?
Anyway I’d really appreciate any help on this - if any more information on my install/setup etc would be helpful just let me know.
The table is not corrupt, it has fields missing as if not all the upgrade scripts has been run…
I have never upgraded from so many versions but it looks like you would need to run all the scripts from the page you posted and also all the script from all the other similar pages until you get to the version you want.
If you only ran the scripts on that page it’s not enough…
As for the distro version FreePBX 13 will very soon be stable so it’s ok to be on that version…
Thanks a lot for your reply Marbled, I did indeed run all upgrade scripts from the linked page, plus all upgrade scripts from the other pages sequentially right up to the latest. I should have clarified this in the oringial post.
I didn’t think I missed any, but I guess it’s possible! Is there any way I can check to see if I missed any?
Or is there any way to fix this problem, other than a clean install? Really don’t want to have to do that!!
It looks like these scripts log under /var/log/pbx/upgrade so I guess you could theorically find which one was not run…
However, I am pretty sure that running them out of sequence is seriously asking for trouble, you could partially revert some database fields to their previous definitions, corrupt the content of other fields, etc…
Your system would most likely be quite confused as to the version of the distro it is running too…
If you could find which script was not run I guess some part of it could manually be run but I would not try to run the script in its entirety…
That said, I once reported a problem with a similar update, maybe you run all scripts and there is a very localized problem with one of the updates.
Maybe adding that field manually could work or If you could figure out what table is implicated and if it is not a mandatory module you could uninstall it and reinstall it again so that it would recreate the table correctly…
Of course, it might most likely mean reconfiguring some stuff…
Let’s hope one of the FreePBX devs like @tm1000 pops up here and has a better suggestion…
Ok, so I added the helptext column to the featurecodes table, ran fwconsole chown and then fwconsole ma install core, which spat me out this little beauty :-
Module core successfully installed
Wahey!
I then went in and upgraded all other modules, which seemed to go smoothly. The dashboard module had been disabled up until now, because it depended on core. It’s now enabled and I get this error instead of the dashboard view :-
SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘signature’ in ‘field list’
Do you know which table the signature field should be in? Hopefully I can just add it like I did helptext
I have a feeling this could be a trend though, is there any way I can check for missing columns without having to wait until they pop up in errors like this?
Thanks again for your help so far, Nick, I really appreciate it!
Please file bugs when you find these. No one else has seen or reported this so it may just be an edge case. Edge cases are almost impossible to reproduce but if there is something obvious in the code we should be able to correct it. be sure to include your errors in any bug reports.
I don’t know if there is a way to globally check for those, sorry…
You are right, there could be a few others as well and they might not be properly initialized if they are not added by the script/code which is supposed to add them.
As for signature, it’s apparently part of two tables…
These are the definitions of those two tables… You might want to check if it’s only those fields or if additional fields from those tables could be missing:
mysql> desc modules;
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| modulename | varchar(50) | NO | | | |
| version | varchar(20) | NO | | | |
| enabled | tinyint(4) | NO | | 0 | |
| signature | blob | YES | | NULL | |
+------------+-------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
mysql> desc restapi_log_events;
+-----------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| time | int(11) | YES | MUL | NULL | |
| token | varchar(75) | YES | MUL | NULL | |
| signature | varchar(150) | YES | | NULL | |
| ip | varchar(20) | YES | | NULL | |
| server | varchar(75) | YES | | NULL | |
+-----------+--------------+------+-----+---------+----------------+
6 rows in set (0.00 sec)
Sorry for the delayed reply, I had to wait for my lunch break…
Thanks Nick, I don’t have the restapi_log_events table at all (think I should add it?) but I added signature to modules, restarted mysql and I don’t get that error anymore, but the onion keeps peeling!
Reload failed because retrieve_conf encountered an error: 1
exit: 1
Exception: Tried to investigate file /var/www/html/admin/modules/faxpro/Faxpro.class.php, and can’t tell if it’s obfs or licenced (’
') in file /var/www/html/admin/modules/sysadmin/functions.inc/Schmooze.class.php on line 74
Stack trace:
None of the commands you are providing are going to help. There are serious errors in this install and I think you are just at the tip of the iceberg.
At this point I suggest A) reinstall or B) restore from backup and try again
Seriously if you continue down this road it’s just going to get worse. The upgrade scripts are fine. During upgrade your system completely skipped the 10 Framework upgrade scripts
EG
and
There’s many more of these. But it’s too late to get freepbx to run them at this point.
If you ran all of the scripts in Order then I doubt it was you but going from 1 to 6 without skipping any. You have more will power than I. I am wondering if you skipped going to 12 and went from 11 to 13 which would have caused this issue.
You can try running these two lines in mysql yourself, but you are missing other scripts too.:
ALTER TABLE `featurecodes` ADD COLUMN `helptext` varchar (250) NOT NULL AFTER `description`
ALTER TABLE `modules` ADD COLUMN `signature` BLOB NULL AFTER `enabled`