[3.3 -> 3.4] question about file genre id visibilty in publication

Describe the issue or problem
Some files of previously published publications would disappear after the migration, due to us previously overwriting article_details.tpl in our child theme and showing all files assigned to a publication, regardless if they were disabled or not.

The migration would obviously cause this child theme to get removed, which would trigger the files disappearing since they would no longer be displayed by our “hack”. This would cause us to further analyze our database in order to find out if we can get the files to show up without overwriting article_details.tpl.

From our genres table in our database:

+----------+---------+------------------------+-------+
| genre_id | enabled | entry_key              | count |
+----------+---------+------------------------+-------+
|        1 |       1 | SUBMISSION             | 12251 |
|        2 |       0 | RESEARCHINSTRUMENT     |  1785 |
|        3 |       0 | RESEARCHMATERIALS      |    16 |
|        4 |       0 | RESEARCHRESULTS        |     5 |
|        5 |       0 | TRANSCRIPTS            |  NULL |
|        6 |       0 | DATAANALYSIS           |    10 |
|        7 |       0 | DATASET                |  NULL |
|        8 |       0 | SOURCETEXTS            |    25 |
|        9 |       0 | MULTIMEDIA             |  NULL |
|       10 |       0 | IMAGE                  |  NULL |
|       11 |       0 | STYLE                  |  NULL |
|       12 |       0 | OTHER                  |  6632 |
|       13 |       1 | SOFTWARE               |  1575 |
|       14 |       1 | REPLICATIONMATERIALS   |  2342 |
|       15 |       1 | DATASETS               |   268 |
|       16 |       1 | SUPPLEMENTARYMATERIALS |   161 |
|       17 |       1 | OTHERS                 |  1850 |
|       18 |       1 | COVERLETTER            |   525 |
+----------+---------+------------------------+-------+

As you can see, we have two genres which are closely named: other and others. We assume that this divergence was caused by some older migration, but can’t yet pinpoint a reason for this state in the db. As you can see, other is disabled after the migration, which causes all files which are assigned with the other genre to disappear in all publications in the frontend.

Our fix
Our fix is straightforward; we will transfer all genre_ids that are currently not being displayed to others.

Our main question

As shown by the behaviour above, retroactively disabling a file genre will hide all files assigned to that genre even if they are already published to a publication. It was surprising to us that disabling a file genre would hide all associated files that had already been published: it does not seem desirable that disabling a file genre going forward would hide all published files that had been previously assigned to that genre.

Our question is if this is intended behaviour?

What application are you using?
OJS 3.4.0-5

Any clarification would be very helpful!

Kind Regards,

Max

Hi,

this was a misunderstanding from our side: The variable determining if an element is shown in article_summary.tpl (not article_details.tpl,which always shows all files attached, the original post is wrong in this regard as well) is whether a genre is marked as supplementary or not in the database. This post can be closed since our base assumptions about the system are wrong.

1 Like