kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.github.io/kitodo-presentation/
GNU General Public License v3.0
39 stars 45 forks source link

Multivolume Work: page view: three "undefined" in navigation #350

Closed BFallert closed 4 years ago

BFallert commented 5 years ago

When i open a Multivolume Work in page view i see tree "undefined" in navigation:

<ul class="tx-dlf-navigation">
....
<li class="tx-dlf-navigation-edit">undefined</li>
<li class="tx-dlf-navigation-editRemove" style="padding-left: 4px;">undefined</li>
<li class="tx-dlf-navigation-magnifier" style="padding-left: 4px;">undefined</li>

You can see this in the Demo-Installation Das Steinkohlenrevier von Lugau-Oelsnitz: https://presentation-demo.kitodo.org/index.php?id=4&tx_dlf%5Bid%5D=797&tx_dlf%5Bpage%5D=1

image

For a volume or monograph, the following will be displayed instead image

sebastian-meyer commented 5 years ago

@chrizzor May I assign this to you since it seems to be a bug with the basket feature?

chrizzor commented 5 years ago

Thanks for the advice.I take a look.

chrizzor commented 5 years ago

In my opinion this is not a bug with the basket feature or with the presentation extension at all. The undefined is generated from the javascript in the presentation-package extension. @BFallert Can you create the same issue at the presentation-package

BFallert commented 5 years ago

@chrizzor i think this is nothing from the presentation-package, you can only hide the error there, The presentation-package search a <div class="tx-dlf-navigation-edit">###EDITBUTTON###</div> and transform them to a li element. But the original ###EDITBUTTON### which is defined in the Plugin/PageView.php Line 116 or 119 is undefined.

I'm not completely sure, but as far as I can tell, this is the mistake.

Nevertheless, I have recreated the issue in kitodo / kitodo-demo (presentation package) as desired https://github.com/kitodo/kitodo-demo/issues/12

chrizzor commented 5 years ago

The PageView plugin doesn't return any output in the given case, because of this if condition: PageView.php

That's the reason why I would say that it is not a bug with the presentation extension. The javascript in the presentation-package should be more robust and should show the buttons grayed out even if they are not available.

sebastian-meyer commented 4 years ago

Closing this because of https://github.com/kitodo/kitodo-presentation/issues/350#issuecomment-505291179