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

Quickstart /admin/ 404 not found #1043

Closed
tedmiston opened this issue Jul 16, 2022 · 4 comments · Fixed by #1044
Closed

Quickstart /admin/ 404 not found #1043

tedmiston opened this issue Jul 16, 2022 · 4 comments · Fixed by #1044

Comments

@tedmiston
Copy link

tedmiston commented Jul 16, 2022

First time using Lektor here in a very long time so hopefully I'm just missing something obvious here.

After installing it following the docs, I ran the following commands from the Quickstart:

lektor quickstart  # accepted all defaults and named project foo
cd foo
lektor server

The server started on http://127.0.0.1:5000/ and i see the static blog website example.

The Quickstart says:

While the development server is running you can use the built-in admin interface. It can be accessed by clicking on the pencil symbol on a page or by manually navigating to /admin/.

However, attempting to access the admin returns a 404.

$ curl http://127.0.0.1:5000/
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="static/style.css">
<title>Welcome to foo! — foo</title>
...

$ curl http://127.0.0.1:5000/admin/
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

$ curl http://127.0.0.1:5000/admin
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

$ curl http://0.0.0.0:5000/admin/
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

$ curl http://0.0.0.0:5000/admin
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>

Am I missing something here?

Edit: I also tried a custom port to the same result.

Clicking the pencil on the homepage takes me to http://127.0.0.1:5000/admin/edit?path=%2F and http://127.0.0.1:5000/admin/edit seems to work fine.

Is it just that the /admin/ route as mentioned in the docs does not actually exist and they should say /admin/edit instead?

@tedmiston tedmiston changed the title Admin 404 not found following quickstart /admin/ 404 not found following quickstart Jul 16, 2022
@tedmiston tedmiston changed the title /admin/ 404 not found following quickstart Quickstart /admin/ 404 not found Jul 16, 2022
@dairiki
Copy link
Contributor

dairiki commented Jul 16, 2022

I think this 404 from /admin/ probably started with PR #987 which refactor the admin server quite a bit.

I think we should either:

  1. update the docs (as you suggest) to reference /admin/edit rather than /admin
  2. add a redirect from /admin to /admin/edit to the admin server

(or both.)

Updating the docs is a bit problematic, since, at present, it appears we still have no way to update the published website at getlektor.com. (See lektor/lektor-website#330).

@nixjdm
Copy link
Member

nixjdm commented Jul 16, 2022

The route /admin should probably "just work" - I think adding that is the way to go.

@tedmiston
Copy link
Author

Thank you both for the quick replies... I briefly thought I must be crazy here. From my perspective, either solution mentioned would be sufficient to reduce the confusion.

@dairiki
Copy link
Contributor

dairiki commented Jul 18, 2022

@tedmiston Thank you for the report! I believe this is now fixed via #1044.

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

Successfully merging a pull request may close this issue.

3 participants