OJS link bug

Project:Open Journal System (OJS)
Component:Code
Category:bug report
Priority:normal
Assigned:triggs
Status:closed
Description

Yu-Hung discovered an interesting linking bug in one of the OJS templates. In researching it, I discovered that it was a known bug with a patch that I applied on the dev server to fix it.

The code change is:
triggs@dev1-vm1-etddev:/usr/local/apache_2.2.29/htdocs> diff ./journals/templates/about/editorialPolicies.tpl ./njs/templates/about/editorialPolicies.tpl
19,20c19,20
< {if $currentJournal->getLocalizedSetting('reviewPolicy') != ''}<li id="linkReviewPolicy"><a href="{url op="editorialPolicies" anchor="peerReviewProcess"}">{translate key="about.peerReviewProcess"}</a></li>{/if}
< {if $currentJournal->getLocalizedSetting('pubFreqPolicy') != ''}<li id="linkPubFreqPolicy"><a href="{url op="editorialPolicies" anchor="publicationFrequency"}">{translate key="about.publicationFrequency"}</a></li>{/if}
---
> {if $currentJournal->getLocalizedSetting('reviewPolicy') != ''}<li id="linkReviewPolicy"><a href="{url op="linkEditorialPolicies" anchor="peerReviewProcess"}">{translate key="about.peerReviewProcess"}</a></li>{/if}
> {if $currentJournal->getLocalizedSetting('pubFreqPolicy') != ''}<li id="linkPubFreqPolicy"><a href="{url op="linkEditorialPolicies" anchor="publicationFrequency"}">{translate key="about.publicationFrequency"}</a></li>{/if}

the patch is explained at: <a href="https://github.com/pkp/ojs/commit/902eb75d6f5f2158f86af064f124130ee5c0d777.diff" title="https://github.com/pkp/ojs/commit/902eb75d6f5f2158f86af064f124130ee5c0d777.diff">https://github.com/pkp/ojs/commit/902eb75d6f5f2158f86af064f124130ee5c0d7...</a>
and the bug at:
<a href="https://github.com/pkp/pkp-lib/issues/496" title="https://github.com/pkp/pkp-lib/issues/496">https://github.com/pkp/pkp-lib/issues/496</a>

I fixed the template in journals first and then copied it to jjs. diff3 had shown that all the files were the same:
triggs@dev1-vm1-etddev:/usr/local/apache_2.2.29/htdocs> diff3 ./journals/templates/about/editorialPolicies.tpl ./jjs/templates/about/editorialPolicies.tpl ./njs/templates/about/editorialPolicies.tpl

So after editing the journals version I ran these commands:
triggs@dev1-vm1-etddev:/usr/local/apache_2.2.29/htdocs> cp -i ./journals/templates/about/editorialPolicies.tpl ./njs/templates/about/editorialPolicies.tpl
cp: try to overwrite `./njs/templates/about/editorialPolicies.tpl', overriding mode 0644 (rw-r--r--)? y
cp: cannot create regular file `./njs/templates/about/editorialPolicies.tpl': Permission denied
triggs@dev1-vm1-etddev:/usr/local/apache_2.2.29/htdocs> cp -i ./journals/templates/about/editorialPolicies.tpl ./jjs/templates/about/editorialPolicies.tpl
cp: overwrite `./jjs/templates/about/editorialPolicies.tpl'? y

You'll note that even on dev, I do not have permission to edit the NJS version, which is owned by root. You'll have to do that.

To make this simpler, I've saved a copy of the edited editorialPolicies.tpl in my home directory on dev. You can use this to copy over all three files on prod as well as the dev file in the njs tree.

Comments

#1

Assigned to:fanfe» triggs
Status:active» test

I have updated the njs template in dev and I also changed njs files to triggs:users to be consistent with other journals. No idea who set njs' owner:group originally. Please let me know if the change fixed the problem.

I will copy this patch to production site now.

I've copied the edited editorialPolicies.tpl to njs/jjs/journals on production site.

#2

Status:test» fixed

Thanks Fangzhi! I've tested the journals in all three instances on production and the problem has gone, so I'd say it's fixed!

#3

Status:fixed» closed

Back to top