[GH-ISSUE #1742] Linkwarden updating a URL not working #1164

Closed
opened 2026-02-25 22:39:11 +03:00 by kerem · 19 comments
Owner

Originally created by @Morethanevil on GitHub (Oct 8, 2024).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1742

Which version of floccus are you using?

5.3.0

How many bookmarks do you have, roughly?

150

Are you using other means to sync bookmarks in parallel to floccus?

No

Sync method

Linkwarden

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Firefox latest stable

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

No response

Describe the Bug

If you create a bookmark and later update its URL, it is not updated in Linkwarden. It still refers to the old URL. Sometimes URLs gets updated like in GitHub when the repo changes from private to organization, or you remove unnecessary parts of it like trackers etc...

I know it is not possible to edit URLs in Linkwarden too, but maybe this is something to worked on.

Expected Behavior

Update the URL or delete the old one and save the new one. Maybe moving the old one to an "archive" would be great.

To Reproduce

Create a bookmark, wait for Linkwarden to finish. Update the URL :)

Debug log provided

  • I have provided a debug log file
Originally created by @Morethanevil on GitHub (Oct 8, 2024). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/1742 ### Which version of floccus are you using? 5.3.0 ### How many bookmarks do you have, roughly? 150 ### Are you using other means to sync bookmarks in parallel to floccus? No ### Sync method Linkwarden ### Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please. Firefox latest stable ### Which version of Nextcloud Bookmarks are you using? (if relevant) _No response_ ### Which version of Nextcloud? (if relevant) _No response_ ### What kind of WebDAV server are you using? (if relevant) _No response_ ### Describe the Bug If you create a bookmark and later update its URL, it is not updated in Linkwarden. It still refers to the old URL. Sometimes URLs gets updated like in GitHub when the repo changes from private to organization, or you remove unnecessary parts of it like trackers etc... I know it is not possible to edit URLs in Linkwarden too, but maybe this is something to worked on. ### Expected Behavior Update the URL or delete the old one and save the new one. Maybe moving the old one to an "archive" would be great. ### To Reproduce Create a bookmark, wait for Linkwarden to finish. Update the URL :) ### Debug log provided - [ ] I have provided a debug log file
kerem 2026-02-25 22:39:11 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 8, 2024):

Hello 👋

Thank you for taking the time to open this issue with floccus. 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 I created floccus a few years ago, maintaining it ever since. I currently work for Nextcloud
which 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 have a 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!
To continue the development and maintenance of this project in a sustainable way it is expected that you donate to the project when opening a ticket,
if you're not a donor already. You can find donation options at https://floccus.org/donate/. Thank you!

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 Nextcloud 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.

I look forward to working with you on this issue
Cheers 💙

<!-- gh-comment-id:2398858734 --> @github-actions[bot] commented on GitHub (Oct 8, 2024): Hello :wave: Thank you for taking the time to open this issue with floccus. 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 I created floccus a few years ago, maintaining it ever since. I currently work for Nextcloud which 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 have a 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! To continue the development and maintenance of this project in a sustainable way it is expected that you donate to the project when opening a ticket, if you're not a donor already. You can find donation options at <https://floccus.org/donate/>. Thank you! 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 Nextcloud 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. I look forward to working with you on this issue Cheers :blue_heart:
Author
Owner

@marcelklehr commented on GitHub (Oct 9, 2024):

Hey @Morethanevil
Good news: In the upcoming Linkwarden release editing URLs will be supported

<!-- gh-comment-id:2401796085 --> @marcelklehr commented on GitHub (Oct 9, 2024): Hey @Morethanevil Good news: In the upcoming Linkwarden release editing URLs will be supported
Author
Owner

@Morethanevil commented on GitHub (Oct 9, 2024):

Great news! :)

Will try out when released!

<!-- gh-comment-id:2401960926 --> @Morethanevil commented on GitHub (Oct 9, 2024): Great news! :) Will try out when released!
Author
Owner

@Morethanevil commented on GitHub (Nov 13, 2024):

Tried today with Linkwarden 2.8.0 and Floccus 5.3.3. Floccus syncs fine, but it does not update the URL in Linkwarden. No error message

Android app still gives me error message: "Failed to map parentid: 0" after a while

<!-- gh-comment-id:2472309609 --> @Morethanevil commented on GitHub (Nov 13, 2024): Tried today with Linkwarden 2.8.0 and Floccus 5.3.3. Floccus syncs fine, but it does not update the URL in Linkwarden. No error message Android app still gives me error message: "Failed to map parentid: 0" after a while
Author
Owner

@marcelklehr commented on GitHub (Nov 13, 2024):

Mmh, not even when you force a sync up?

The mapping failure on android is a known issue, which is likely unrelated.

<!-- gh-comment-id:2472866392 --> @marcelklehr commented on GitHub (Nov 13, 2024): Mmh, not even when you force a sync up? The mapping failure on android is a known issue, which is likely unrelated.
Author
Owner

@Morethanevil commented on GitHub (Nov 13, 2024):

I changed an URL, then clicked on upload once, opened Linkwarden but still the old URL

<!-- gh-comment-id:2472934227 --> @Morethanevil commented on GitHub (Nov 13, 2024): I changed an URL, then clicked on upload once, opened Linkwarden but still the old URL
Author
Owner

@marcelklehr commented on GitHub (Nov 13, 2024):

cc @daniel31x13 It seems that PUT to linkwarden with the new URL still doesn't work

<!-- gh-comment-id:2472966682 --> @marcelklehr commented on GitHub (Nov 13, 2024): cc @daniel31x13 It seems that PUT to linkwarden with the new URL still doesn't work
Author
Owner

@daniel31x13 commented on GitHub (Nov 14, 2024):

Strange, I even used Bruno to check the endpoints but it's working.

FYI here's what the schema looks like in Zod:

export const UpdateLinkSchema = z.object({
  id: z.number(),
  name: z.string().trim().max(2048).optional(),
  url: z.string().trim().max(2048).optional(),
  description: z.string().trim().max(2048).optional(),
  icon: z.string().trim().max(50).nullish(),
  iconWeight: z.string().trim().max(50).nullish(),
  color: z.string().trim().max(10).nullish(),
  collection: z.object({
    id: z.number(),
    ownerId: z.number(),
  }),
  tags: z.array(
    z.object({
      id: z.number().optional(),
      name: z.string().trim().max(50),
    })
  ),
  pinnedBy: z
    .array(
      z
        .object({
          id: z.number().optional(),
        })
        .optional()
    )
    .optional(),
});

github.com/linkwarden/linkwarden@c8efd4f9db/lib/shared/schemaValidation.ts (L118)

<!-- gh-comment-id:2475722943 --> @daniel31x13 commented on GitHub (Nov 14, 2024): Strange, I even used Bruno to check the endpoints but it's working. FYI here's what the schema looks like in Zod: ```js export const UpdateLinkSchema = z.object({ id: z.number(), name: z.string().trim().max(2048).optional(), url: z.string().trim().max(2048).optional(), description: z.string().trim().max(2048).optional(), icon: z.string().trim().max(50).nullish(), iconWeight: z.string().trim().max(50).nullish(), color: z.string().trim().max(10).nullish(), collection: z.object({ id: z.number(), ownerId: z.number(), }), tags: z.array( z.object({ id: z.number().optional(), name: z.string().trim().max(50), }) ), pinnedBy: z .array( z .object({ id: z.number().optional(), }) .optional() ) .optional(), }); ``` https://github.com/linkwarden/linkwarden/blob/c8efd4f9db7b873f0d4b4e31bc1821b1dec91161/lib/shared/schemaValidation.ts#L118
Author
Owner

@ghost commented on GitHub (Nov 15, 2024):

@marcelklehr can you please provide the steps for using Floccus with Linkwarden on your site?

<!-- gh-comment-id:2478291481 --> @ghost commented on GitHub (Nov 15, 2024): @marcelklehr can you please provide the steps for using Floccus with Linkwarden on your site?
Author
Owner

@marcelklehr commented on GitHub (Nov 15, 2024):

@187622085 Ah, you mean publish a linkwarden guide? Yep, good point!

<!-- gh-comment-id:2478555093 --> @marcelklehr commented on GitHub (Nov 15, 2024): @187622085 Ah, you mean publish a linkwarden guide? Yep, good point!
Author
Owner

@marcelklehr commented on GitHub (Nov 15, 2024):

This is the code for floccus:

https://github.com/floccusaddon/floccus/blob/develop/src/lib/adapters/Linkwarden.ts#L110-L126

    Logger.log('(linkwarden)UPDATE', {bookmark})
    const {response: collection} = await this.sendRequest('GET', `/api/v1/collections/${bookmark.parentId}`)
    await this.sendRequest(
      'PUT', `/api/v1/links/${bookmark.id}`,
      'application/json',
      {
        url: bookmark.url,
        name: bookmark.title,
        tags: [],
        collection: {
          id: bookmark.parentId,
          name: collection.name,
          ownerId: collection.ownerId,
        },
      })

It seems that I'm missing icon, iconWeight and color? Why doesn't it error though?

<!-- gh-comment-id:2478565939 --> @marcelklehr commented on GitHub (Nov 15, 2024): This is the code for floccus: https://github.com/floccusaddon/floccus/blob/develop/src/lib/adapters/Linkwarden.ts#L110-L126 ```js Logger.log('(linkwarden)UPDATE', {bookmark}) const {response: collection} = await this.sendRequest('GET', `/api/v1/collections/${bookmark.parentId}`) await this.sendRequest( 'PUT', `/api/v1/links/${bookmark.id}`, 'application/json', { url: bookmark.url, name: bookmark.title, tags: [], collection: { id: bookmark.parentId, name: collection.name, ownerId: collection.ownerId, }, }) ``` It seems that I'm missing icon, iconWeight and color? Why doesn't it error though?
Author
Owner

@daniel31x13 commented on GitHub (Nov 15, 2024):

@marcelklehr because they can be either null or undefined.

In zod:

  • nullable() means it can be null.
  • optional() means it can be undefined.
  • nullish() means it can be either null or undefined.
<!-- gh-comment-id:2478606791 --> @daniel31x13 commented on GitHub (Nov 15, 2024): @marcelklehr because they can be either `null` or `undefined`. In zod: - `nullable()` means it can be `null`. - `optional()` means it can be `undefined`. - `nullish()` means it can be either `null` or `undefined`.
Author
Owner

@marcelklehr commented on GitHub (Nov 15, 2024):

But then what am I doing wrong?

<!-- gh-comment-id:2478658937 --> @marcelklehr commented on GitHub (Nov 15, 2024): But then what am I doing wrong?
Author
Owner

@daniel31x13 commented on GitHub (Nov 16, 2024):

@marcelklehr hmm, could you log the response of the following request as well:

await this.sendRequest(
      'PUT', `/api/v1/links/${bookmark.id}`,
      'application/json',
      {
        url: bookmark.url,
        name: bookmark.title,
        tags: [],
        collection: {
          id: bookmark.parentId,
          name: collection.name,
          ownerId: collection.ownerId,
        },
      })

It seems like link updates reflect correctly from the server to the browser but not vice versa. (It's not just the url field.)

<!-- gh-comment-id:2480534019 --> @daniel31x13 commented on GitHub (Nov 16, 2024): @marcelklehr hmm, could you log the response of the following request as well: ```js await this.sendRequest( 'PUT', `/api/v1/links/${bookmark.id}`, 'application/json', { url: bookmark.url, name: bookmark.title, tags: [], collection: { id: bookmark.parentId, name: collection.name, ownerId: collection.ownerId, }, }) ``` It seems like link updates reflect correctly from the server to the browser but not vice versa. (It's not just the `url` field.)
Author
Owner

@marcelklehr commented on GitHub (Nov 16, 2024):

Ah, I'm missing the id

<!-- gh-comment-id:2480546407 --> @marcelklehr commented on GitHub (Nov 16, 2024): Ah, I'm missing the id
Author
Owner

@marcelklehr commented on GitHub (Nov 18, 2024):

Should be fixed in v5.3.4

<!-- gh-comment-id:2482182635 --> @marcelklehr commented on GitHub (Nov 18, 2024): Should be fixed in v5.3.4
Author
Owner

@marcelklehr commented on GitHub (Nov 18, 2024):

@Morethanevil Can you confirm?

<!-- gh-comment-id:2483328811 --> @marcelklehr commented on GitHub (Nov 18, 2024): @Morethanevil Can you confirm?
Author
Owner

@Morethanevil commented on GitHub (Nov 18, 2024):

@Morethanevil Can you confirm?

Yes works fine, tested with Linkwarden 2.8.3 and Floccus 5.3.4

Thanks! :)

<!-- gh-comment-id:2483602224 --> @Morethanevil commented on GitHub (Nov 18, 2024): > @Morethanevil Can you confirm? Yes works fine, tested with Linkwarden 2.8.3 and Floccus 5.3.4 Thanks! :)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 19, 2025):

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:3550034299 --> @github-actions[bot] commented on GitHub (Nov 19, 2025): This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#1164
No description provided.