grav-plugin-admin icon indicating copy to clipboard operation
grav-plugin-admin copied to clipboard

404 error on "Add Blog item"

Open zaszlo opened this issue 4 years ago • 6 comments

url: http://localhost/myblog/admin/pages/blog/title/:add

Will get me this displayed: This page will not exist until it is saved. Error 404 Woops! Looks like this page doesn't exist.

No errors are present in the grav.log.

Grav v1.7.13 - Admin v1.10.13

Thanks for looking into this, please ask if I should provide some more info.

zaszlo avatar Sep 06 '21 09:09 zaszlo

Hmm.. Maybe the blog page doesn't exist? You cannot add pages if the parent of the page doesn't exist, so you need to create that first.

mahagr avatar Sep 13 '21 09:09 mahagr

You are probably right, because my one and only blog on the site is not called blog but news... so I suppose I will have to add this information for the admin plugin, but how? Thanks for pointing this out.

zaszlo avatar Sep 13 '21 13:09 zaszlo

I think there may be a blueprint for this in either in a plugin or theme.

mahagr avatar Sep 13 '21 13:09 mahagr

Yes, editing gravsite\user\blueprints\admin\pages\new_blog_item.yaml by setting this part did solve it:

route:
  type: hidden
  default: **/news**

Still, after clicking on save I get the message: "Failed to save entry: %s"

But it is saved as expected... Maybe I can get a tip on this thread on this "Failed to save entry: %s" message?

zaszlo avatar Sep 13 '21 14:09 zaszlo

Did you update the site to the latest versions? As the issue is likely already fixed.

mahagr avatar Sep 14 '21 10:09 mahagr

Was this ever resolved?

w00fz avatar Feb 04 '22 23:02 w00fz