Adding or editing links result in 500 Server Error
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
Could you provide a stack trace or error log?
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.
Same here. Also special blocks like headings / spacers are broken.
This should be a heading:
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.
hi I have the same error. here is the trace of the Instance my Link https://flareapp.io/share/xPQvVN17
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')
@tvx-matt, is this fixed on v4.8.4? I am currently running this version and experience the issue.
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, 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.
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.
I was not able to reproduce this issue, it seems to work for me, are you still having the problems?
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 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 :(
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:
- Backup linkstack
- 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)
-
Update your linkstack version or install it new from scratch (= tested by me)
-
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
-
Export the user data (see steps above)
-
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:
- Add the
typefield:
- Items with a
linkvalue (URLs) get"type": "link" - Items with
link: nullget"type": "heading"
- Add the
type_paramsfield:
- 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.
-
Import the matched json file to linkstack. The import should show no error.
-
You should see all your old links. Some elements might faulty. Example:
Enjoy