[OMP 1.2] PDF-Button missing, "Array" instead

I have no clue how this happened, but somehow the Button for e.g. PDF, HTML etc. disappeared and I have the word “Array” instead.
What kind of setting did I wrong?
thank you!


Hi @lcbossert,

Is it possible that this installation was wholly or partially upgraded to OMP 3.1?

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

As far as I can see it:
Git status of our repo says Your branch is up-to-date with 'origin/omp-stable-1_2_0'.

Hi @lcbossert,

Sorry, I mis-remembered the point at which we merged some UI changes – you’re correct, that looks like an OMP 1.2 installation. Have you considered upgrading? It’s likely that at least some of this has been corrected in the latest release.

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

thanks for the feedback. I will update then.


Hi @asmecher
we have upgraded to OMP 3.1, but still get “Array” instead of the PDF-Button. I also created a new publication but still only “Array”.


Hi @lcbossert,

Is your press live? If so, could you drop me a link (privately if you’d prefer)?

Alec Smecher
Public Knowledge Project Team

I have encountered this issue in a new installation of 3.1. Was this resolved?

not yet. afaik; we have installed another OMP and facing no such problmens, yet.

I had this “array” text before. I recalled that this is related to the red boxes in the picture below (I think it will be better explained with this).


My OMP website is http://carano.pustaka.unand.ac.id, and it is just endorsed by our National Library.

Thanks for the information @lcbossert. I went ahead and reinstalled, and it’s working now.

I got the Issue again in a brand new installation, so…

How to fix it

1) go to settings->website->plugins and activate the “Manual Fee Payment” setting.

2) got to settings->distribution->payments and enter something in “Manual Payment Instructions” and hit save.

The reason for that error is twofold:

1) Error handling in smarty function:

In smartyPluckFiles (smarty function {pluck_files}),
lib/pkp/classes/template/PKPTemplateManager.inc.php l. 1668
you find that smarty gets back en empty array in case of a missing or null parameter.
But smarty always expects printable retun values (compare: Smarty :: View topic - get array item from custom function)
so it prints the word Array. Instead, the function pluck_files would need an assign-parameter

Solution: Instead of

return array();

we should use

$smarty->assign($params['assign'], array());

2) the error itself

In /pages/catalog/CatalogBookHandler.inc.php l. 94 the condition

if ($ompPaymentManager->isConfigured()) {

prevents availableFiles from being assigned if isConfigured for current paymentPlugin gets false. Wich is the case when 'manualInstructions') == ''
compare lib/pkp/classes/payment/PaymentManager.inc.php l. 60
and plugins/paymethod/manual/ManualPaymentPlugin.inc.php l. 65

I would consider this as a bug and remove the if ($ompPaymentManager->isConfigured()) { condition.

Shall I do pull-requests for both?

Hi @paf,

I believe that’s related to this filed issue – It’s already assigned to a developer but I believe he hasn’t had time to look at it yet. I’ll point him to this post.

Alec Smecher
Public Knowledge Project Team

Hi @paf,

I assumed this issue was related to changes we made in the underlying lib around how we display primary/supplementary galleys. But I haven’t looked into it at all.

If you can work up a PR and reference it in the issue Alec mentioned above, I’d love to take a look at it. Might save me some time digging around to figure out what’s going on. :+1:

Hi @NateWr, @asmecher,
allright, I’ll make some pr tomorrow (it’s late here).
Best, Paflow

I did two pull requests for that:

Best, Paflov

1 Like

Buenas, soy nuevo en OMP tengo problemas para crear el formato de publicación, no me aparece el listado y no me esta mostrando los PDF en los que a sido cargado los capítulos y el libro, como puedo solucionarlo.

Good, I’m new to OMP I have problems to create the publication format, I do not see the list and it is not showing me the PDFs in which the chapters and the book have been loaded, how can I fix it