openzim / wp1

Wikipedia 1.0 engine & selection tools

Home Page:https://wp1.openzim.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to create a ZIM

kelson42 opened this issue · comments

commented

Here my selections:
image

I want to get the ZIM for "Bardo Test Selection", so I click on "Create ZIM"
image

The button "Download ZIM" is greyed and nothing happen when I click on it.

I expect to download or have a way to create the ZIM.

I'm not sure exactly what is going on here, but I imagine it has something to do with old selections not being properly migrated with the ever-changing database schema. I see this in the database, which looks like the ZIM was properly created?

b_id s_updated_at s_version z_id z_selection_id z_status z_task_id z_requested_at z_updated_at z_long_description z_description
493cc3c1-b4fd-4bbb-bc6f-57758b73438f 20230709153814 6 22 2a5be533-007c-47ef-a854-f90f7190b5d2 FILE_READY 6eb8ae16-cd42-4558-89df-dd2a04b76110 20230709153835 20230709154020 NULL Le bardo

Nevermind, I figured it out. Old Builders are returning null for their status, but the Zim File page expects it to be NOT_REQUESTED. Should be an easy fix, to default to NOT_REQUESTED instead of null.

Okay rather than patch the code I issued an update to the database to fix the data. This should be resolved.

Just for record keeping, this is the SQL I ran:

> INSERT INTO zim_files (z_selection_id) SELECT s.s_id FROM selections s LEFT JOIN zim_files z ON z.z_selection_id = s.s_id WHERE z.z_id IS NULL;
Query OK, 59 rows affected (0.004 sec)