getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.59k stars 1.41k forks source link

Failed to save entry: Forbidden #3389

Open theappletonschool opened 3 years ago

theappletonschool commented 3 years ago

Trying to move a page to another folder fails with the following message

Failed to save entry: Forbidden

mahagr commented 3 years ago

Can you save the page? Or create a new page to the destination?

theappletonschool commented 3 years ago

I can save the page and create a page in the destination folder. I can save changes to the page but I can't move the page. I've tried both the 'Move' button and also changing the parent under the advanced tab.

I can recreate the error on a clean install using Ampps.

hotdoy commented 3 years ago

Got this one as well this morning while trying to move a page. Same with modular. Grav 1.7.17 / Admin 1.10.17

mahagr commented 3 years ago

I was able to reproduce this by moving a page into an empty folder.

mahagr commented 3 years ago

This issue happened when you moved a page to a visible page (with numbers in the folder)

Jogai commented 3 years ago

I'm currently moving from another cms to Grav. This problem is really hindering me making the transistion. Any clue when this will be released?

rhukster commented 3 years ago

Should be available in the next couple of days

fseesink commented 3 years ago

Any update on this? Last post was 10 days ago.

I haven't been posting recently, but just tried moving a page today and slammed into this same issue. A quick Google search got me here, so while not ideal, at least I know I am not alone.

hotdoy commented 3 years ago

I've got a couple Grav site running the latest version and everything worked great.

Edit: It doesn't. Issue still persist.

fseesink commented 3 years ago

@hotdoy What changed in your environ? Last I looked things are still at Grav 1.7.17 / Admin 1.10.17 as you posted 17 days ago. And that's what I am running.

@mahagr and @rhukster both indicated this was a bug as there's a fix tag 16 days ago from @mahagr, and @rhukster wrote

Should be available in the next couple of days

11 days ago. So I am genuinely curious how you, as one of the posters above who said you had this issue, now say everything is working great. Neither Grav nor Admin have been updated in the last 17 days. So this would imply it was something outside of them.

I do know Firefox recently updated, as did Chrome. What browser were/are you using to manage your Grav sites, especially when it works? I've been in Firefox for Mac (latest version, so right now v90.0). Am going to go try this in another browser to see if it works elsewhere.

UPDATE: Nope. Same issue in latest Safari (v14.1.1 (15611.2.7.1.6, 15611)).

hotdoy commented 3 years ago

@fseesink I was under the impression I successfully moved pages in the last couple of days but no. Issue is still there. I edited my comment.

fseesink commented 3 years ago

@hotdoy Bummer. Was hoping you had a workaround like using Brave or something. :-)

How, if at all, do you currently deal with this?

I have been in the habit of using Grav Admin, and I write down thoughts as they come to me as starts of blog posts. (Unfortunately, I can rarely finish a post in one go, so I save it and circle back to it later.) I keep these unfinished posts in a separate folder that's not published/visible/routable, but if I want to check how one will look, I'll tweak the particular post and manually enter the route to see how it will look in the end. Once I am ready, I simply go into Grav Admin and change the parent folder of the post over to where the published blog posts go. And at least the last time I did this in late May, all worked as it normally does.

But went to do this last night, which is when I hit the

Failed to save entry: Forbidden Save location: \<path/to/my/post> (type: blog_item) You are editing a saved draft. [Reset]

As I said, a quick Google search landed me here.

But wondering what the best/cleanest way is move such posts around until this is resolved. I guess I could just SSH into the site and mv it. I tried the duplicate feature in Grav Admin in the 3 vertical dots of the post (what pops up as "Copy Page"), but it doesn't let you create a duplicate anywhere but where the current one is. So that doesn't really help.

Anyway, appreciate you checking if things were working. And thanks to those involved with Grav, as I think it's pretty cool software, and you all seem very responsive to issues like this, which means a lot.

hotdoy commented 3 years ago

@fseesink In the meantime I move my pages using a ftp client or often directly from cPanel file manager. I find the later to be the most convenient one (I can do it from my phone).

Jogai commented 3 years ago

We've got a release :smile: Will try to test this in a few hours.

mahagr commented 3 years ago

Let me know if the fix is good or not.

Jogai commented 3 years ago

You can save a page under another node, but it makes a copy. Also the move function is not working. I guess both problems need to go in new issues. This one can be closed because the original error is gone.

fseesink commented 3 years ago

@mahagr Updated to Grav v1.7.18 and Admin v1.10.18 and just gave it a whirl. Took a post I had been working on and changed all the usual settings including changing the parent folder, and voila! It moved as one would expect. The fix appears to be good! Not sure what @Jogai is referring to, as I found changing the parent of the blog post moved it. I don't see any copies/etc. So guessing he's referring to another issue?

Anyway, much appreciated.

mahagr commented 3 years ago

@Jogai Yes, there is another related issue when using multi-language and for example moving a page. I think someone already mentioned it in another issue, but I wasn't able to fix it before my vacation.

And yes, it is another unrelated but similar issue.

Jogai commented 3 years ago

No worries, enjoy the vacation.

By "move function is not working" I meant the move dialog that pops up when you click the upper right move button.

beamaria commented 3 years ago

Mmmmhhh? Fixed? I have the same problem today working with Gantry5 - my settings: Grav 1.7.18 admin Panel 1.10.18 Gantry plugin 5.4.37

BrandonPR90 commented 3 years ago

Can you save the page? Or create a new page to the destination?

I'm having the same issue. However, I cannot save or create a page to the destination.

beamaria commented 3 years ago

My problem: I use a paid RT theme, where the page "contact" is a sub-page of "Pages" I cannot save the Contact page in "root" or move it to that destination, but I can create a new page. Grav 1.7.23 admin panel 1.10.23

blizam commented 1 year ago

bumping this as it's very common with RT themes to want to move a rocket launcher sample page from the /user/pages/03.pages/ subdirectory to the root Pages (user/pages/) directory... like "about us" or "contact" for example.

If you try and do this from the Grav Admin; to change the Parent folder for "About Us" for example from Pages to <root> you will get this error "Failed to save entry: Forbidden", Google it, and land here on this Github thread.

The easiest way currently to accomplish this is to just move the folder via FTP or Shell from the /03.pages/ sub folder to the root "/pages/" folder. Assuming you're using the default numeric prefix numbering make sure your "0X.about-us" folder that you're moving has a different numeric prefix. I usually just make it 1 more than the highest value currently, clear the Grav cache, and then reorder+save from the Admin to properly renumber everything.