nextcloud / bookmarks

🔖 Bookmark app for Nextcloud
https://apps.nextcloud.com/apps/bookmarks
GNU Affero General Public License v3.0
1.03k stars 174 forks source link

can t create new tag correctly #2244

Closed pra75011 closed 3 days ago

pra75011 commented 4 days ago

can t create a new tag when i create a new tag in 'new tag' / 'nouvelle étiquette' , it s created, if i reload / refresh you can see the tag gone you can take a look https://nxt.pra.rip/index.php/s/9Nc9MWWnYdsTZT3 nxt-bookmark-1.png show the creation nxt-bookmark-2.png show the tag displayed (just after creation) nxt-bookmark-3.png show the tag gone (after refresh) nxt-bookmark-4.png show tag research doesn t find the tag

i have some bookmark with this tag : nxt-bookmark-5.png

To Reproduce Steps to reproduce the behavior:

  1. nxt-bookmark-1.png show the creation
  2. nxt-bookmark-2.png show the tag displayed (just after creation)
  3. nxt-bookmark-3.png show the tag gone (after refresh
  4. nxt-bookmark-4.png show tag research doesn t find the tag

Expected behavior A clear and concise description of what you expected to happen.

Screenshots https://nxt.pra.rip/index.php/s/9Nc9MWWnYdsTZT3

Desktop (please complete the following information):

Server (please complete the following information):

Additional context nxt=# \d oc_bookmarks_tags Table « public.oc_bookmarks_tags » Colonne | Type | Collationnement | NULL-able | Par défaut
-------------+------------------------+-----------------+-----------+----------------------- bookmark_id | bigint | | not null | tag | character varying(255) | | not null | ''::character varying Index : "oc_bookmarks_tags_pkey" PRIMARY KEY, btree (bookmark_id, tag) "bookmark_tag" UNIQUE, btree (bookmark_id, tag)

nxt=# \d oc_bookmarks Table « public.oc_bookmarks » Colonne | Type | Collationnement | NULL-able | Par défaut
---------------+-----------------------+-----------------+-----------+------------------------------------------ id | bigint | | not null | nextval('oc_bookmarks_id_seq'::regclass) url | text | | not null | ''::text title | text | | not null | ''::text user_id | character varying(64) | | not null | ''::character varying description | text | | not null | ''::text added | integer | | | 0 lastmodified | integer | | | 0 clickcount | integer | | not null | 0 last_preview | integer | | | 0 available | boolean | | | true archived_file | bigint | | | html_content | text | | | text_content | text | | | Index : "oc_bookmarks_pkey" PRIMARY KEY, btree (id) "bookmarks_clickcount" btree (clickcount) "bookmarks_dead" btree (available) "bookmarks_deadbyuser" btree (user_id, available) "bookmarks_modified" btree (lastmodified) "bookmarks_user_clickcount" btree (user_id, clickcount) "idx_3ee1cd04a76ed395" btree (user_id) "idx_3ee1cd04df091378" btree (last_preview)

nxt=# select * from oc_bookmarks_tags where tag='tickets'; bookmark_id | tag
-------------+--------- 411 | tickets 412 | tickets (2 lignes)

nothing pertinent in log

thank you for your help pra

github-actions[bot] commented 4 days ago

Hello :wave:

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

pra75011 commented 4 days ago

hello Marcel hope you are well thank you for your time

marcelklehr commented 4 days ago

Hey @pra75011 I'm good, thank you :)

i have some bookmark with this tag : nxt-bookmark-5.png

Could it be that these bookmarks are shared with you?

Generally, when creating a tag, you need to immediately assign it to a bookmark for it to stay visible across page reloads.

pra75011 commented 3 days ago

I'm good, thank you :) super

Could it be that these bookmarks are shared with you? yes : nxt=# select user_id from oc_bookmarks where url like '%jira%' ; user_id

boulot boulot boulot boulot boulot boulot boulot boulot boulot boulot (10 lignes)

my user_id is pra

will try to create the tad under user_id = boulot i update you soon

Generally, when creating a tag, you need to immediately assign it to a bookmark for it to stay visible across page reloads. it was what i done too in db i can see : nxt=# select * from oc_bookmarks_tags where tag='tickets'; bookmark_id | tag
-------------+--------- 411 | tickets 412 | tickets (2 lignes)

but it s not in tag search , not in left in ui : you can see in nxt-bookmark-6.png (new screenshot) and nothing in tag search : nxt-bookmark-7.png (new screenshot)

is the both tables description i posted are corrects (oc_bookmarks,oc_bookmarks_tags) ?

nxt=# \d oc_bookmarks_tags Table « public.oc_bookmarks_tags » Colonne | Type | Collationnement | NULL-able | Par défaut -------------+------------------------+-----------------+-----------+----------------------- bookmark_id | bigint | | not null | tag | character varying(255) | | not null | ''::character varying Index : "oc_bookmarks_tags_pkey" PRIMARY KEY, btree (bookmark_id, tag) "bookmark_tag" UNIQUE, btree (bookmark_id, tag)

nxt=# \d oc_bookmarks Table « public.oc_bookmarks » Colonne | Type | Collationnement | NULL-able | Par défaut ---------------+-----------------------+-----------------+-----------+------------------------------------------ id | bigint | | not null | nextval('oc_bookmarks_id_seq'::regclass) url | text | | not null | ''::text title | text | | not null | ''::text user_id | character varying(64) | | not null | ''::character varying description | text | | not null | ''::text added | integer | | | 0 lastmodified | integer | | | 0 clickcount | integer | | not null | 0 last_preview | integer | | | 0 available | boolean | | | true archived_file | bigint | | | html_content | text | | | text_content | text | | | Index : "oc_bookmarks_pkey" PRIMARY KEY, btree (id) "bookmarks_clickcount" btree (clickcount) "bookmarks_dead" btree (available) "bookmarks_deadbyuser" btree (user_id, available) "bookmarks_modified" btree (lastmodified) "bookmarks_user_clickcount" btree (user_id, clickcount) "idx_3ee1cd04a76ed395" btree (user_id) "idx_3ee1cd04df091378" btree (last_preview)

thank you for your help

pra75011 commented 3 days ago

hello yes correct i can create ticket tag under user_id boulot thank you for your help thus should be grate to share tag too when we share bookmarks ... but how to manage conflicts in the bookmark code same issue as Tags missing in shared Links #2236 i think we can close or merge ticket sorry to eaten your time pra

marcelklehr commented 3 days ago

Ah, yes, I'm aware of that ticket. We can close this in favor of that one, then :)

sorry to eaten your time

No worries :) I'm glad I could help you! 💙