OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



SWORD deposit fails - date_published is null

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.

SWORD deposit fails - date_published is null

Postby josipkp » Fri Jan 20, 2012 8:35 am

Hi,

Trying to use SWORD export on OJS 2.3.6, we caught the following message on the apache2 log:
PHP Fatal error: Call to a member function getDatePublished() on a non-object in /var/www/ojs/cache/t_compile/%%DC^DC6^DC6E5A90%%citation.tpl.php on line 37, referer: http://[...]/manager/importexport/plugin/SwordImportExportPlugin

The screen shows something similar for each article selected individually:
@article{,
author = {Júlio César Suzuki},
title = {Editorial},
journal = {Agrária (São Paulo. Online)},

year = {

If we export some of these articles (created as "quick submission") and try to import in another OJS installation (2.3.4)
comes the message:
DB Error: Column 'date_published' cannot be null

The published date is automatic to the current date if it is not changed for the issue.
On the database, using the SQL "select issue_id, journal_id, volume, number, year, date_published from issues;" it is possible to see date_published not null.
But, the date_published on published_articles table are all null!

What could be wrong? Who fill this data?
What need to be changed to Sword deposit and import/export works?

Thanks in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: SWORD deposit fails - date_published is null

Postby josipkp » Mon Jan 23, 2012 3:19 pm

Hi,

Sorry by the inconvenience for write again, but I can't find a clear solution to import one edition or export using SWORD.
If I update the date_published directly on the database, on published_articles table, Export and SWORD worked.
But I'm not sure where I should to change this on the OJS interface.
The articles arrived using Quick Submission.

Can anyone help me?
Thanks in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: SWORD deposit fails - date_published is null

Postby josipkp » Tue Jan 24, 2012 11:37 am

Hi,

I think we address the problem, but don't have a solution yet.
If we send an article to a future edition using Quick Submission on OJS 2.3.4, the date_published on published_articles is the currente date, then we can export/import to another OJS installation and we can deposit using SWORD plugin.

The same steps on OJS 2.3.6 produce date_published NULL and then, we can't import an exported edition on this environment or to deposit using SWORD. The error message is "date_published can not be null".

On OJS 2.3.6 the Quick Submission interface have a combo to change/view the published date.

Someone have faced this problem? Someone have a tip?
It is safe to copy the OJS 2.3.4 submission plugin to OJS 2.3.6?

Thanks in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: SWORD deposit fails - date_published is null

Postby jmacgreg » Sat Jan 28, 2012 3:34 pm

Hi Josi,

Can you give us more information on how you quick submitted the articles? Specifically, when you used the quick submit plugin to submit articles, did you specify a publication date, or just choose an issue to publish with?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: SWORD deposit fails - date_published is null

Postby josipkp » Mon Jan 30, 2012 5:20 am

Hi,

Thank you for the answer.
We tried on quick submission:
1) to choose an issue to publish, without publication date
2) to choose an issue to publish, with publication date
3) to specify a publication date on quick submit, when selecting an issue
(to select a dash for day or month not record the date even publishing an issue)

On OJS 2.3.6 no published_date is recorded on published_articles table.
Can we move the OJS 2.3.4 Quick Submission plugin to the OJS 2.3.6? Is it safe?

Thanks in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: SWORD deposit fails - date_published is null

Postby jmacgreg » Wed Feb 01, 2012 5:07 pm

Hi Josi Perez,

Rolling back to the 2.3.4 plugin version will likely not work, for a variety of different reasons. (There were some significant changes to the plugin code between those versions that had nothing to do with the date published issues.) Otherwise, this issue is a little beyond me; I'll be asking another developer to jump in here.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: SWORD deposit fails - date_published is null

Postby josipkp » Thu Feb 02, 2012 6:01 am

I look forward to an answer.
We need it to perform this export facility.

Thank you,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am

Re: SWORD deposit fails - date_published is null

Postby asmecher » Tue Feb 07, 2012 9:05 am

Hi Josi,

It sounds like your database schema doesn't quite match the descriptor -- it may be that ADODB (the database abstraction library we use) didn't properly clear the NOTNULL flag on the published_articles.date_published column during the upgrade. Try the following:
Code: Select all
ALTER TABLE published_articles MODIFY date_published DATETIME;
(Please back up your database before you do this, just in case something weird happens.)

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

Re: SWORD deposit fails - date_published is null

Postby josipkp » Tue Feb 28, 2012 1:01 pm

Hi,

This installation began as 2.3.6.
We forced the date_published using manual update.

Using "desc published_articles;" in mysql:
| Field | Type | Null | Key | Default | Extra |
[...]
| date_published | datetime | YES | | NULL | |

Our problem:
using quick submission, the date_published is null for the articles in an issue. Then, export using SWORD and Export Issue not work.
No one else had this problem?

Thank you in advance,
Josi Perez
josipkp
 
Posts: 61
Joined: Fri Jun 27, 2008 8:51 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests