v8.1.3
8.3.8 8.0.37-0ubuntu0.24.04.1
11.5.0
removing a category from the dashboard i would expect it to remove all references.
With how i personally solved it. however I suspect the bug needs to be fixed in pull request.
did some basic renaming and pruning unused categories using the web ui dashboard.
The issue that arouse was that someone had a request that had a category id of one that was pruned. This went unnoticed until someone went to check some requests. This caused a 500 error
so it appears the web interface may not doing a proper clean up when you remove an entry.
laravel log snippet:
Attempt to read property "name" on null (View: /var/www/html/resources/views/livewire/torrent-request-search.blade.php) (View: /var/www/html/resources/views/livewire/torrent-request-search.blade.php) {"userId":3,"exception":"[object] (Illuminate\View\ViewException(code: 0): Attempt to read property "name" on null (View: /var/www/html/resources/views/livewire/torrent-request-search.blade.php) (View: /var/www/html/resources/views/livewire/torrent-request-search.blade.php) at /var/www/html/storage/framework/views/7b59ca7d17fb079cac0a087781a4a783.php:79)
[stacktrace]
the offending entry was found using the following:
mysql> SELECT r.id, r.category_id
FROM requests r
LEFT JOIN categories c ON r.category_id = c.id
WHERE c.id IS NULL;
in mycase yielded:
+----+-------------+
| id | category_id |
+----+-------------+
| 34 | 26 |
+----+-------------+
1 row in set (0.03 sec)
that is one of the categories that was removed using the webui admin panel.
i updated the field manually to a known good category:
mysql> UPDATE requests
-> SET category_id = 11
-> WHERE id = 34;
and then clear the cache. Everything running smoothly again.
I suspect when you delete a category it does not look for any existing requests that use that category. perhaps it should and halt (preventing the removal of e the category until the requests are updated) or perhaps prompting what to set the stranglers to.
Hope this is helpful, since my personal issue is fixed. feel free to close this if this is not helpful
No response
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too