
Found when looking into https://github.com/nextcloud/android/issues/7192
Hi there, this bug is easy to reproduce:
Failed to update steps in collaboration plugin TypeError: OCA.Viewer is undefined
(I commented here to add the text of the error in case some people search for it through a search engine)
I also ran into this issue. Unlike what the title suggests, for me it also breaks when viewing a markdown file through a read-only share link.
Looking at the generated HTML, it seems that the javascript file for the viewer app is not included in the page, which explains why OCA.Viewer is not available. Maybe there is a missing dependency in this app somewhere (not sure how this stuff works, though). It seems that when editing the markdown file through the regular edit interface (i.e. when logged in), the viewer app js is included in the <head> (maybe because some other app that is also used in this view does declare the dependency correctly or so?):
<script nonce="" defer="" src="/apps/viewer/js/viewer-main.js?v=855d4adb-3"></script>
Most helpful comment
Hi there, this bug is easy to reproduce:
(I commented here to add the text of the error in case some people search for it through a search engine)