<div dir="ltr">Studying the database there appears to be some inconsistent data in the Tags table causing this.<div><br></div><div>Tag B probably used to be a child of Tag A, but some time ago Tag B was moved to the root.</div><div><br></div><div>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'.</div><div><br></div><div>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 hierarchy.</div><div><br></div><div>Is this a bug, and is there a mysql query to repair it?<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 August 2017 at 23:45, Mario Frank <span dir="ltr"><<a href="mailto:mafrank@uni-potsdam.de" target="_blank">mafrank@uni-potsdam.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Meku,</p>
<p>this is odd, as when the disabling solves the problem, the
unexpected items must have</p>
<p>a tag that is a child tag of A. At least for sanity reasons.</p>
<p>The source code itself looks good. Gilles, can you take a look at
the definition of</p>
<p>getItemIDsInTagRecursive in the dbconfig? For me, it looks
correct, too.</p>
Can you send a screenshot or something like this?<br>
<br>
Cheers,<br>
Mario<div><div class="h5"><br>
<br>
<div class="m_-33640710726846241moz-cite-prefix">Am 08.08.2017 um 15:10 schrieb meku:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Mario,
<div><br>
</div>
<div>Yes, disabling "Include Tag Sub-Tree" hides the unexpected
items.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>I can work with mysql queries.</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 8 August 2017 at 22:55, Mario Frank
<span dir="ltr"><<a href="mailto:mafrank@uni-potsdam.de" target="_blank">mafrank@uni-potsdam.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Meku,<br>
<br>
can you check the following?<br>
<br>
In menu View: is the option "include tag tree" (I do not
know how it is<br>
called exactly in the English version, I have the German
one)<br>
<br>
checked? If yes, images with subtags are also shown in the
browser and<br>
may have tag B.<br>
<br>
Otherwise, do you have experience with MySQL queries?<br>
<br>
Cheers,<br>
<br>
Mario<br>
<div class="m_-33640710726846241HOEnZb">
<div class="m_-33640710726846241h5"><br>
<br>
Am 08.08.2017 um 14:46 schrieb meku:<br>
> I am seeing some inconsistent behaviour when
browsing items by Tags.<br>
><br>
> Selecting a single tag (A) in the tree shows all
items with tag (A)<br>
> but also unrelated items with tag (B). So far I
have only discovered<br>
> this happening for a few specific tags, but it
continues happening<br>
> after restarting Digikam.<br>
><br>
> If I use the Search for tag (A) then it shows the
expected results,<br>
> it's only within the Tag browser that this issue is
occurring.<br>
><br>
> Using Digikam 5.7 appbundle with mysql.<br>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div>