Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZIM Entry have no title #125

Closed
kelson42 opened this issue Dec 18, 2021 · 6 comments · Fixed by #126
Closed

ZIM Entry have no title #125

kelson42 opened this issue Dec 18, 2021 · 6 comments · Fixed by #126
Assignees
Milestone

Comments

@kelson42
Copy link
Contributor

I just discovered that TED ZIM files, with the page providing one talk (so not the welcome page), have an empty title.

See for example http://library.kiwix.org/ted_en_technology

As a consequence, the suggestion system is completly broken for the ZIM files.

@mgautierfr
Copy link

As a consequence, the suggestion system is completly broken for the ZIM files.

It seems a bit excessive here. The suggestion is working.

  • We index the title using the "real" title, as the title is empty, we don't (title) index the entry.
  • As we never title index a entry, the entry index is empty and we don't write it in the zim file.
  • At search time, as there is no (xapian) title index, we fallback to a suggestion search in the entry listing.
  • Here, if there is no title, we use the path as title.
  • So the suggestion is equivalent to a search by path. A search with The returns result (all entries starting by "the")

But yes, it is a regression as we don't use the recent feature of a xapian title index and we regress to the old suggestion system (using path instead of title)

@rgaudin
Copy link
Member

rgaudin commented Dec 22, 2021

Agrees but there might be a ted-scraper regression as TED DOM changed so we might not store titles where we used too. That's how I understood the ticket.

@kelson42
Copy link
Contributor Author

I have created a ticket at zimcheck level to avoid this happens in the future, see openzim/zim-tools#272

@rgaudin
Copy link
Member

rgaudin commented Dec 30, 2021

Actually this is not a regression at all. ted2zim v2 never had titles on entries

@rgaudin rgaudin changed the title [REGRESSION] ZIM pages don't have any title anymore ZIM Entry have no title Dec 30, 2021
rgaudin added a commit that referenced this issue Dec 30, 2021
Because ted2zim's UI is somewhat multilang, video pages contains a list of the
retrieved titles for all the wanted languages.
A piece of JS uses the URL query language to set the <title>'s accordingly but the
HTML source had no title, resulting in empty Title on ZIM entries (ted2zim is still
using zimwriterfs-like mode).
Without changing this behavior, this sets the <title> to the *main* language's one.
This language is chosen on --locale or defaults to video's default or English.
Suggestions do work now.
@rgaudin rgaudin linked a pull request Dec 30, 2021 that will close this issue
rgaudin added a commit that referenced this issue Dec 30, 2021
* updated black formatting

* Fixed #125: adding title to ZIM entries

Because ted2zim's UI is somewhat multilang, video pages contains a list of the
retrieved titles for all the wanted languages.
A piece of JS uses the URL query language to set the <title>'s accordingly but the
HTML source had no title, resulting in empty Title on ZIM entries (ted2zim is still
using zimwriterfs-like mode).
Without changing this behavior, this sets the <title> to the *main* language's one.
This language is chosen on --locale or defaults to video's default or English.
Suggestions do work now.
@kelson42
Copy link
Contributor Author

Actually this is not a regression at all. ted2zim v2 never had titles on entries

Wow! Thx for the fix, this desserve a new release?

@rgaudin
Copy link
Member

rgaudin commented Dec 30, 2021

Maybe after #118 ?

@kelson42 kelson42 added this to the 2.1.0 milestone Dec 30, 2021
@kelson42 kelson42 unpinned this issue Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants