How to change theme for different journals?

In OJS 3.0 I’ve installed a child theme that change a few templates and use as parent theme bootstrap 3. I would like only one journal have the templates changed but the new templates are used by all other journals. How can avoid this problem?
Regards
Claudio Tubertini

Hi @claudiotubertini,

Are you using OJS 3.0.0 or 3.0.1? If it’s 3.0.0, I’d suggest upgrading to 3.0.1 – there was an issue with template caching that caused themes in one plugin to potentially affect the presentation of other journals.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you, I’ve upgraded to 3.0.1 and now the problem of using different themes for different journal seem solved.

Actually now I can’t reload the cover images I had in the old version. Any idea?

Hi @claudiotubertini

Do you use the release package (.tar.gz) or git?
The cover images changed in 3.0.1 – now they are localized. Unfortunately we/I had forgotten to consider all cases for the upgrade so that one fix came after the 3.0.1 release, s. Fix SQL statements by bozana · Pull Request #1130 · pkp/ojs · GitHub. Thus, if you do not use the current git ojs-stable-3_0_1 branch, would it be possible for you to apply those changes/commits and do a DB update (tools/upgrade.php upgrade) again?

Thanks!
Bozana

I’ve done the upgrade from 3.0 to 3.0.1 using the tar package.
Do you think the best way would be to do the upgrade again using the git version? I have some difficulty in understanding which are the changes I have to apply.
Regards
Claudio

Hi @claudiotubertini

Because we are still fixing some issues for 3.0.1 it would be easier to work with git i.e. you could always easily get the latest state/changes/fixes. But, applying the patches probably works too.
You would need to apply this change: Fix SQL statements by bozana · Pull Request #1130 · pkp/ojs · GitHub
Because you will have to run the DB upgrade again, you will need to apply also this change, in order not to get the error message “duplicate key …”: Fix SQL statements by bozana · Pull Request #1130 · pkp/ojs · GitHub

Best,
Bozana

Sorry to bother you again but I would like to recap what I have to do (I have tried to apply the patches in a local copy and I was flooded with a long list of warnings and notices).

  1. I copy the file in github and override on the server the files /classes/install/Upgrade.inc.php and dbscripts/xml/upgrade/3.0.1_update.xml
  2. I launch again php tools/upgrade.php upgrade
    is this the right procedure?
    Thanks again
    Claudio

Hi @claudiotubertini

Hmmm… Yes that would be the procedure. Iin general, one should not copy the whole files – but just the needed changes – because the whole file could contain other changes too, that require further changes, on other places in the code, but I think it is OK for these two files.
I’ve just realized, that those function will probably not be applied because you already upgraded to 3.0.1, right? – they are defined to be executed when upgrading from 3.0 version, s. ojs/upgrade.xml at ojs-stable-3_0_1 · pkp/ojs · GitHub
If so, could you please add the following part of the code into this place ojs/upgrade.xml at ojs-stable-3_0_1 · pkp/ojs · GitHub
<upgrade minversion="3.0.1.0" maxversion="3.0.1.9"> <code function="localizeIssueCoverImages" /> <code function="localizeArticleCoverImages" /> </upgrade>
(This will tell the upgrade script to execute those two functions if the current version is 3.0.1.)
And execute tools/upgrade.php upgrade again?
Please do not forget to always make a backup i.e. to save DB dump, files and public folder, before upgrading.

How many cover images do you have?

Best,
Bozana

I’m sorry but the covers (only two, for two journals, only one issue each) do not appear yet. At their place there is a small word ‘Array’.

Claudio

Hi @claudiotubertini

Did you upload those cover images before or after OJS 3.0 release for the first time? – It seems that the value for the cover image in the DB is an array, which I haven’t considered in the upgrade – I thought this was a case in OJS 3 beta, which is not supported in the upgrade…
I’ll try to support that too…

Thanks!
Bozana

I uploaded the covers in September using OJS 3.0.0 that was released at the end of august. Or at least I thought to be using that release and not the beta.
Thanks for all are you doing
Claudio

Hi @claudiotubertini

Could you maybe send me that array value from your DB, from the table issue_settings, where setting_name = coverImage? Are there maybe several coverImage entries for one issue in your DB table? Is there maybe also an entry with setting_name = fileName?

Thanks a lot!
Bozana

Here are all records of the table you are asking.
(2,’’,‘pub-id::publisher-id’,’’,‘string’),
(2,‘en_US’,‘coverImage’,‘cover_issue_2_en_US.jpg’,‘string’),
(2,‘en_US’,‘coverImageAltText’,‘antropologia e sanità ‘,‘string’),
(2,‘en_US’,‘description’,’<p style=“margin-bottom: 0in; line-height: 100%;” align=“justify”><span style=“font-family: Times New Roman,serif;”>Durante una ricerca etnografica in un contesto clinico, il medico neurologo, rivolgendosi ai due antropologi in una pausa di lavoro, disse: «Lavorare con voi è straordinario, ci date indicazioni minime, precise, come a disegnare una mappa di stradine e vicoli alternativi per giungere agli altri, ai pazienti. Noi, per dire, conosciamo solo la strada principale e… se la troviamo interrotta? ostacolata? Restiamo bloccati! Ma sai perché scegliamo sempre quella? Perché non abbiamo tempo. Ci vorrebbe molto più tempo per fare quello che dite…».

‘,‘string’),
(2,‘en_US’,‘title’,‘Esperienza dell’attesa e retoriche del tempo. L’impegno dell’antropologia nel campo sanitario’,‘string’),
(4,’’,‘pub-id::publisher-id’,’’,‘string’),
(4,‘en_US’,‘coverImage’,‘cover_issue_4_en_US.jpg’,‘string’),
(4,‘en_US’,‘coverImageAltText’,’’,‘string’),
(4,‘en_US’,‘description’,’’,‘string’),
(4,‘en_US’,‘title’,'INDIRIZZI E PROSPETTIVE PER ORGANIZZARE I SERVIZI SOCIALI PROFESSIONALI Vecchi e nuovi disagi delle persone e delle comunità ',‘string’);
Here is the web page with the error
http://riviste-clueb.online/index.php/anpub
Regards

Hmmm… your DB is correct, thus the bug/problem must be somewhere else :frowning:

Do you see those images in your public folder?

Do your code looks like this:
ojs/issue_toc.tpl at ojs-stable-3_0_1 · pkp/ojs · GitHub
ojs/Issue.inc.php at ojs-stable-3_0_1 · pkp/ojs · GitHub

Problem solved. Thank you very much for your helpful assistance, the problem was in issue-toc.tpl