icaruseu / mom-ca

Monasterium.net (http://www.monasterium.net/mom) - repository and collaborative archive
https://github.com/icaruseu/mom-ca/wiki
GNU General Public License v3.0
17 stars 11 forks source link

broken images in charter-to-publish view #1151

Closed NTsch closed 1 year ago

NTsch commented 1 year ago

Certain charters have their images broken in the charter-to-publish view because of wrong/missing URL elements. For example, https://www.monasterium.net/mom/AbbayeDeSaintBertin/a33932c7-e2c4-4e6a-8c97-809060ce76bb/charter in charter-to-publish tries to display something like https://www.monasterium.net/00000288.png, which should be http://images.monasterium.net/img/collections/AbbayeDeSaintBertin/00000288.png. Presumably originates from https://github.com/icaruseu/mom-ca/blob/master/my/XRX/src/mom/app/charter/widget/charter-image-viewer.widget.xml#L107-L124 .

NTsch commented 1 year ago

Trying to retrace what is happening:

  1. $wcharter:image-base-uri is correctly constructed in charter.widget.xml to be http://images.monasterium.net/img/collections/AbbayeDeSaintBertin/. This is the URL part that is missing in charter-to-publish.
  2. $wcharter:image-base-uri is then passed to the charter-image-viewer subwidget as $constructor:image-base-uri here.
  3. However, when I output $constructor:image-base-uri in the charter-image-viewer.widget, its value is /.

That's why the image links are broken, still trying to figure out what causes this. Manually inserting the correct value into the argument being passed to the subwidget works, so it seems the value is lost somewhere between the initial definition at the top and the subwidget.

NTsch commented 1 year ago

Fixed by #1152, thank you.