PHP Fatal error

Hi Guys!

I’m having trouble exporting plugin in a magazine specifically, follows the content of the error:
mod_fcgid: stderr: PHP Fatal error: Call to a member function getPublished () on null in /home/sites/periodicos_home/public_html/ojs2/plugins/importexport/crossref/classes/DOIExportPlugin.inc.php on line 549
I researched some solutions in the forum, but did not succeed.

Thanks!

Hi @franciscosatiro,

What version of OJS are you using? (Please include this in your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

The my version is ojs-2.4.8-2.
Sorry, I will include in the next.

Thank you!

Hi @franciscosatiro,

This looks like it’s caused by a data error in your database. Are you handy with SQL? I’d suggest checking to see if there are any results for…

 SELECT pa.* FROM published_articles pa LEFT JOIN issues i ON (i.issue_id = pa.issue_id) LEFT JOIN articles a ON pa.article_id = a.article_id WHERE (pa.date_published IS NOT NULL OR a.status = 3) AND i.issue_id IS NULL;

This will list any entries in the published_articles table that are published in an issue that doesn’t exist.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Execute the SQL command and return this result:
|published_article_id|article_id|issue_id|date_published |seq|access_status|
|2356 |1928 |-100 |2009-01-04 21:02:55|1 |0 |
|2357 |1932 |-100 |2009-01-04 21:15:48|2 |0|
|2377 |2699 |-100 |2009-01-05 15:29:36|3 |0|
|3866 |4791 |-101 | |1 |0|
|9969 |11696 |-100 |2011-12-08 13:15:51|1 |0|
|10757 |12747 |-100 | |1 |0|
|10949 |13047 |-100 | |4 |0|

Hi @franciscosatiro,

Any idea what those negative issue_id values are? I think those must’ve been introduced manually or through a modification.

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I have no idea, it may have been manually added to the database.
but, would you have any idea how I can solve this export problem.
This problem arose after the migration from the old server to the new one, however, the database server is the same.

Thank you very much.

Hi @franciscosatiro,

I’d recommend deleting those entries. However, they definitely weren’t created by OJS, and I have no idea how they got there or what else was done – so deleting them may have unknown effects. Take a backup first.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

This database was used by this application, but on another server. Before the migration the application worked normally, the problem arose after the migration of the application.

Thanks!