Bug 292820 - Adding a resource from search results does not work
Summary: Adding a resource from search results does not work
Status: RESOLVED FIXED
Alias: None
Product: Active
Classification: Unmaintained
Component: Contour activity screen (show other bugs)
Version: PA 2
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: unscheduled
Assignee: Marco Martin
URL:
Keywords:
: 296971 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-29 19:55 UTC by Thomas Pfeiffer
Modified: 2013-02-05 18:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Pfeiffer 2012-01-29 19:55:30 UTC
Version:           unspecified (using KDE 4.7.4) 
OS:                Linux

When I search inside the Add items dialog, select one of the search results and tap "Add items", the dialog closes but the resource is not added. When I add the resource from the standard listing without searching, it works.

Reproducible: Always

Steps to Reproduce:
- Tap "Add items"
- Enter text in the search field
- Select one of the search results
- Tap "Add items"

Actual Results:  
Dialog closes, but resource is not added

Expected Results:  
Resource is added

Happened on basyskom-plsma-active-two-meego with updates from today (January 29).
Comment 1 Thomas Pfeiffer 2012-02-01 14:17:40 UTC
This does not happen anymore with 2012-01-31-15-30-basyskom-plasma-active-devel-meego-usb-live.iso, so it seems to be fixed.
Comment 2 Thomas Pfeiffer 2012-02-01 15:48:42 UTC
*grml* Scratch that, it just happened again. Is there any way I can further investigate when this happens and when it doesn't? Some debug output or something?
Comment 3 Lamarque V. Souza 2012-03-07 15:31:02 UTC
I think this bug has something to do with file indexing. I copied a .pdf to PA running in VirtuaBox and was able to reproduce the problem, then I deleted the file and copied the same file again to PA and the problem did not happen.

By what I could see in nepomukshell the only diference between the resource for the two files is that when the problem happen the property nie:title is not present. I do not think that is the source of problem because even when I manually added that property the problem still happened. I really do not know why is wrong here.

The strange thing is that sometimes I delete a file from disk yet nepomuk keeps the resource for it. Most of the time it works as expected (the resource is deleted along with the file).
Comment 4 Lamarque V. Souza 2012-04-03 22:59:48 UTC
Just as a note, re-indexing the file seems to solve the problem. For example:

nepomukindexer /usr/share/contour/demo/contourdemo/Concept_Active.jpg
Comment 5 Lamarque V. Souza 2012-04-10 14:40:12 UTC
I have found another clue about this problem. The resources not added contains more than one "url" property, removing the "url" property that we do not want and restarting the desktop fixed the problem for that file.

The "url" property usually contains the path of the indexed file, for the not-added resources the other "url" property contains a nepomuk's resource uri for another resource. That other resource contains only a few data not related to the indexed file and a "url" property pointing back to the first resource (it looks like a symbolic link). For some reason when creating a Resource object passing the correct resource uri nepomuk creates the resource using the uri of the "link" instead of the resource uri we pass to the Resource's constructor.

I will investigate why more than or "url" property is added to a resource.
Comment 6 Marco Martin 2012-04-10 17:14:36 UTC
so looks like a second, bogus resource is created alongside the real one?
Comment 7 Lamarque V. Souza 2012-04-10 17:19:13 UTC
Yes and the bugs resource is the one being set as related to the activity. Probably nepomukindexer is creating it, I just have not figured out why.
Comment 8 Marco Martin 2012-04-11 08:42:42 UTC
Git commit a44c87ff2aa425d203066e18bf092c353901844a by Marco Martin.
Committed on 11/04/2012 at 10:40.
Pushed by mart into branch 'master'.

move menu offscreen until has the correct size

items have to be actually painted before their implicit width is really know, so the first paint has to be done off screen to avoid size jumps and the menu of 0x0 size for an instant

M  +8    -0    components/SlcMenu.qml

http://commits.kde.org/share-like-connect/a44c87ff2aa425d203066e18bf092c353901844a
Comment 9 Marco Martin 2012-04-11 08:43:38 UTC
Git commit 05e1c74fc5e3d1e480c548dd0ac86627ed2ce1b9 by Marco Martin.
Committed on 11/04/2012 at 10:42.
Pushed by mart into branch 'master'.

use open() for slc menu

M  +1    -3    components/mobilecomponents/ResourceDelegate.qml

http://commits.kde.org/plasma-mobile/05e1c74fc5e3d1e480c548dd0ac86627ed2ce1b9
Comment 10 Marco Martin 2012-04-12 11:03:59 UTC
Git commit 7e66660c39aefbb17429aeb4db20a9f94ac2b2c0 by Marco Martin.
Committed on 11/04/2012 at 10:42.
Pushed by mart into branch 'Active/2.1'.

use open() for slc menu

M  +1    -3    components/mobilecomponents/ResourceDelegate.qml

http://commits.kde.org/plasma-mobile/7e66660c39aefbb17429aeb4db20a9f94ac2b2c0
Comment 11 Lamarque V. Souza 2012-04-16 01:55:08 UTC
*** Bug 296971 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Pfeiffer 2013-02-05 18:25:36 UTC
This problem does not appear in current Devel anymore, seems to be fixed.