OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



SQL for selecting articles

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.

Re: SQL for selecting articles

Postby asmecher » Tue Jul 08, 2014 1:56 pm

Hi Peter,

Rights information gets attached to the article when it's viewed, if OJS thinks it doesn't have everything already attached. If it's getting re-attached with 2014, that's because OJS doesn't think everything has been properly attached.

After you run your queries, can you dump the current permissions for that article? Do so with...
Code: Select all
SELECT * FROM article_settings WHERE setting_name IN ('copyrightHolder', 'copyrightYear', 'licenseUrl') AND article_id=?
(...replacing the ? with the article ID.)

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

Re: SQL for selecting articles

Postby piotreba » Tue Jul 08, 2014 2:20 pm

OK I run all queries and the paper has been updated to the right date (as it was after first try). But after entering Edit Metadata again these data were reset to 2014.


The paper I was checking comes from 1980 and was published on the OJS last year.
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Re: SQL for selecting articles

Postby asmecher » Tue Jul 08, 2014 2:27 pm

Hi Peter,

What do you get for the above query?

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

Re: SQL for selecting articles

Postby piotreba » Tue Jul 08, 2014 3:09 pm

3 rows are returned, with:
- copyrightYear: 1980
- licenseUrl: http://creativecommons.org/licenses/by/3.0/
- copyrightHolder: Last Name1, First Name1; Last Name2, First Name2


After I edit metadata of this paper from the Summary page the year is returned into 2014, and the names pattern returnes to the original one First Name1 Last Name1, First Name2 Last Name2. licenseUrl remains the same.



Peter
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Re: SQL for selecting articles

Postby asmecher » Tue Jul 08, 2014 3:13 pm

Hi Peter,

Can you include the full output of the query? I'm wondering e.g. about the locale column.

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

Re: SQL for selecting articles

Postby piotreba » Tue Jul 08, 2014 3:19 pm

Ok, something like this (with reset copyright year):
Attachments
Zrzut ekranu 2014-07-09 o 00.17.38.png
Zrzut ekranu 2014-07-09 o 00.17.38.png (69.51 KiB) Viewed 350 times
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Re: SQL for selecting articles

Postby asmecher » Mon Jul 21, 2014 12:51 pm

Hi Peter,

Sorry for the delay; I'm trying to replicate the behavior you're describing but having trouble.

I've mirrored your configuration (per the data in the above query) and can't get my permissions information to reset as you've described by editing the submission metadata.

Can you confirm that the permissions information appears correctly on the "Edit Metadata" form? What role are you using to edit the metadata (e.g. Editor)?

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

Re: SQL for selecting articles

Postby piotreba » Tue Jul 22, 2014 9:01 am

Dear Alec,


I can still replicate this issue: I navigate to the article metadata (I choose paper published earlier than in 2014), edit them (as Editor; but at the same time I am also Journal Manager). For the copyright year I put 2013, save the form, visit the article from the Archives (as the reader does), than go back to Edit metadata of that article, and the copyright year is again 2014.



Peter
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Re: SQL for selecting articles

Postby asmecher » Wed Jul 23, 2014 9:45 am

Hi Peter,

Hmm, thanks for your patience. Using the query I provided above, can you check between steps to pinpoint the exact time when the metadata changes? It's most likely to happen when you save the metadata form, but I'd like to be certain.

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

Re: SQL for selecting articles

Postby piotreba » Thu Jul 24, 2014 1:26 am

Dear Alec,

here is how it goes:

1. I go to the Edit Metadata page of the paper that was published in 2013,
2. I change copyright year from 2014 to 2013 and save the form,
3. I click on Edit Metadata again (without leaving the Summary page of this paper) and the year is still 2013,
4. I choose Save and reopen the Edit Metadata form – the year is still 2013, but when I click on Cancel and then Edit Metadata again and the year has been altered to 2014,

I tried to open the paper from the Archives page after applying step 2. above, in the new tab of the browser. Then in the step 3. the year was changed to 2014.

So it seems that the Save alone does not reset the year, but visiting the paper again (as a Reader or Editor) alter the copyright year.


Should you need more detailed information, let me know. I will try to provide it.

Peter
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Re: SQL for selecting articles

Postby ctgraham » Thu Jul 24, 2014 6:07 am

This sounds very similar to my report in http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8578#c19 . N.b. The underlying data (in the database) is changed each time you open the edit metadata form, even though the form still displays the unchanged data.

Peter, is the default locale of your journal en_US, or something different? I wonder if this might not be replicated by the SQL assuming en_US, but the journal being set to a different locale.
ctgraham
 
Posts: 67
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS

Re: SQL for selecting articles

Postby piotreba » Thu Jul 24, 2014 1:41 pm

Hey there,


yep, the locale is en_US.




Cheers,

Peter
piotreba
 
Posts: 155
Joined: Mon Dec 13, 2010 3:29 pm

Previous

Return to OJS Technical Support

Who is online

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