OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



After uprade author list gives errors

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.

After uprade author list gives errors

Postby tkalfaoglu » Fri Mar 15, 2013 3:10 am

Hello. I upgraded an OJS site from 2.3.7.0 to 2.4.2..

I went for the full update method, new code altogether, and migrated the database.
Migration went alright, (minor issue with notifications, the migration would not finish, so I restored the database, deleted all notifications, re-ran the upgrade tool, and then it completed successfully)

The customer noticed that the Author list gives a fatal PHP error, "Cannot return string offsets by reference", after displaying two authors, in ./lib/pkp/classes/core/DataObject.inc.php line 66.
I'm guessing some invalid data in a table, and I hacked that file:

Code: Select all
                // WARNING: Collapsing the following into a single line causes PHP 5.0.5 to die.
                $locales = array_keys($data);
                $firstLocale = array_shift($locales);
+                   $aa = $data[$firstLocale];
+                    return $aa;


this seems to work alright under php 5.3 Linux. However, the customer says that the author list used to display the submissions by that author next to the author name.. well, it no longer does.
Example: http://www.neuroquantology.com/index.ph ... hInitial=M

Any ideas what I should check?
Thanks!
-turgut
tkalfaoglu
 
Posts: 12
Joined: Wed Feb 27, 2013 10:54 am

Re: After uprade author list gives errors

Postby asmecher » Fri Mar 15, 2013 9:57 am

Hi turgut / solty,

FYI, I suggested a fix at http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=6450&p=37847#p37852 that would correct the data in the database rather than requiring a code work-around.

The list of an author's submissions has always appeared on the author details page, not on the author list; if it was appearing on the author list, then that must've been a local modification.

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

Re: After uprade author list gives errors

Postby tkalfaoglu » Fri Mar 15, 2013 10:31 am

Many thanks, I had seen that posting and tried, but the database returns nothing..

mysql> SELECT count(*) FROM author_settings WHERE setting_name = 'affiliation' AND (locale IS NULL OR locale = '');
+----------+
| count(*) |
+----------+
| 0 |
+----------+
1 row in set (0.00 sec)
tkalfaoglu
 
Posts: 12
Joined: Wed Feb 27, 2013 10:54 am

Re: After uprade author list gives errors

Postby asmecher » Fri Mar 15, 2013 10:41 am

Hi turgut,

Can you dump the value of the $key variable for the case that you worked around?

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

Re: After uprade author list gives errors

Postby tkalfaoglu » Fri Mar 15, 2013 11:04 am

Thanks.. the key is "affiliation" for every line of the
http://www.neuroquantology.com/index.ph ... hInitial=L
output.. -t
tkalfaoglu
 
Posts: 12
Joined: Wed Feb 27, 2013 10:54 am

Re: After uprade author list gives errors

Postby tkalfaoglu » Fri Mar 15, 2013 11:07 am

The first few lines of the table is:

mysql> SELECT * FROM author_settings WHERE setting_name = 'affiliation' limit 5;
-------------------------------------+--------------+
| author_id | locale | setting_name | setting_value | setting_type |
+-----------+--------+--------------+--------------------------------------------------------------------------------+--------------+
| 895 | en_US | affiliation | | string |
| 891 | en_US | affiliation | | string |
| 974 | en_US | affiliation | DAMTP, University of Cambridge
Sidney Sussex College, University of Cambridge | string |
| 846 | en_US | affiliation | | string |
| 899 | en_US | affiliation | | string |
tkalfaoglu
 
Posts: 12
Joined: Wed Feb 27, 2013 10:54 am

Re: After uprade author list gives errors

Postby solty » Sat Mar 16, 2013 12:13 am

Hi Alec,
I think that there is a problem latest 2.4.2 version.
I was setup OJS 2.4.2 in the new directory as clear setup.
Previously, I was obtained issues xml exports from 2.3.7.0 and then use import xml for new OJS 2.4.2.
I see similar results in the author list... lost affiliations... lost links to the authors' articles titles.
http://www.neuroquantology.com/trial/in ... ch/authors
Fatal error: Cannot return string offsets by reference in /var/www/vhosts/neuroquantology.com/httpdocs/httpdocs-old/trial/lib/pkp/classes/core/DataObject.inc.php on line 66

As a result, I was changed from latest version 2.4.2 to the our old version, 2.3.7.

Personally, as new and good properties in the 2.4.2, we need use "Browse By Sections" and "Google embedded viewer" Plugin for PDFs.
I was copy these plugins within the /httpdocs/plugins/generic directory, but not worked (but I see in the as new plugins and also its setting, settings OK for both).
I think that these plugins compatible with 2.4.2.

Is there anyway work with 2.3.7 of the mentioned plugins?

Thank you for your sincerely support!
Last edited by solty on Sat Mar 16, 2013 11:42 am, edited 7 times in total.
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby solty » Sat Mar 16, 2013 2:21 am

Last note for 2.4.2 database upgrade error, may be use solution, during the show_stacktrace = on setting error message after the every author names

ojs2 has produced an error Message: WARNING: array_keys() expects parameter 1 to be array, string given In file: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php At line: 65 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "array_keys() expects parameter 1 to be array, string given", "/var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php", 65, Array(4)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php line 65 Function: array_keys("Research Assistant of Histology and Embryology Dept. of Histology and Embryology, Ondokuz Mayis University School of Medicine, Samsun, Turkey") File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/submission/PKPAuthor.inc.php line 208 Function: DataObject->getLocalizedData("affiliation") File: /var/www/vhosts/neuroquantology.com/httpdocs/cache/t_compile/%%02^029^029F1BCC%%authorIndex.tpl.php line 38 Function: PKPAuthor->getLocalizedAffiliation() File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/lib/smarty/Smarty.class.php line 1263 Function: include("/var/www/vhosts/neuroquantology.com/httpdocs/cache/t_compile/%%02^029^029F1BCC%%authorIndex.tpl.php") File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/template/PKPTemplateManager.inc.php line 295 Function: Smarty->fetch("search/authorIndex.tpl", Null, Null, True) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/template/PKPTemplateManager.inc.php line 346 Function: PKPTemplateManager->fetch("search/authorIndex.tpl", Null, Null, True) File: /var/www/vhosts/neuroquantology.com/httpdocs/pages/search/SearchHandler.inc.php line 246 Function: PKPTemplateManager->display("search/authorIndex.tpl") File: (unknown) line (unknown) Function: SearchHandler->authors(Array(0), Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(0), Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/Dispatcher.inc.php line 133 Function: PKPPageRouter->route(Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPApplication.inc.php line 189 Function: Dispatcher->dispatch(Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/index.php line 63 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.3.16 Apache Version: Apache DB Driver: mysql DB server version: 5.5.30-cll
ojs2 has produced an error Message: WARNING: array_shift() expects parameter 1 to be array, null given In file: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php At line: 66 Stacktrace: File: (unknown) line (unknown) Function: PKPApplication->errorHandler(2, "array_shift() expects parameter 1 to be array, null given", "/var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php", 66, Array(5)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php line 66 Function: array_shift(Null) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/submission/PKPAuthor.inc.php line 208 Function: DataObject->getLocalizedData("affiliation") File: /var/www/vhosts/neuroquantology.com/httpdocs/cache/t_compile/%%02^029^029F1BCC%%authorIndex.tpl.php line 38 Function: PKPAuthor->getLocalizedAffiliation() File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/lib/smarty/Smarty.class.php line 1263 Function: include("/var/www/vhosts/neuroquantology.com/httpdocs/cache/t_compile/%%02^029^029F1BCC%%authorIndex.tpl.php") File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/template/PKPTemplateManager.inc.php line 295 Function: Smarty->fetch("search/authorIndex.tpl", Null, Null, True) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/template/PKPTemplateManager.inc.php line 346 Function: PKPTemplateManager->fetch("search/authorIndex.tpl", Null, Null, True) File: /var/www/vhosts/neuroquantology.com/httpdocs/pages/search/SearchHandler.inc.php line 246 Function: PKPTemplateManager->display("search/authorIndex.tpl") File: (unknown) line (unknown) Function: SearchHandler->authors(Array(0), Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPRouter.inc.php line 370 Function: call_user_func(Array(2), Array(0), Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPPageRouter.inc.php line 266 Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/Dispatcher.inc.php line 133 Function: PKPPageRouter->route(Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/PKPApplication.inc.php line 189 Function: Dispatcher->dispatch(Object(Request)) File: /var/www/vhosts/neuroquantology.com/httpdocs/index.php line 63 Function: PKPApplication->execute() Server info: OS: Linux PHP Version: 5.3.16 Apache Version: Apache DB Driver: mysql DB server version: 5.5.30-cll
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby asmecher » Tue Mar 19, 2013 8:04 am

Hi Solty,

Try the patch at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8173; it was contributed by one of our external partners and apparently fixes a problem with the "Browse by Authors" page.

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

Re: After uprade author list gives errors

Postby solty » Wed Mar 20, 2013 2:32 am

Dear Alec,
thank you. I will try as soon as possible.
Best,
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby solty » Thu Mar 21, 2013 12:24 am

Dear Alec,
Is this corrected last file?
https://github.com/pkp/ojs/blob/master/ ... AO.inc.php

I was not patch to the AuthorDAO.inc.php in the 2.3.7.
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby solty » Thu Mar 21, 2013 12:31 am

İt was last code! :D :D :D :D :D
https://github.com/pkp/ojs/blob/master/ ... AO.inc.php
Yes, copy-paste of this code, and then upload, problem solved! :D :D
I ca see author names, his/her affiliations and articles.
Thanks again...
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby solty » Thu Mar 21, 2013 6:46 am

After the AuthorDAO.inc.php correction, I was upgrade to 2.4.2, and upgraded completely normal.
I think that this version excellent for especially Google PDF viewer and "by section" properties.

But I see an error during the article submission and editing new issue like as save issue, publish issue...

Fatal error: Call to undefined method AuthorDAO::insertAuthor() in /var/www/vhosts/neuroquantology.com/httpdocs/classes/author/form/submit/AuthorSubmitStep1Form.inc.php on line 177.
Possible, I was perform an error during the editing of the AuthorDAO.inc.php... Could you attach last edited/corrected version of the AuthorDAO.inc.php?

I was upload original 2.4.2 AuthorDAO.inc.php, mentioned error corrected but I see old problem (lost affiliations of the authors):
Fatal error: Cannot return string offsets by reference in /var/www/vhosts/neuroquantology.com/httpdocs/lib/pkp/classes/core/DataObject.inc.php on line 66

Thanks Alec and your team!
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir

Re: After uprade author list gives errors

Postby solty » Fri Mar 22, 2013 12:33 am

Dear Alec,
I am crazy! :P I was find smarty solution...
I was upload old AuthorDAO.inc.php from OJS 2.3.7 to new upgraded 2.4.2. :roll:
All problems solved!
No error! Normal submission without error.
The author affiliations, his/her article links and also previously mentioned errors corrected.

Possible there is problem 2..4.2's AuthorDAO.inc.php file...
Also, working normal with 2.4.0 AuthorDAO.inc.php but not 2.4.1 and 2.4.2.
solty
 
Posts: 140
Joined: Mon Mar 16, 2009 12:47 am
Location: Turkiye, İzmir


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests