[SOLVED] Unable to upgrade to 3.1.0

Hi,

This post is not a duplicate of 3.0.2 to 3.1.0 upgrade error although the symptoms are the same. Before upgrade I get the error:

DB Error: Table ‘ojs_db.navigation_menus’ doesn’t exist

When I upgrade from 2.x to 3.0.2 everything works like a charm.
When I upgrade from 3.0.2 to 3.1.0, nothing happens and I get the same error talking about the navigation_menus missing table.

I double check the UPGRADE file and I triple check the “installed=Off” variable in my config but the command line upgrade give no clue about the issue. I few miliseconds after I press enter, I get my prompt again with no info about why upgrade.php refuses to do the job.

No info in the logs and, as the error says, no navigation_menus tables in the DB.

Thanks in advance for your help,
m.

this error might appear when upgrading over a database that has been already upgraded, maybe a failed upgrade. Ensure you restored a fresh version of your database before trying to upgrade again…

1 Like

Probably you are right, but then I don’t understand why the upgrade from 2.4.5 to 3.0.2 give us a full functional OJS…

I will try directly from 2.4.5 (with original db and files) to 3.1.0 to see what happens.

It’s only navigation_menus table or it’s just the tip of the iceberg showing that the DB is unusable?

Cheers,
m.

probably the tip of the iceberg

think this approach is better, maybe the upgrade script isn’t dealing well with intermediary versions

Hi all,

See also Installation page depends on navigation menu tables, which may not exist · Issue #2988 · pkp/pkp-lib · GitHub.

Regards,
Alec Smecher
Public Knowledge Project Team

@marc, have you tried upgrading the database via command-line, or only via the browser?

I saw this same problem in my browser when I was partly through an upgrade to 3.1.0, but running php tools/upgrade.php upgrade on the command-line worked just fine.

I tried 3-4 times from command line, and 1-2 from browser.
I checked this with different combinations of installed=On/Off and file migrated without migration.

Now I working in a 2.4.5 to 3.1 direct migration (with installed=off, original files and from browser) to see what happens.

Same results. From 2.4.5:

  • Migration to 3.1.0 fails as explained
  • Then I try to migrate to 3.0.2 and everything works fine.

Process followed:

  1. OJS 3.1.0 code pulled from github (git + composer: same way I did with 3.0.2)
  2. Modify former config.inc.php with “installed=Off”
  3. Checking from command-line with “php tools/upgrade.php” check works fine.
  4. Upgrading with command-line “php tools/upgrade upgrade” fails in a millisecond, with no feedback.

Stack:

  • Linux: Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64
  • MySQL: mysqlnd 5.0.11-dev - 20120503
  • Apache: Apache/2.4.10 (Debian)
  • PHP: 5.6.31

I can’t see any relevant info in logs. :frowning:

Hummm… I think the problem is in my /plugins folder.

OJS 3.1 include new plugins and I didn’t ugrade properly this folder.

Tomorrow I will check it again.

Thanks for your help,
m.

Hi @marc,

Note also that when working with a checkout from github there are new node.js dependencies. These will need to be built (they are pre-built in the .tar.gz release). OJS 3.1.0 is the first release that requires this. https://pkp.sfu.ca/wiki/index.php?title=Github_Documentation_for_PKP_Contributors#Install_Node_dependencies

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Ok. That was also involved. :slight_smile:

Seams to me that getting code from tarballs is easier than from git, isn’t it?
I mean, official tarballs are “download and run”… while getting code from github needs pull, composer and node.js…

If you don’t see any trouble, I will update Dockerfiles to work with official tarballs.

Cheers,
m.

With official tarballs all worked like a charm. :ok_hand:

So, in short: was my fault. :wink:

Dockerfiles here:
https://hub.docker.com/r/marcbria/docker-pkp-ojs

Confirmed to work 2.4.5, 3.0.2 and 3.1.0.

Thanks for your help,
m.

I’m following collateral conversations in this forums and I have doubts about the decision of working with official tarballs.

@asmecher which option do you prefer for the Dockerfiles:

  1. Pulling from github?
  2. Downloading the official tarball?

Git offers better support for patches, isn’t it?
Right now I have Dockerfiles working for 2.4.5, 2.4.8, 3.0.2 and 3.1.0 from the official tarballs but I don’t mind to move again to git if there are benefits.

Cheers,
m.

Hi @marc,

I think containerized installs will be useful for managing groups of installations, and there’s definite benefit there for supporting git use from the stable branches for the sake of patching. To use a git checkout you’ll need to install Composer dependencies but also build the Javascript package using NPM – see this wiki page for details. I’m not sure how complicated that latter one would be for Docker.

See also @axfelix’s Docker config at GitHub - axfelix/ojs-docker: OJS Docker Container.

Regards,
Alec Smecher
Public Knowledge Project Team

2 Likes

Dear @asmecher,
I still have the problem with upgrade. When put show_stacktrace = On I received>
DB Error: Table ‘ijcadsee_302.navigation_menus’ doesn’t exist
Stack Trace:
File: /home/ijcadsee/public_html/lib/pkp/classes/navigationMenu/NavigationMenuDAO.inc.php line 62
Function: DAO->retrieve(“SELECT * FROM navigation_menus WHERE context_id = ?”, Array(1))

File: /home/ijcadsee/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php line 286
Function: NavigationMenuDAO->getByContextId(“1”, Null)

File: /home/ijcadsee/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php line 909
Function: PKPTemplateManager->initialize()

File: /home/ijcadsee/public_html/lib/pkp/classes/handler/PKPHandler.inc.php line 439
Function: PKPTemplateManager::getManager(Object(Request))

File: /home/ijcadsee/public_html/lib/pkp/pages/install/InstallHandler.inc.php line 115
Function: PKPHandler->setupTemplate(Object(Request))

File: /home/ijcadsee/public_html/lib/pkp/pages/install/InstallHandler.inc.php line 33
Function: InstallHandler->setupTemplate(Object(Request))

File: (unknown) line (unknown)
Function: InstallHandler->index(Array(0), Object(Request))

File: /home/ijcadsee/public_html/lib/pkp/classes/core/PKPRouter.inc.php line 372
Function: call_user_func(Array(2), Array(0), Object(Request))

File: /home/ijcadsee/public_html/lib/pkp/classes/core/PKPPageRouter.inc.php line 233
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)

File: /home/ijcadsee/public_html/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))

File: /home/ijcadsee/public_html/lib/pkp/classes/core/PKPApplication.inc.php line 243
Function: Dispatcher->dispatch(Object(Request))

File: /home/ijcadsee/public_html/index.php line 68
Function: PKPApplication->execute()

Do you have an idea what to do?

Regards,
Lazar

Hi @Lazar_Stosic,

I suspect the upgrade script did not run or did not finish. Do you have the output from that process?

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher,
I am not sure on what process you mean. I receive the same error. I manually worked to add new links to main navigation menu and nothing else. Uploaded older database but received the same. Tried a few times but nothing. Read forums but cannot solve the problem.

Hi @Lazar_Stosic,

Did you load an old OJS database into a newer version of the software and try to use it without running the upgrade script? That won’t work – see docs/UPGRADE for upgrade instructions.

Regards,
Alec Smecher
Public Knowledge Project Team

I have got OJS 3.0.1 and try to upgrade it to the 3.1 and received this error. I try with database which I made after installed new OJS 3.0.1 but received the same error. With actual database and the first database which I made as backup I received the same error and now don`t have idea how to upgrade the OJS.
Do I have some other options which I can do?
Regards,
Lazar

Hi @Lazar_Stosic,

Are you sure you received a confirmation that the upgrade completed successfully? The navigation_menus table should have been added by the upgrade process; if it’s not there, I suspect the upgrade didn’t complete.

Regards,
Alec Smecher
Public Knowledge Project Team