Zim

Tag is not indexed if not recognized by on-the-fly reformatting

Bug #791817 reported by Jiří Janoušek
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Low
Unassigned

Bug Description

Zim trunk, r404.

Steps to reproduce:
1) On the new line type "foo bar @baz" (no another space/Enter)
2) Tag is not recognized by on-the-fly reformatting (it's proper behavior)
3) Save page (or wait for autosave feature)
4) Tag is not indexed (not shown in tag cloud).
5) Reload the page
6) Tag was recognized by parser (brown color), but it isn't still indexed.
7) Modify the page and save.
8) The tag is finally indexed.

Expected behavior:
Tag should be indexed already in the step 4 (or in the step 6 at the latest).

The Cause:
The indexing code seems to use TextBuffer.get_parsetree() for tag indexing, but it may contain unrecognized tags.

Quick Fix:
Convert TextBuffer.get_parsetree() to the wiki format and then back to Parsetree to be sure all tags will be recognized and index this new Parsetree.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :
Revision history for this message
Jiří Janoušek (fenryxo) wrote :
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

See also bug #793312 for a similar issue with same root cause

Changed in zim:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Will commit fix rev432 -- put fix one level deeper in buffer.get_parsetree() and removed couple of places where this was hacked in already

Changed in zim:
status: Confirmed → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Removed this fix again from rev432 due to a regression in testing. Will re-apply the fix in a separate patch.

Changed in zim:
status: Fix Committed → In Progress
Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

Thanks for the workaround (remodification + saving again). I use tags to track "todo" pages, and only just realised that most of these were missing from the tag cloud, and couldn't be found from the search dialogue.

(Is there a possibility to apply the fix, or is there still a regression?)

Revision history for this message
vanadium (ftack) wrote :

This bug may also be the cause that tagged "to do" items do not always appearing under their tag in the task list. This causes the listing of tasks per tag to be highly unreliable: tasks labeled sometimes appear, sometimes not. For this reason, I think this issue should be given more importance as it cripples the functionality of the task plugin.

Revision history for this message
vanadium (ftack) wrote :

I should have added that this concerns Zim 0.60 which now is included in the Ubuntu 13.10 repository. The issue was not there in the previous Zim edition coming with 13.04.

Revision history for this message
Sparhawk (sparhawkthesecond) wrote :

I'd definitely like to see the priority bumped on this. For my usage, it's almost equivalent to loss of data, as it's not obvious that I've lost the index's reference to tags.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

This is now working correctly in the latest dev snapshot.

Changed in zim:
status: In Progress → Fix Committed
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Fixed in release 0.61

Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.