Error Accessing an Extension After updating to 3.1.1-1

After updating to Ver 3.1.1-1 when accessing an extension thru the GUI I get the following error
Error

Fatal error: Uncaught TypeError: Argument 1 passed to vitalpbx\query::select() must be an instance of vitalpbx\schema, null given, called in /usr/share/vitalpbx/www/modules/extensions/ContactInfo.php on line 0 and defined in /usr/share/vitalpbx/www/includes/query.php:0 Stack trace: #0 /usr/share/vitalpbx/www/modules/extensions/ContactInfo.php(0): vitalpbx\query::select(NULL) #1 /usr/share/vitalpbx/www/modules/extensions/Models/Extension.php(0): modules\extensions\ContactInfo::getByExtension(41) #2 /usr/share/vitalpbx/www/modules/extensions/extensions.php(0): modules\extensions\Models\Extension->getContactInfo() #3 /usr/share/vitalpbx/www/modules/extensions/extensions.php(0): modules\extensions\extensions->read(‘41’, NULL, Array) #4 /usr/share/vitalpbx/www/includes/app/Core.php(0): modules\extensions\extensions->getContent() #5 /usr/share/vitalpbx/www/includes/app/Core.php(0): app\Core->loadModuleAction(’\modules\extens…’, ‘getContent’) #6 /usr/share/vitalpbx/www/includes/app/Core.php(0): app\Core->_loadModule() #7 /us in /usr/share/vitalpbx/www/includes/query.php on line 0

It seems the migrations were not applied correctly.

You can try applying the migrations manually.
/usr/share/vitalpbx/scripts/apply_migrations

I get this error when applying patches
Importing 20200929.2.cdr_did.sql…
PHP Fatal error: Uncaught Exception: ERROR 1060 (42S21) at line 4: Duplicate column name ‘did’
in /usr/share/vitalpbx/scripts/apply_migrations:0
Stack trace:
#0 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->shellcmd(’/bin/bash -c se…’)
#1 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->import_dbscript(‘20200929.2.cdr_…’, ‘/usr/share/vita…’)
#2 /usr/share/vitalpbx/scripts/apply_migrations(0): patcher->apply(‘migrations’)
#3 {main}
thrown in /usr/share/vitalpbx/scripts/apply_migrations on line 0

@dannylarsen

Execute the command below in the Linux console

mysql -uroot ombutel -e"insert into ombu_patches(filename) values ('20200929.2.cdr_did.sql')"

Then execute the same script again
/usr/share/vitalpbx/scripts/apply_migrations

I added the first but got another error so I added the following and it looks good now
Thank you very much !!!
mysql -uroot ombutel -e"insert into ombu_patches(filename) values (‘20210610.1.recording_code.sql’)"

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.