availableFiles is set when all publication formats are disabled


when there are approved files in unavailable publication formats, the template displays the download tab but without content.

In the catalog:

The book page:

The problem seems to be the variable $availableFiles in bookInfo.tpl (defined in pages\catalog\CatalogBookHandler.inc.php). The variable is true, when there is an available file. But there is no check if the publication format the file is assigned to is available as well.

Is it possible to add a check like this? Or are there reasons for this solution that I am not seeing?

Tanks and best regards,

Hi @lilients,

Did you patch this issue? At a glance it might be the same:

Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

thanks! I am overwriting the template bookInfo.tpl in a plugin and did no take the changes to the new template. -.-

Your patch solves both problems. But in another way than I thought. When I uncheck the metadata checkbox (“Catalog”) and check the “available” checkbox (see screenshot), I would think the file should be downloadable and no metadata displayed. Now none of both is displayed. But would it be possible to display the file and hide its metadata?

Sorry for the confusion!