OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Fatal Error Code

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.

Fatal Error Code

Postby jcer_editor » Tue Aug 21, 2007 8:22 am

Hi - does anyone have any suggestions as to how I can fix the following error? I've played around with it but only made things worse and then had to go back and reinstall some files. Thankfully everything is back to where I began and the problem is the original one.

Basically, when I click on the Browse: By Title I get the following error message:

Fatal error: Call to a member function on a non-object in /data01/jcer/public_html/ojs/classes/issue/IssueAction.inc.php on line 53

Any advice will be much appreciated!
jcer_editor
 
Posts: 10
Joined: Sun May 13, 2007 5:44 am

Re: Fatal Error Code

Postby asmecher » Tue Aug 21, 2007 8:52 am

Hi jcer_editor,

Edit classes/issue/IssueAction.inc.php, find the subscriptionRequired function, and find the following line at approx. line 53:
Code: Select all
$currentJournal =& Request::getJournal();
Now add this line just below the above line:
Code: Select all
if (!is_object($issue)) return false;
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal Error Code

Postby jcer_editor » Tue Aug 21, 2007 9:04 am

Hi Alec,

thanks for that - it has made some improvement but not resolved the issue completely:

I'm still getting an error on the page http://www.jcer.net/ojs/index.php/jcer/search/titles

This error says

Fatal error: Call to a member function on a non-object in /data01/jcer/public_html/ojs/cache/t_compile/%%C1^C11^C11E9029%%titleIndex.tpl.php on line 39


Plus it only lists articles for the most recent issue, not past issues!

Thanks again

Eamonn
jcer_editor
 
Posts: 10
Joined: Sun May 13, 2007 5:44 am

Re: Fatal Error Code

Postby asmecher » Tue Aug 21, 2007 9:28 am

Hi Eamonn,

Try changing the following at templates/search/titleIndex.tpl:
  • Around line 44, change:
    Code: Select all
    <td>{if $issue->getAccessStatus()}...
    ...to...
    Code: Select all
    <td>{if $issue && $issue->getAccessStatus()}...
  • Around line 48, change:
    Code: Select all
    {if ($issue->getAccessStatus() || $issueAvailable)}
    ...to...
    Code: Select all
    {if (($issue && $issue->getAccessStatus()) || $issueAvailable)}
This probably stems from a database inconsistency. There were one or two minor bugs that may've caused this.

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

Re: Fatal Error Code

Postby jcer_editor » Tue Aug 21, 2007 9:38 am

Hi Alec,

ok tried that but still error messages appearing. Not to worry - it's annoying but not the end of the world! Just wish I knew more about coding!

Fatal error: Call to a member function on a non-object in /data01/jcer/public_html/ojs/cache/t_compile/%%C1^C11^C11E9029%%titleIndex.tpl.php on line 40


Eamonn
jcer_editor
 
Posts: 10
Joined: Sun May 13, 2007 5:44 am

Re: Fatal Error Code

Postby asmecher » Tue Aug 21, 2007 10:23 am

Hi Eamonn,

Hmm -- let's step back and look at the source of the inconsistency. Try running the following queries in MySQL and let me know which give you results:
Code: Select all
SELECT pub_id FROM published_articles p LEFT JOIN issues i ON (p.issue_id = i.issue_id) WHERE i.issue_id IS NULL;
SELECT pub_id FROM published_articles p LEFT JOIN articles a ON (p.article_id = a.article_id) WHERE a.article_id IS NULL;
SELECT article_id FROM articles a LEFT JOIN journals j ON (a.journal_id = j.journal_id) WHERE j.journal_id IS NULL;
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9090
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal Error Code

Postby jcer_editor » Wed Aug 22, 2007 1:43 am

Hi Alec,

Thanks for the help!

OK so it looks like the first line of code gave me a result. The second two returned nothing.

Generation Time: Aug 22, 2007 at 09:33 AM
Generated by: phpMyAdmin 2.9.0.2 / MySQL 4.1.21-standard-log
SQL query: SELECT pub_id FROM published_articles p LEFT JOIN issues i ON ( p . issue_id = i . issue_id ) WHERE i . issue_id IS NULL LIMIT 0, 30 ;
Rows: 2

pub_id
35
37


Is this what you need?

Eamonn
jcer_editor
 
Posts: 10
Joined: Sun May 13, 2007 5:44 am

Re: Fatal Error Code

Postby asmecher » Wed Aug 22, 2007 7:55 am

Hi Eamonn,

Yes -- those issues were previously published but are now associated with an issue that doesn't exist. Find their article IDs using:
Code: Select all
SELECT article_id FROM published_articles WHERE pub_id = 35 OR pub_id = 37;
Then go to the editing pages for those submissions and re-schedule them against a particular issue (or "To Be Assigned").

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests