Linkstack Error 500 when adding links

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.1.14
What app is this about: Linkstack

Describe your issue

There’s a 500 error when adding links. I can no longer add links. This has been an ongoing issue for a while. There is a GitHub issue that has been open since Jan 5th, but they’re also running YunoHost so I’m wondering if it’s an issue specific to YNH.

I think there’s also another open issue here on this forum but it’s in French :frowning: I tried translating it but it looks like it hasn’t been resolved.

For some reason I can’t add a Linkstack tag to this post, so if someone wants to add it, please go ahead.

Share relevant logs or error messages

“500 | Server Error”

Hey, I found a workaround!

The problem seems to be some change of format in the links json file. The old (up to version 4.8.0?) json format is not compatible with newer versions (4.8.1~ynh2 and above).

I played around exporting the link json or user json and got an error when trying to import the backups.

Here is the workaround:

  1. Backup linkstack in yunohost
  2. Export the user data (user json file and link json file) here is how:

2a) Click on the Menu in the top right corner (below your user name and icon)
2b) The Menu will show. Click on the “Settings” Button.

2c) The Settings page will load. On the bottom half of the page you will see the section “Export user data”

2d) Click on “Expoeŕt all data” or on “Export links only” (tested by me)

  1. Update your linkstack version in yunohost or install it new

  2. Create a json file with the target format (=new linkstack version file format)
    4a) Create some links and some other elements that are used in the linkstack account that you export

  3. Export the user data (see steps above)

  4. Compare old and new file format so you can edit the old json file to match the new json file. Here is how:

6a) MANUAL edit:

  1. Add the type field:
  • Items with a link value (URLs) get "type": "link"
  • Items with link: null get "type": "heading"
  1. Add the type_params field:
  • Links get "type_params": "{\"custom_html\":false,\"ignore_container\":false,\"include_libraries\":[]}"
  • Headings get "type_params": "{\"custom_html\":true,\"ignore_container\":false,\"include_libraries\":[]}"

6b) Automatic edit

Use whatever tool you want to add the fields above automatically. Claude.ai worked for me with the following prompt:

Bring the file attached into the following format, while keeping the content of the file.

  1. Import the matched json file to linkstack. The import should show no error.

  2. You should see all your old links. Some elements might faulty. Example:

Enjoy

1 Like

I appreciate the workaround but that’s a whole lot of work. I’ll continue waiting for a proper fix. Thank you.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.