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

Add dataset in navigation causes 404 - User not found #1624

Closed
pkoskinen opened this issue Apr 2, 2014 · 7 comments
Closed

Add dataset in navigation causes 404 - User not found #1624

pkoskinen opened this issue Apr 2, 2014 · 7 comments
Assignees

Comments

@pkoskinen
Copy link

In our setup the Add dataset is always part of the navigation, even if the user is not logged in. If the user is not logged in and she presses the add dataset navigation button, it leads to internal server error, with an additional message of 'User not found' instead of redirecting to the login page. A bit later the redirect starts to work.

Cause seems to be the commit 7f1327f, after this this 404 starts to happen.

How to repeat:
Add navigation button (in header.html's h.build_nav_main), restart http server, close (log out first) and start the browser, press add dataset.

It seems that during the cases when I get the 404, the user id is /login for some reason and the server tries to "read" that user.

@nigelbabu
Copy link
Contributor

Hey @pkoskinen, that commit seems unrelated to your breakage. Perhaps we've done a more deeper breakage. I'll take a more detail look when I find some time. I agree that if you're not logged-in and you click something that needs you to be logged in, it shouldn't throw a 404.

@nigelbabu
Copy link
Contributor

Hello @pkoskinen I can't reproduce this issue on the release branch of 2.2. Can you reproduce this on master.ckan.org or beta.ckan.org (running 2.2)? What are the auth settings in your config file? Have you overridden anything?

@pkoskinen
Copy link
Author

I forgot to mention that the version I'm using is release-v2.04 with fixes concerning issue #1419
The problem didn't exist before merging the v2.04 to v2.03 in addition to the aforementioned issue's commits.

@nigelbabu
Copy link
Contributor

Aha! Thank you! I'll dig deeper :)

@nigelbabu
Copy link
Contributor

I still cannot reproduce this error. Do you have any specific auth settings different from the norm?

@pkoskinen
Copy link
Author

I digged a bit deeper and was able to find something from our settings that does affect the behaviour.

This seems to be caused by the combination of our Apache httpd's rewrite rules and changes made in CKAN 2.0.4 (https://wiki.apache.org/httpd/RewriteHTTPToHTTPS). Our login page is redirected from http to https.

I think I was able to fix this by changing the rewrite rules a bit.

Thank you, I wouldn't have found this without your help.

@nigelbabu
Copy link
Contributor

Cheers, I'm happy we nailed it down! :)

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

No branches or pull requests

2 participants