Bookmarks 3 search function shows "No bookmarks here" - always

With the installation of bookmarks 3 I lost the search function within Nextclould. I just use standard front end no other client. Exporting and importing the bookmarks did not change the behavior.

Does anyone has a clue what went wrong during the upgrade? Is there possibly some kind of old configuration, that need to get fixed? Any idea is welcome.

I am running Nextcloud 18.03 on an Ubuntu 18.04 and a Maria DB. Currently I am using Bookmarks 3.0.12.

Thanks for your help.

I cannot confirm the described behavior on my server. The search function works very well to find desired bookmarks. Without further information about your environment, how this problem can be reproduced or any related log lines from the Nextcloud log file it will most likely impossible to provide an answer.

hmm… should check the log files first… which I did now. Unfortunately I do not understand the log entry. Thanks j-ed for letting me know that it works generally… That already helps.

{"reqId":"nGCdM2U5ihQir0H6jOBe","level":3,"time":"2020-05-11T09:20:59+00:00","remoteAddr":"xxxxxxxxxxx","user":"d******","app":"index","method":"GET","url":"/index.php/apps/bookmarks/bookmark?limit=42&page=0&sortby=title&search[]=heise","message":{"Exception":"Doctrine\\DBAL\\Exception\\NonUniqueFieldNameException","Message":"An exception occurred while executing 

Removed all bookmarks and added just one. So it does not change the error message as shown above.
The error message is followed by a huge select statement. Is there something where I can drill down?

++ EDIT ++
The Error Message is really long. I found additional messages in that line:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'title' in order clause is ambiguous",{"errorInfo":["23000",1052,"Column 'title' in order clause is ambiguous"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}]}, "file":"/var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":145,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["23000",1052,"Column 'title' in order clause is ambiguous"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}

And this is the “order by” part of the statement.

`ORDER BY UPPER(`title`) ASC LIMIT 42' with params [\"d******\", \"d******\", \"%heise%\", \"%heise%\", \"%heise%\", \"%heise%\"]:`

The complete SQL Statement is probably this:

   SELECT `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`user_id` FROM `oc_bookmarks` `b` LEFT JOIN `oc_bookmarks_tags` `t` ON `t`.`bookmark_id` = `b`.`id` LEFT JOIN `oc_bookmarks_tree` `tr` ON `tr`.`id` = `b`.`id` LEFT JOIN `oc_bookmarks_shares` `s` ON `tr`.`parent_folder` = `s`.`folder_id` LEFT JOIN `oc_bookmarks_shared_folders` `p` ON `s`.`id` = `p`.`share_id` WHERE (`b`.`user_id` = ?) OR (`p`.`user_id` = ?) GROUP BY `b`.`id`, `b`.`url`, `b`.`title`, `b`.`description`, `b`.`lastmodified`, `b`.`added`, `b`.`clickcount`, `b`.`last_preview`, `b`.`user_id` HAVING (GROUP_CONCAT(`t`.`tag`)  COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`url`  COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`title`  COLLATE utf8mb4_general_ci LIKE ?) OR (`b`.`description`  COLLATE utf8mb4_general_ci LIKE ?) ORDER BY UPPER(`title`) ASC LIMIT 42' with params [\"d*********\", \"d*********\", \"%Deep%\", \"%deep%\", \"%deep%\", \"%deep%\"]

This select statement is repeated 21 time in a single log entry. Repeating the same error over and over again.

I removed the app completely from the app list and reinstalled it. Uploaded the bookmarks again, but no change in the error message. Updated to the latest Bookmark app available this afternoon with no success.

*** EDIT 2 ***
Test with a new user. Bookmark search worked. So something is wrong with my account. :frowning:

So I have to check what is different between the accounts.

*** EDIT 3 ***
Something must be different between my account and all other accounts on my server.

Maybe one you has an idea where to search next. What I did so far:

  1. Checked the oc_bookmark tables in the database. Removed everything where I found a reference to my account. No success.

  2. Imported my bookmarks to another account. Everything works as expected.

  3. Emptied all bookmark tables in the database, and set it up again, with my account and another one. Mine does not work, the other one did - using the same bookmarks.

  4. On the file system i found a folder “bookmarks” within a Nextcloud generated folder “appdata-[some number]”. That’s where the pictures are stored, just base64 encoded. I removed the contents of this cache folder.
    Emptied the database again, and imported the bookmarks. No change.

  5. I added the other account to the admin group, to make sure, that this has no influence on the search. I does not.

I haven’t found any further location where something about bookmarks is stored. Maybe some other process has an influence on it, but I do not know which one.

The only alternative is to move everything from my account to working one - which may be a challenge, with all the contact data and calendar entries… Somehow I do not want to give up, yet.


1 Like

When Bookmarks is configured to

   Sorting = Alphabetically 

it leads to the error described. At least on my server for all accounts. Any other sorting is OK,

My issue is solved as I have a work around.

1 Like

Thanks for reporting this. It’s a bug. The next release will fix this. :slight_smile:

1 Like

Thanks, then all this public error searching made sense.

By the way: You software helps me every day. :smile:

1 Like

Now that is some good troubleshooting right there