OMP 3.1.2 - Chapter PDF will not display

I have encountered an issue in more than one OMP 3.1.2 installation where I add a publication format for a chapter and upload a PDF file for the chapter, then create a catalog entry for it, but on the published book page the catalog entry appears with no chapter PDF file link below it. I think I’m following the right steps and I wonder if this is a bug in OMP 3.1.2.

Are there any users of OMP 3.1.2 who have successfully uploaded chapter publication formats and made the file links available on their site - since upgrading to 3.1.2?

If yes, can you think of anything I’m doing wrong to explain why the links do not appear?

Hi there,

I have same issue here. Old books uploaded before upgrade keep fine, but new ones have no chapter files displayed in monograph page.

It seems related to this and this reports.

If someone could propose a hotfix or workaround, I’d be glad to test it.

Okay, I think I found a solution.

This is what happened after I upgraded to OMP 3.1.2-4: in submission_file_settings table, records were inserted with setting_type set as int. Once I change it to string, like before upgrade, chapter files become to be shown.

Unfortunately, I have no idea where the code should be adjusted.

Anyway, I’ll report this in a issue on GitHub.

Hi @fsaldanha,

Interesting! What setting_name values did you change the setting_type for?

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I changed all records with setting_name set as chapterId.

The name ones kept being saved with string type.

Hi @fsaldanha,

I think this can be traced to lib/pkp/classes/template/ in the smartyPluckFiles function. Around line 1858 is the line:

} elseif($file->getChapterId() === $params['value']) {

I suspect changing the strict match (===) to a loose match (==) will resolve the issue. Can you verify?

(I see you’ve also created a github entry – linking it here: [OMP] Chapter PDF will not display · Issue #5632 · pkp/pkp-lib · GitHub)

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

After undoing the change in one record and applying your patch, the PDF chapter became visible again, so I can confirm this effectively solved the problem.

Thank you very much for attention and promptness!

Hi @fsaldanha,

Thanks for confirming! I’ve committed the above change for release in OJS 3.2.0-1 (hopefully later this week).

Alec Smecher
Public Knowledge Project Team

Version or version does not show chapter PDFs correctly. I noticed that if we add files to chapters, after adding the second one, the file at the first chapter is deleted.
The order I follow

  1. Uploading files to Book manuscript + 3 chapters in Production Ready Files (type Chapter Manuscript)
  2. Addition 3 chapters in Publications / Chapters
  3. Adding 4 entries in Publication formats (one for main text and 3 for chapters) and uploading files to each of them
    Alternatively in item 3
    Adding one entry in Publication formats and uploading 3 files

Files PDF in chapters do not appear correctly,

Hi @karwas,

I believe this issue was addressed with the release of OMP 3.2.0-3 as noted in Github.

Kind Regards,
Patricia M.
Public Knowledge Project

Hi Pati,
Yes, you’re right. Now everything works fine :slight_smile: