pierobot / mangapie

This is a self-hosted server for archived manga.
BSD 3-Clause "New" or "Revised" License
63 stars 9 forks source link

Notification link broken. #179

Closed donotos closed 4 years ago

donotos commented 4 years ago

Hey!

After updating to 19f8c67 when i click on the link "New archive(s)" in a notification i have:

https://mangapie.local/manga/%7B%22id%22:114,%22library_id%22:2,%22name%22:%22The%20Monster%20Duchess%20and%20Contract%20Princess%22,%22path%22:%22//mnt//FREENAS//POOL1R//eBooks//Mangas//_En%20cours//XI//The%20Monster%20Duchess%20and%20Contract%20Princess%22,%22created_at%22:%222019-09-12%2012:41:30%22,%22updated_at%22:%222019-09-29%2009:25:19%22,%22mu_id%22:153948,%22type%22:%22Manhwa%22,%22description%22:%22Original%20Novel%22,%22year%22:%222019%22,%22ignore_on_scan%22:0,%22mu_name%22:%22The%20Monster%20Duchess%20and%20Contract%20Princess%22,%22distance%22:1,%22cover_archive_id%22:8859,%22cover_archive_page%22:1%7D/files/asc

kurim commented 4 years ago

I can confirm this issue,

btw. is it intended that the click on image has diffrent sorting than the text link?

resources\views\notifications\index.blade.php

<a href="{{ URL::to("/manga/{$manga}/files", ['sort' => 'desc']) }}">
<a href="{{ URL::to("/manga/{$manga}/files", ['sort' => 'asc']) }}">

If you change {$manga} to {$manga->id} the url will be correct again, but sorting does not add correctly and ends up like this: /manga/63/files/desc instead of this: /manga/63/files?sort=desc

pierobot commented 4 years ago

https://github.com/pierobot/mangapie/commit/002084eec97607518b45e2f061d1ca82ac051c3c should fix both of these problems