Browsing by tag sometimes shows items with alternative tag
digikam at meku.org
Wed Aug 9 13:36:21 BST 2017
Studying the database there appears to be some inconsistent data in the
Tags table causing this.
Tag B probably used to be a child of Tag A, but some time ago Tag B was
moved to the root.
Tag B's 'pid' is '0' because it a child of the root node, but the 'lft' and
'rgt' fields have not been updated so still fall within the range of Tag
A's 'lft' and 'rgt'.
If browsing using Tags with "Include Tag Sub-Tree" enabled relies on the
'lft' and 'rgt' fields then it would explain the inconsistent behaviour I'm
seeing - and it appears it only happens to Tags that have been moved in the
Is this a bug, and is there a mysql query to repair it?
On 8 August 2017 at 23:45, Mario Frank <mafrank at uni-potsdam.de> wrote:
> Hi Meku,
> this is odd, as when the disabling solves the problem, the unexpected
> items must have
> a tag that is a child tag of A. At least for sanity reasons.
> The source code itself looks good. Gilles, can you take a look at the
> definition of
> getItemIDsInTagRecursive in the dbconfig? For me, it looks correct, too.
> Can you send a screenshot or something like this?
> Am 08.08.2017 um 15:10 schrieb meku:
> Hi Mario,
> Yes, disabling "Include Tag Sub-Tree" hides the unexpected items.
> Tag B is not a child of Tag A and the unexpected items do not have Tag A
> or any of A's child tags.
> I can work with mysql queries.
> On 8 August 2017 at 22:55, Mario Frank <mafrank at uni-potsdam.de> wrote:
>> Hi Meku,
>> can you check the following?
>> In menu View: is the option "include tag tree" (I do not know how it is
>> called exactly in the English version, I have the German one)
>> checked? If yes, images with subtags are also shown in the browser and
>> may have tag B.
>> Otherwise, do you have experience with MySQL queries?
>> Am 08.08.2017 um 14:46 schrieb meku:
>> > I am seeing some inconsistent behaviour when browsing items by Tags.
>> > Selecting a single tag (A) in the tree shows all items with tag (A)
>> > but also unrelated items with tag (B). So far I have only discovered
>> > this happening for a few specific tags, but it continues happening
>> > after restarting Digikam.
>> > If I use the Search for tag (A) then it shows the expected results,
>> > it's only within the Tag browser that this issue is occurring.
>> > Using Digikam 5.7 appbundle with mysql.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Digikam-users