-
Notifications
You must be signed in to change notification settings - Fork 35
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
properly handle SiteTree objects #80
base: master
Are you sure you want to change the base?
Conversation
when changing a page, we have to use writeToStage and publish ... when using just 'write' the page will get a modified label in the cms, but the changes will not be visible ... what might be interesting, is to provide an argument for PUT/POST to decide if the record should be published or just staged.
Thanks, definitely a needed addition. I think this is a good base, but like you said we can look at adding a |
yes ... detecting Versioned makes sense (how do you do that ?) I also thought that maybe in absence of explicit instructions it would be best to detect of a page is stages or published and then update either the Staged or Live version ... and not change the publication state ... |
Not sure about the 'default', maybe just a write action is enough, which should use the current default Stage anyway. Then probably best to have 2 query parameters, Stage and Publish, which take the Stage to write to and the Stage to publish to. At least for a start, since we can't assume the stage names as they can be user defined I think. |
That would have to be "Just write" does not work, at least not when I tried it ... the Page gets a 'modified' marker in the cms ui, but when looking at the content, it is unchanged ... when reading the page again via REST, all the changes are present, but in the cms ui, the old values are still there ... that is how I got it into my head to fix it :) |
Oh yeah I remember seeing this happen for pages, I think it might be just an issue of which stage is being read... Anyway, am also thinking we might be able to handle all the Versioned logic earlier in the query handler and all in one place, something to do with |
I think we might be able to have the whole Versioned login in There we can check if And if |
generic Versioned support is cool ... although for my usecase I really need the following behavior: if the page has been edited in the cms, and is thus in stage mode, then I would not want it published, if has been published, then I would want to modify the published version. if the page has been 'un-published' I would want to edit the un-published version, but I guess that is the same as if the paget is in stage mode ... any advice on how to achieve this ? |
I think in most cases, requests should include the But like you mention, maybe default to Good thing is that |
when changing a page, we have to use writeToStage and publish ... when using just 'write' the page will get a modified label in the cms, but the changes will not be visible ...
what might be interesting, is to provide an argument for PUT/POST to decide if the record should be published or just staged.