-
1. Re: Pages APIs Bugs
Liam Dilley Oct 20, 2014 9:10 PM (in response to Tarik :: Creativaholic)BC does not delete things as you know Tarik, and in the API you got the isdelted status, so you just filter those out.
-
2. Re: Pages APIs Bugs
Tarik :: Creativaholic Oct 20, 2014 9:20 PM (in response to Liam Dilley)Following our "Other conversation" in relation to this. the bug with the deleted status, it is returning "undefined" instead of "false". Not sure whether because the pages have created on Admin side before the APIs - Because I've seen this with Booleans returning different values based on the origin of creation - but however, this bug need to be fixed.
-
3. Re: Pages APIs Bugs
Tarik :: Creativaholic Oct 21, 2014 1:35 PM (in response to Tarik :: Creativaholic)Another thing I found in regard to this API. It should be edited in the documentation for more clarification. And for those who are using the Pages API now, you might want to know this.
When saving a draft page it is mentioned that the only difference is the 'livePageId' which marks the page as draft and the original page ID the draft is for. Well, it doesn't work that way, you have to add 'displayable : 0' to mark it as draft, otherwise, it will be marked as draft in the back-end but its displayable reference will be 'true' which in a theory of using it back with the APIs, any calls you made will consider the draft page as live page... with this set this way, I'm sure some conflicts will occur afterwards.
So the fix will be either to make 'livePageId' mark the page as draft entirely or the documentations need updating to include that 'displayable : 0' MUST be there.
[Added]: Saving Content Bug:
When saving pages with the API, you have to include everything with content. Meaning, SEO elements such as title and meta description. If you don't add them in your POST call they get removed, even though the objects for SEO exist, they don't POST.
[Added]: In relation to SEO above:
At this moment you have to include the Doctype as well as html, head and body tags with the SEO elements if you want them saved in a page using the APIs, maybe this is to do with how Redactor is programmed to handle those elements like the old editor?
I think this will lead to previous requests to separate SEO from content in the back end from the editor.
[Added]: Documentation error
To publish a draft, the call must be "PUT" not "POST" - POST returns an error.
-
4. Re: Pages APIs Bugs
Tarik :: Creativaholic Oct 21, 2014 2:39 PM (in response to Tarik :: Creativaholic)With the 'deleted' bug, I grabbed the ID of the page in question, went and opened it in Admin, deleted it again, and then it was Gone, maybe something to do with switching to the new engine, or maybe it was something originally done by the site owner.
Back to the "Gone" mentioned above, yes, it's gone, so it's not loading anymore, unlike what Liam mentioned that the Page doesn't get deleted in the back etc..., so the api doesn't retrieve it anymore, which in a typical case, it's ok, but may be an issue for those who want to retrieve deleted pages for some custom rollback.
However, the value return is still giving 'undefined'.
Publishing Draft:
The Template ID always pushes/saves (-1) regardless of what you do. (this is on publishing draft only)
-
5. Re: Pages APIs Bugs
Tarik :: Creativaholic Oct 25, 2014 8:31 AM (in response to Tarik :: Creativaholic)Related to my post on 'Hide for search engines' issue (Re: New Editor (redactor) On Admin Bugs List), it affects the API call, so it's not returning the right value regardless, but I guess one fix either here or there will fix both?


