Skip to content
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

v2: NOT NULL constraint failed: links.visibility #843

Open
Kovah opened this issue Sep 9, 2024 · 7 comments
Open

v2: NOT NULL constraint failed: links.visibility #843

Kovah opened this issue Sep 9, 2024 · 7 comments

Comments

@Kovah
Copy link
Owner

Kovah commented Sep 9, 2024

From CLI:

In Connection.php line 829:

  SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: links.visibility (Connection: sqlite, SQL: insert into "links" ("user_id", "url", "title", "description", "icon", "visibilit
  y", "created_at", "updated_at") values (1, https://support.mozilla.org/products/firefox, Get Help, ?, link, ?, 2022-07-04 11:42:17, 2024-09-08 08:27:16))

and

In Connection.php line 587:

  SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: links.visibility

This same html file imports successfully in Linkace V1 Docker with MySQL. I believe it is the first link in the file. I will test with another backend on Beta 2 later.

Originally posted by @vfrex in #836 (comment)

@Kovah
Copy link
Owner Author

Kovah commented Sep 9, 2024

@vfrex Could you share a file which causes this error? Couldn't find any obvious problem with the import process.

@vfrex
Copy link

vfrex commented Sep 10, 2024

Sure, just need to strip it down a bit when I have a few minutes later this week.

@vfrex
Copy link

vfrex commented Oct 5, 2024

File is pretty messy from a Chrome->Firefox export/import seemingly duplicating everything a couple of times. I should have all personal stuff removed, but can I send it by e-mail to be safe? Haven't had time to experiment with the other databases.

Side note: I retried the import removing sections/lines that seem to trip up the process. That works to an extent, but the process gets caught elsewhere in the list pretty quickly. The import will also separately error out without php8-iconv (or however it is packaged).

@Kovah
Copy link
Owner Author

Kovah commented Oct 5, 2024

You can send it to [email protected]. Thanks!

@vfrex
Copy link

vfrex commented Oct 6, 2024

Unfortunately, Microsoft's mail servers are just not having it! 554: 5.7.1 REJECT - BAD content found

Thinking about a next best way.

@Kovah
Copy link
Owner Author

Kovah commented Oct 6, 2024

You could also upload the file to wetransfer.com and send the link via mail.
Thanks for taking the time!

@Kovah
Copy link
Owner Author

Kovah commented Oct 6, 2024

Thanks for sending the file.

I have restructured the import to run in the background, executed by the cron. Each link is a separate background job now. You might want to try this with the new beta which will be released in the following days.

After leaving LinkAce running for almost half an hour, 1/3 of the links were imported without issues. As the import seems to be fine, it's probably the visibility setting. Could you have a look at the settings database table? There should be something like this:

id group name locked payload created_at updated_at
34 user-1 links_default_visibility 0 1 2024-10-06 19:49:19 2024-10-06 21:32:34
35 user-1 notes_default_visibility 0 1 2024-10-06 19:49:19 2024-10-06 21:32:34
36 user-1 lists_default_visibility 0 1 2024-10-06 19:49:19 2024-10-06 21:32:34
37 user-1 tags_default_visibility 0 1 2024-10-06 19:49:19 2024-10-06 21:32:34

payload is the actual setting, it can be 1, 2 or 3 but nothing else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants