I was asked to update an existing OJS from 2.4.8-2 to 3.0.2 and i got a constant error when i tried to do the upgrade process.
See, i tried to upgrade from 2.4.6 to 3.0.2 and i had no problem. Then, using the backup platform, i upgrade to 2.4.8-2 and when i tried to upgrade to 3.0.2 i got this message in putty:
Call to undefined method DAO::DAO() in plugins/generic/usageStats/usageStatsTemporaryRecordDAO.inc.php on line 29
The first time i tried the upgrade from 2.4.8-2 to 3.0.2 i got a message that i missed the GeoLocationTool.inc.php file so i copied from 2.4.8-2 to 3.0.2. Next i got the DAO error. And here is when i got stuck, my upgrade process doesn’t pass this point.
I am run out of ideas so, please, help me with this.
No, thats not the case here. The only files i moved from the previous ojs was config.ini.php, public folder, files folder and the GeolocationTool.inc.php. The last one was requested in the upgrade process.
OJS 3.0.2 doesn’t have that file so i had to copy it from my ojs 2.4.8-2 backup. After that i got the DAO error thing.
It was on the ojs 2.4.8-2 version. ojs 3 doesn’t have it, and because the upgrading process was asking from that missing file i copied from 2.x to 3.x. This happen only from 2.4.8-2 to 3.02. When i upgrade from 2.4.6 all the process was fine, no error or warnings.
I need upgrading from the 2.4.8-2 version and i don’t understand why the upgrading process was asking for that file now and not before.
Yes, that was in the beginning of the upgrading process, the part when start upgrading the stats. The message was the GeolocationTool.inc.php was not found. And as ojs3 doesn’t have it i use the one in my 2.4.8-2 backup.
The thing is, this didn’t happened in the 2.4.6 to 3.0.2 upgrading process.
I’m referring to usageStatsTemporaryRecordDAO.inc.php (not sure why it’s uncapitalized, maybe that’s an accidental change on your end?), and you’re referring to GeolocationTool.inc.php (not sure if the capitalization change is intentional there).
To fix the issue with GeoLocationTool.inc.php, don’t copy code over from your OJS 2.x install – apply the patch for that issue here instead.
The usageStatsTemporaryRecordDAO.inc.php file you copied from your OJS 2.x isn’t compatible with OJS 3.x and will cause problems; I’d suggest removing it.
Public Knowledge Project Team