-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linkwarden updating a URL not working #1742
Comments
Hello 👋 Thank you for taking the time to open this issue with floccus. I know it's frustrating when software 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, I look forward to working with you on this issue |
Hey @Morethanevil |
Great news! :) Will try out when released! |
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 |
Mmh, not even when you force a sync up? The mapping failure on android is a known issue, which is likely unrelated. |
I changed an URL, then clicked on upload once, opened Linkwarden but still the old URL |
cc @daniel31x13 It seems that PUT to linkwarden with the new URL still doesn't work |
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(),
}); |
@marcelklehr can you please provide the steps for using Floccus with Linkwarden on your site? |
@187622085 Ah, you mean publish a linkwarden guide? Yep, good point! |
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? |
@marcelklehr because they can be either In zod:
|
But then what am I doing wrong? |
@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 |
Ah, I'm missing the id |
see #1742 Signed-off-by: Marcel Klehr <[email protected]>
Should be fixed in v5.3.4 |
@Morethanevil Can you confirm? |
Yes works fine, tested with Linkwarden 2.8.3 and Floccus 5.3.4 Thanks! :) |
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
The text was updated successfully, but these errors were encountered: