LinkStack icon indicating copy to clipboard operation
LinkStack copied to clipboard

Adding or editing links result in 500 Server Error

Open cloo opened this issue 11 months ago • 14 comments

LinkStack version

4.8.4

Description

After update to 4.8.4 (or could be earlier, as I did not edit links every time), adding and editing links broke. Interfaces work well, but clicking on "Save" and "Save and add more" result in Error 500.
Deleting links is permitted. Trying to create a backup also results in 500. File access permissions in "diagnosis" page are reported as ok. File permissions in system are linkstack:www-data. Tried to bulk-change to linkstack:linkstack without success.

Details about your system

Debian 12, YunoHost 12.0.9.1 (stable), bare metal home server.

How to reproduce

not sure what info to provide here.

Possible Solution

No response

Additional Context

No response

cloo avatar Jan 05 '25 10:01 cloo

Could you provide a stack trace or error log?

JulianPrieber avatar Jan 09 '25 11:01 JulianPrieber

I need some help here. /var/log has no linkstack folder, and in linkstack docs do not help me find it. Getting stack trace seems to require specific knowledge too.

cloo avatar Jan 11 '25 15:01 cloo

Same here. Also special blocks like headings / spacers are broken.

This should be a heading: Image

matebitte avatar Jan 20 '25 08:01 matebitte

Here’s what I could gather with debug mode enabled: https://flareapp.io/share/KPgYM2q5#debug

No context block, since there’s sensitive info there. If you need something specific, let me know.

matebitte avatar Jan 20 '25 08:01 matebitte

hi I have the same error. here is the trace of the Instance my Link https://flareapp.io/share/xPQvVN17

breakiboy avatar Jan 23 '25 19:01 breakiboy

I tried running the failed MySQL query for adding a social link directly in my database client, and found that the strings are not in quotations, leading to a format-related error from my DB. Not sure if this is the problem, but it seems to be related to the database in some way.

Original:

insert into links (link, user_id, title, button_id, id, updated_at, created_at) values (https://github.com/devinbaeten, 1, github, 94, 395209690, 2025-01-26 00:53:32, 2025-01-26 00:53:32)

Corrected:

insert into `links` (`link`, `user_id`, `title`, `button_id`, `id`, `updated_at`, `created_at`) values ('https://github.com/devinbaeten', 1, 'github', 94, 395209690, '2025-01-26 00:53:32', '2025-01-26 00:53:32')

devinbaeten avatar Jan 26 '25 01:01 devinbaeten

@tvx-matt, is this fixed on v4.8.4? I am currently running this version and experience the issue.

devinbaeten avatar Feb 07 '25 16:02 devinbaeten

My bad, @devinbaeten, It seems I got this confused with another previous fix for the same / similar issue previously.

I do not however seem to have this issue on the Latest Beta versions.

tvx-matt avatar Feb 07 '25 16:02 tvx-matt

@tvx-matt, got it. Thanks for confirming. It's not a critical issue for me, so I will most likely wait to test further until the fix is brought to a new release.

devinbaeten avatar Feb 07 '25 17:02 devinbaeten

I am also encountering the same problem now. And because I activated "Automatic Upgrade" as soon as I installed it, I can't add links now.

LegendAdmin avatar Mar 11 '25 09:03 LegendAdmin

I was not able to reproduce this issue, it seems to work for me, are you still having the problems?

tvx-matt avatar Apr 03 '25 22:04 tvx-matt

I ran into the same issue. Downgrading from 4.8.4 to 4.8.0 resolved it for me.

I haven't looked into it in depth, but from what I can tell, the problem first appeared in 4.8.1.

AmberByte avatar Apr 06 '25 09:04 AmberByte

I ran into the same issue. Downgrading from 4.8.4 to 4.8.0 resolved it for me.

I haven't looked into it in depth, but from what I can tell, the problem first appeared in 4.8.1.

I can confirm this :(

lwc-berlin avatar Aug 23 '25 14:08 lwc-berlin

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 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
  2. Export the user data (user json file and link json file) here is how:
Image

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.

Image

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 or install it new from scratch (= tested by me)

  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:

Image

Enjoy

lwc-berlin avatar Aug 24 '25 14:08 lwc-berlin