Good morning,
today I updated ad usual the software to the latest one available.
When it has been the time of upgrading the db,
I receive this fatal error:
[code: Installer Installer::installDefaultNavigationMenus]
WARNING: The NavigationMenu (ContextId: 1, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 1, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.
WARNING: The NavigationMenu (ContextId: 0, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.
The error means that in the database, review_round_files table during upgrade has values in submission_file_id that don’t correspond to the values in submission_files table, submission_file_id column.
SELECT submission_file_id FROM review_round_files LEFT JOIN submission_files USING (submission_file_id) WHERE submission_files.submission_file_id IS NULL
Errors occurred during installation
A database error has occurred: SQLSTATE[HY000] [1049] Unknown database ‘ojs33’ (SQL: create table announcement_types (type_id bigint not null auto_increment primary key, assoc_type smallint not null, assoc_id bigint not null) default character set utf8 collate ‘utf8_general_ci’)
Okay. I tried that and it works. Thanks. Much appreciated. I tried to understand why I made this obvious mistake. What I see is that PKP has removed from the webinstall page the standard option to (automatically) create a database. That’s fine. But perhaps you could then add a note to the installation instructions that a database should be created first.
Extract the OJS archive
Make the following files and directories (and their contents) writeable
Create a directory to store uploaded files
Create a SQL database
Open a web browser and follow the on-screen installation instructions.
Dear Vitaliy, sorry for my late answer but I missed notifications.
That is not my case, in fact the SQL command above return me an empty set.
I also tried to do manually:
I don’t know if the fact to have used only 1 parenthesis at the end could guide to something, because first of all I tried to copy and paste from the original error in which it seems to use double. In this case I received a syntax error when running from console.
Server: MySQL (Localhost via UNIX socket)
Server type: MariaDB
Server version: 5.5.68-MariaDB - MariaDB Server
Protocol version: 10
Server encoding: UTF-8 Unicode (utf8)
Go to phpMyAdmin (or MySQL workbench or whatever database manager you’re using)
Open your OJS database
Click and open the submission_files table. If you’re using phMyAdmin, all of your tables should be listed as soon as you open your OJS database, so scroll down and click submission_files.
In the top menu, click Operations.
In the middle of the page, you’ll see Table Options. Choose InnoDB in the drop down menu for Storage Engine and click the GO button beneath.
It might also help to do the following:
go to the landing page for phpMyAdmin without any databases selected
Click Variables in the top menu
Search for engine in the search box
Edit the default storage engine so its InnoDB and not MyISAM
The Storage Engine entry will change to InnoDB as well, but you can edit that too.
I’m trying to upgrade to 3.3.0-3, which appears to have all the patches installed already.
Upgrade still fails on my wampserver. I’m not going to try this on my main web host till I can get it to work on my test server.
[08-Feb-2021 18:14:50 UTC] PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in C:\wamp64\www\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Capsule\Manager.php:74
Stack trace: #0 C:\wamp64\www\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Capsule\Manager.php(200): Illuminate\Database\Capsule\Manager::connection() #1 C:\wamp64\www\ojs\lib\pkp\classes\db\DAO.inc.php(65): Illuminate\Database\Capsule\Manager::_callStatic(‘raw’, Array) #2 C:\wamp64\www\ojs\lib\pkp\classes\plugins\PluginSettingsDAO.inc.php(106): DAO->retrieve('SELECT setting…’, Array) #3 C:\wamp64\www\ojs\lib\pkp\classes\plugins\PluginSettingsDAO.inc.php(86): PluginSettingsDAO->getPluginSettings(‘0’, ‘announcementfee…’) #4 C:\wamp64\www\ojs\lib\pkp\classes\cache\GenericCache.inc.php(63): PluginSettingsDAO->_cacheMiss(Object(FileCache), ‘enabled’) #5 C:\wamp64\www\ojs\lib\pkp\classes\plugins\PluginSettingsDAO.inc.php(57): GenericCache->get(‘enabled’) #6 C:\wamp64\www\ojs\lib\pkp\classes\plugins\Plugin.inc.php(463): P in C:\wamp64\www\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Capsule\Manager.php on line 74
I even downloaded the OJS database, changed all MyISAM text to InnoDB, uploaded that, and the same error is logged. So there’s more to the update fails than just altering one or all tables to InnoDB.
Finally updated this site on wampserver. Not sure if switching every table to InnoDB is necessary. You’ll have to try just switching the submission_file table and then all of them if it isn’t enough.
Thanks for continuing to document your progress – I hope it’s helpful to others!
Regarding your uncertainty:
Not sure if switching every table to InnoDB is necessary.
Previous to OJS 3.3, we didn’t formally declare any FOREIGN KEY relationships between database tables. We will be continuing to add formal declarations of these as part of issue #6093 – it helps detect database inconsistencies and will allow us to tighten up our code over the long term, plus it will allow us to produce database diagrams and self-documentation using tools like the excellent SchemaSpy. So over the next several releases we’ll be adding more of these FOREIGN KEY constraints, where 3.3 only added them to one or two tables.
However, we’ll be looking into the reason that you’re seeing these Cannot add foreign key constraint messages, and will try to figure out a way that won’t require the manual change of storage engines. Watch for some news on that.
Regards,
Alec Smecher
Public Knowledge Project Team
Have the same PHP log error
PHP Fatal error: Uncaught Error: Call to a member function getConnection() on null in … public_html/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74
I tried every step you made
Any Ideas?
I’m tring to upgrade from 3.2.1.3 to 3.3.0.3