OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Function name mismatch in User Import / Interest DAO (2.4)

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Function name mismatch in User Import / Interest DAO (2.4)

Postby springday » Wed Sep 12, 2012 2:10 pm

Importing users from XML data for the first time after upgrading to OJS 2.4 brought the following error message:

Fatal error: Call to undefined method InterestDAO::insertInterests() in C:\xampp\htdocs\ojs\plugins\importexport\users\UserXMLParser.inc.php on line 285


There's really no function "insertInterests" in InsertDAO.inc.php, yet there's a function "setUserInterests" with the same signature. Renaming the "insertInterests" function call in UserXMLParser.inc.php to "setUserInterests" worked for me, I could import user data after this modification.
springday
 
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Re: Function name mismatch in User Import / Interest DAO (2.

Postby asmecher » Wed Sep 12, 2012 2:46 pm

Hi springday,

Fixed, thanks -- see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7883 for a bug entry.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Function name mismatch in User Import / Interest DAO (2.

Postby springday » Thu Sep 13, 2012 2:03 am

Thanks Alec!

I found a similar problem on the export way, too. As a journal manager, a click on "Export all" in the user import/export section would lead to error

Fatal error: Call to undefined method User::getInterests() in /html/ojs/plugins/importexport/users/UserExportDom.inc.php on line 68


Renaming the function call to "getUserInterests" worked for me:

Code: Select all
$interestsNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'interests', $user->getUserInterests(false, true), false);


Best regards,
Kai
springday
 
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Re: Function name mismatch in User Import / Interest DAO (2.

Postby asmecher » Thu Sep 13, 2012 8:48 am

Hi Kai,

Thanks again; I've included that patch in the same bug entry.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 5 guests