Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete in article tries to redirect to deleted article #1964

Closed
xsteadfastx opened this issue Apr 22, 2016 · 9 comments · Fixed by #2156
Closed

Delete in article tries to redirect to deleted article #1964

xsteadfastx opened this issue Apr 22, 2016 · 9 comments · Fixed by #2156
Assignees
Labels

Comments

@xsteadfastx
Copy link

Issue details

When i want to delete a article in the article view i get a 404 error because it reloads the article itself which is not there anymore.

wallabag_1 | ::ffff:172.18.0.7 - - [22/Apr/2016:07:17:16 +0000] "GET /annotations/136?entry=136 HTTP/1.0" 200 21 "https://wallabag.foo.bar/view/136" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:43.0) Gecko/20100101 Firefox/43.0"
wallabag_1 | ::ffff:172.18.0.7 - - [22/Apr/2016:07:17:24 +0000] "GET /delete/136 HTTP/1.0" 302 408 "https://wallabag.foo.bar/view/136" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:43.0) Gecko/20100101 Firefox/43.0"
wallabag_1 | ::ffff:172.18.0.7 - - [22/Apr/2016:07:17:24 +0000] "GET /view/136 HTTP/1.0" 404 471 "https://wallabag.foo.bar/view/136" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:43.0) Gecko/20100101 Firefox/43.0"

Environment

  • wallabag version 2.0.2
@nicosomb
Copy link
Member

Are you sure you are in 2.0.2 ?
I just tried and it seems working.

@xsteadfastx
Copy link
Author

xsteadfastx commented Apr 22, 2016 via email

@nicosomb
Copy link
Member

Can you try to debug please?
In EntryController.php, line 415, you have:

$to = ($url !== $request->headers->get('referer') ? $request->headers->get('referer') : null);

Can you add:

var_dump($request->headers->get('referer'));die;

And try to delete an other article please?

@xsteadfastx
Copy link
Author

string(40) "https://wallabag.foo.bar/view/66"

@nicosomb
Copy link
Member

nicosomb commented Apr 23, 2016

And can you replace the new line by
var_dump($url);die; please?

@xsteadfastx
Copy link
Author

string(24) "http://wallabag/view/169". ok there is the domain missing.

@bmillemathias
Copy link
Contributor

I have the very same problem, I delete an article and I get a 404 error. I use nginx as reverse proxy which route to my lxc machine which have nginx + php7 with the standard vhost configuration for wallabag as provided in the documentation.

I can see such messages in var/prod.log inside the project directory

[2016-05-08 19:08:01] request.INFO: Matched route "view". {"route_parameters":{"_controller":"Wallabag\\CoreBundle\\Controller\\EntryController::viewAction","id":"2","_route":"view"},"request_uri":"http://wallabag.mydomain.fr/view/2"} []
[2016-05-08 19:08:01] security.DEBUG: Read existing security token from the session. {"key":"_security_secured_area"} []
[2016-05-08 19:08:01] security.DEBUG: User was reloaded from a user provider. {"username":"baptistemm","provider":"Symfony\\Bridge\\Doctrine\\Security\\User\\EntityUserProvider"} []
[2016-05-08 19:08:01] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Wallabag\CoreBundle\Entity\Entry object not found." at /srv/www/wallabag/var/cache/prod/classes.php line 2093 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): Wallabag\\CoreBundle\\Entity\\Entry object not found. at /srv/www/wallabag/var/cache/prod/classes.php:2093)"} []
[2016-05-08 19:08:01] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} []

@steckerhalter
Copy link

I have this same issue. Tried with self-contained and now with manually installed 2.0.5. When I go to https://example.com/archive/1 it gets into a redirect loop always archiving and unarchiving. I'm using Apache 2.4

I tried using a vhost like described on http://doc.wallabag.org/en/master/user/installation.html#virtual-hosts and also with AllowOverride all and no other directives (which then should use the .htaccess, right?

@steckerhalter
Copy link

steckerhalter commented Jun 11, 2016

Ok, ha! I found out it's caused by the browser, this mis-redirecting. I was using GNU IceCat which is based on Firefox ESR (currently 38.8.0). Trying with the normal Firefox it works without any issue... quite misterious

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants