Remove/refactor code in zim_prefix.js
that still tests for a favicon with I/
namespace in no-namespace ZIMs
#139
Labels
zim_prefix.js
that still tests for a favicon with I/
namespace in no-namespace ZIMs
#139
The code in zim_prefix.js#L3 in this repo should probably have been removed or refactored when the scraper was upgraded to produce C-namespace / "no namespace" ZIMs, but unfortunately it continues to look for a favicon with an
I/
namespace. See screenshot of code below in a recent Type 1 ZIM,ted_en_playlist-animals-that-amaze_2022-08.zim'
. It produces side effects in my reader, which I have now worked around, but I thought the issue should be documented at source.Further info: The bugs that I've been experiencing related to this issue here: kiwix/kiwix-js-pwa#297, and documented fairly fully here: openzim/nautilus#40, are caused by an interaction between the Kiwix JS PWA reader and code that attempts to read for the location of a favicon in YouTube, TED and Nautilus scrapers. The code does return a namespace of
""
in a no-namespace ZIM (if it runs), but this is a side-effect and probably not even needed any more. The problem for my code was that if there was no favicon, then the code would bug out instead of gracefully returning null, causing a JS exception which prevented display of assets.ZIM DirListing version: 1 ZIMFile {_files: Array(1), name: 'ted_en_playlist-animals-that-amaze_2022-08.zim', id: 4, majorVersion: 6, minorVersion: 1, …}
The text was updated successfully, but these errors were encountered: