OJS 3.3 - "Create new database" missing

Dear community

I just try to do my first OJS installation. Since I want to use an already existing DB, I would like to skip the creation of a new DB. But I’m missing the documented “Create new database” entry which I could uncheck for my issue.

Screenshot 2021-06-10 at 19-45-01 OJS Installation Open Journal Systems

I tried some 3.2 and some 3.3 versions, includeing the latest one (3.3.0-6).

Any help would be greatly appreciated!

-Mat

meanwhile I did a workaround: I installed into an empty database and then changed the DB in config.inc.php.

when I visit the webpage, I get a notification-box, showing me, that I still use an old version of OJS (probably the one from where I imported the DB).

when calling the main page, I also get an error in the apache error.log:
“DAOResultFactory instances cannot be counted unless supplied in constructor”

how can I import a DB from an old version without having those issues?

It’s expected in this form to provide data on the existing database. Just provide there its credentials for OJS to access. The database should be empty.

Can you explain in more details what you are trying to do here? Maybe you want to perform an upgrade?

Thanks for your reply!

I’m trying to have OJS running in docker for easy upgrades.
Currently, we’re running it without docker (directly on a host). The database is on this host as well. And I want to keep the DB on the host to be able to use our existing workflow with the DB.

Last thing I tried:
-building up our own image based on the official ojs-docker-image (mainly changing some permissions)
-setting the correct DB values in config.inc.php
-setting Installed=On in config.inc.php
-running “php tools/upgrade.php upgrade”
-accessing OJS in webbrowser → gives me some 404s (styleSheet.css, journalThumbnail*.*)

Seems to be still a long way to go, maybe I will check the upgrade.php to understand what it does exactly next…

404 may be because of permission issues with those files or they are missing (I suspect they should be in public folder).
In general, was the upgrade process successful?

The public/site/styleSheet.css is not existing at all in the filesystem. Where should it come from, is it being created during installation/upgrade or configuration?

The DB is use is a snapshot used in OJS 3.2.1.1. The container I want to use the DB with, runs with OJS 3.3.0.6.

When running “php tools/upgrade.php upgrade” I get:

[…]

WARNING: The NavigationMenu (ContextId: 9, Title: User Navigation Menu, Area: user) will be skipped because the specified area has already a NavigationMenu attached.

WARNING: The NavigationMenu (ContextId: 9, Title: Primary Navigation Menu, Area: primary) will be skipped because the specified area has already a NavigationMenu attached.

[…]

ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘url’ in ‘field list’ (SQL: select url, navigation_menu_item_id from navigation_menu_items where context_id = 1)

Looks like before this commit, column ‘url’ was created but now not anymore:

But the migration script here still tries to drop the column here:

The column ‘url’ seems to be present at ./lib/pkp/xml/schema/navigationMenus.xml as well.

I couldn’t find out yet why was it dropped in the commit above. Will investigate further…

Hi @edelm,

Take a look at this comment: ERROR: Upgrade failed: DB: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'url' in 'field list' - #2 by asmecher

Thanks for the hint!

Meanwhile, I could upgrade to 3.3.0.6. One of the problems also was, that I didn’t setup the DB after a partial upgrade.

After the upgrade, I set “Installed = On” in the config.inc.php.
When I access the page, I still get some 404s:
/public/site/styleSheet.css?v=3.3.0.6
/public/journals/2/journalThumbnail_de_DE.jpg
/public/journals/1/journalThumbnail_de_DE.png

Where should the styleSheet.css come from? It’s not existing in the github repository and it doesn’t seem to get created during the upgrade-tool.

It’s custom CSS uploaded on the site level through the admin dashboard and custom thumbnails also uploaded through the dashboard for the specific journals.

There seems to be something strange going on with my custom theme. I installed it by copying it to ./plugin/themes/defaultBasel and activated it in website->settings->plugins->theme plugins. What happens is when I try to go to the OJS root page, I get an error in the apache error.log:

PHP Fatal error: Uncaught Exception: DAOResultFactory instances cannot be counted unless supplied in constructor (DAO JournalDAO)!
in /var/www/html/lib/pkp/classes/db/DAOResultFactory.inc.php:101\n
Stack trace:\n
#0 /var/www/html/lib/pkp/classes/db/DAOResultFactory.inc.php(141): DAOResultFactory->getCount()\n
#1 /var/www/html/cache/t_compile/65bfc3e024c2e9104f46e23b73376a9455e3df0e^51cfb9321c891ada9323e7942962579e7e4324d1_0.app.frontendpagesindexSite.tp.php(97): DAOResultFactory->getPageCount()\n
#2 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_60e5d2e914d2e9_87893626(Object(Smarty_Internal_Template))\n
#3 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))\n
#4 /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))\n
#5 /var/www/html/ in /var/www/html/lib/pkp/classes/db/DAOResultFactory.inc.php on line 101

Also notable is, that I see “##plugins.themes.defaultBasel.name##” instead of the name (same goes for “##plugins.themes.defaultBasel.description##”).
The theme DOES have the correct files for de_DE and en_US in [theme-directory]/locale/de_DE/locale.xml. Permissions are “rw” for all users. Also, the localization codes (de_DE, en_US) in the source code of the webpage are the same as the codes used in the theme-directory-structure.

The only difference I see is, that the “default” theme uses .po files while my theme uses .xml files.
Is there anything else (aside copying the theme to the directory and activating it in the settings) I have to do to import/activate a theme?

This means that in the indexSite template there is a code that iterates through DAOResultFactory object in a way that is no longer supported. Take a look at this topic: Update themes to be compatible with OJS 3.3.0 · Issue #6400 · pkp/pkp-lib · GitHub about things which need to be updated in theme to be compatible with 3.3. You can find references to OJS issues and from themes with examples of code updates.

I don’t think that XML based localization is still supported in 3.3.

Also, there is a command line tool for conversion of translation to a new format: pkp-lib/xmlToPo.php at 833ec015567bce50d3f87cdec1d20937df6f6f28 · pkp/pkp-lib · GitHub

This topic was automatically closed after 6 days. New replies are no longer allowed.