Error lib/pkp/classes/submission/GenreDAO.php*

hi i’m still struggling to upgrade from version 3.3.0.14 to version 3.4.0-1

I restarted from scratch, doing a new installation, and it went well.

then i tried to pass it the database of version 3.3.0.14 in production, changing from myisam to innodb.
I put public folder and files, now the error I have is this.

I also tried to upgrade the version directly and the error I get is the same.
how can i fix it?
thank you for the time you will dedicate to me

Warning : Undefined array key “required” in /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/submission/GenreDAO.php on line 250

Fatal error : Uncaught TypeError: PKP\submission\Genre::setRequired(): Argument #1 ($required) must be of type bool, null given, called in /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/submission/GenreDAO.php on line 250 and defined in /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/submission/Genre.php:213 Stack trace: #0 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/submission/GenreDAO.php(250): PKP\submission\Genre->setRequired() #1 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/db/DAOResultFactory.php(133): PKP\submission\GenreDAO->_fromRow() #2 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/db/DAOResultFactory.php(232): PKP\db\DAOResultFactory->next() #3 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/pages/dashboard/DashboardHandler.php(118): PKP\db\DAOResultFactory->toArray() #4 [internal function]: PKP\pages\dashboard\DashboardHandler->index() #5 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/core/PKPRouter.php(334): call_user_func() #6 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest() #7 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route() #8 /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/core/PKPApplication.php(373): PKP\core\Dispatcher->dispatch() #9 /web/htdocs/amq.aiqua.it/home/ojs34/index.php(21): PKP\core\PKPApplication->execute() #10 {main} thrown in /web/htdocs/amq.aiqua.it/home/ojs34/lib/pkp/classes/submission/Genre.php on line 213

php 8.1

Hi!

Thanks for reporting, I believe it’s a bug that we’ll have to fix. I’ll investigate it today and come up with a fix. The next release will happen probably within this or the next week, and will include the fix.

Best,
Jonas Raoni

Hi @simgiallorosso,

I’ve found a similar case here, and I think the reason was probably a failed migration that nobody noticed (I’ll be investigating).

Check if your database has the field required on the table genres, if not, I guess something happened during your upgrade, do you still have the upgrade log handy?

Best,
Jonas Raoni

unfortunately not sorry

If you still have the old database and files, I think it’s better to re-run the upgrade and check what went wrong.

But I understand that maybe your system has been running for some time and you’ve already got new data, then it’s tough to discard/merge…

If you can’t re-run the upgrade, the other alternative is to compare your database against this one (there are free tools to compare database structures):

And fix at least the really bad differences, such as missing fields.

Best,
Jonas Raoni

Thanks for your help, but I fixed it a long time ago. indeed I also switched to version 3.4.0.3

A thousand thanks!

1 Like