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

Adding subpages when "Hide home route in URLs" is enabled #1034

Closed
JeffStarr opened this issue Sep 12, 2016 · 12 comments
Closed

Adding subpages when "Hide home route in URLs" is enabled #1034

JeffStarr opened this issue Sep 12, 2016 · 12 comments

Comments

@JeffStarr
Copy link

JeffStarr commented Sep 12, 2016

In the admin area, when the setting "Hide home route in URLs" is enabled, there are issues when adding new subpages to the home page.

Click on "Add Page" > Fill out the form > Click "Continue"

That works fine, but when you're there looking at the draft, maybe adding some content or whatever, and then click the "Save" button for the first time, the returned page is missing all frontmatter and page content. The frontmatter and content are displayed again only after revisiting the newly created page from the Pages menu.

Also, when this happens, the draft subpage say has a URL such as:

http://example.com/admin/pages/home/post-1

..but the returned/empty subpage URL attains an extra instance of home/:

http://example.com/admin/pages/home/home/post-1

Again, this behavior occurs only when the setting "Hide home route in URLs" is enabled. Given the duplication of home/ (or whatever the home slug happens to be) in the URL, I suspect a correlation, most likely having something to do with the home-route redirect.

@rhukster rhukster added the bug label Sep 12, 2016
@rhukster
Copy link
Member

Will look into this.. Thanks.

@ivan-dalmet
Copy link

Same problem here :/

@ivan-dalmet
Copy link

Step 01
image

Step 02 after click on "continue"
image
image

Step 03 after click on "save"
image
image

Step 04 after click again on "save"
image
image

Hope this help.

@flaviocopes
Copy link
Contributor

Thanks, replicated

@flaviocopes
Copy link
Contributor

Can you test the latest develop of the Admin plugin @ivan-dalmet @JeffStarr ?

flaviocopes referenced this issue in getgrav/grav-plugin-admin Sep 13, 2016
@JeffStarr
Copy link
Author

@flaviocopes I'm only 7 days into Grav at this point, so don't have a develop version set up yet.

@ivan-dalmet
Copy link

ivan-dalmet commented Sep 13, 2016

@flaviocopes How can i install the latest develop of the Admin plugin easily ?

@ivan-dalmet
Copy link

ivan-dalmet commented Sep 13, 2016

@flaviocopes I replace my admin folder content by files of grav-plugin-admin develop branch.
Same problem but now url redirection (step 04) is ok (no more /blog/blog)

@flaviocopes
Copy link
Contributor

@ivan-dalmet I thought the problem was the url redirection.

What's the other issue? Still got an error after the second save?

@ivan-dalmet
Copy link

@flaviocopes Yes exactly same errors

@rhukster
Copy link
Member

I've added a Hacktoberfest tag to see if we can get some help with this as I'm a bit stretched with other things at the moment.

@flaviocopes flaviocopes self-assigned this Oct 4, 2016
@rhukster
Copy link
Member

Closing to due to inactivity

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

No branches or pull requests

4 participants