bulk change "Content type" gives error having to do with "Configuration"

christianco's Avatar

christianco

26 Apr, 2013 06:33 PM

Hi,
I'm operating WS to change the Content Type of many pages across many sites. In Cascade UI I can change the Content Type and the Config Set, Data Def and etc, swtich automatically to those used by that Content Type. In WS there is an error:

"Could not locate the page configuration id ..."

and the edit operation doesn't work. I'm assuming that the WS save is rejected because that Config set ID is not associated with the Content type. But shouldn't WS operate like the UI, since Config Set is associated with Content type - when I switch Content Type, The Config Set should change... right?

  1. 1 Posted by christianco on 26 Apr, 2013 06:42 PM

    christianco's Avatar

    btw, it's an easy workaround to set page->pageConfigurations to null. Then the new Content type populates teh Config set. Works for me.

  2. 2 Posted by Ryan Griffith on 26 Apr, 2013 07:14 PM

    Ryan Griffith's Avatar

    Hm, so if I'm following correctly, you're nulling out/removing the pageConfigurations that is returned from the read operation?

    Let me check with the developers to see if I can get some additional information, but I'm wondering if this is a result of some legacy behavior where going from Global to Sites drops the ability to modify Configuration Sets at the Page level, but the data is still returned through Web Services.

    What version of Cascade are you experiencing this behavior with?

    Thanks!

  3. 3 Posted by christianco on 26 Apr, 2013 08:44 PM

    christianco's Avatar

    yes I'm nulling out pageConfigurations... oi, ok i realize I'm assuming that in order to save operation on a page that I have to use all the page returned from a read so that I don't lose data. Are you saying there's some minimum I can use to perform this edit? that would be great as I'm operating on thousands of pages, so if possible I'd like to avoid the chance of deleting content.

    btw, nulling out the Config section works.

  4. 4 Posted by christianco on 26 Apr, 2013 09:09 PM

    christianco's Avatar

    hmm, when I only use the minimum info required to edit a page without throwing a WS error, the page content gets deleted. That is why I'm using a read op, and then saving that object with some changes. Imagine deleting all the content on all the hundreds of sites in my system. it's too bad tho that there isn't an edit mode that does not do this.

    BTW, just curious, is there a way to revert to a past version of a page though WS? Looked around but found nothing on this.

  5. 5 Posted by Ryan Griffith on 29 Apr, 2013 12:56 PM

    Ryan Griffith's Avatar

    Hi Christian,

    Thank you for the additional information.

    I am going to speak with the developers to see if I can get back to you with some additional information regarding nulling out the Configuration portion of the read response. In the meantime, it sounds like nulling out the Configuration would be your workaround/solution.

    hmm, when I only use the minimum info required to edit a page without throwing a WS error, the page content gets deleted. That is why I'm using a read op, and then saving that object with some changes.

    You were doing this correctly, where you want to update the elements that need to change and keep the other portions intact (other than the Configuration since that seems to be causing issues); at least this is the way I have always seen/done updates on assets. Like you said there is a minimum, but you do risk the chance of nulling out/clearing content somewhere.

    is there a way to revert to a past version of a page though WS? Looked around but found nothing on this.

    I am pretty sure this functionality is not currently available through Web Services. I would suggest posting something on the Idea Exchange if you feel this would be a good feature to implement in a future release of Cascade.

    Please let me know if you have any questions.

    Thanks

  6. 6 Posted by Ryan Griffith on 30 Apr, 2013 01:30 PM

    Ryan Griffith's Avatar

    Hi Christian,

    After speaking with on of the developers, I was able to clarify the behavior you are experiencing regarding the Configurations.

    Through the UI, when you change a Page's Content Type to one with a different Configuration Set, there will be different Page Configurations available; the same concept applies to Web Services as well. So, if you submit a new Content Type that uses a new Configuration Set, but still provide the old old Configuration IDs, that is going to be invalid and throw the error you mentioned above.

    If you change the Content Type to one that uses a similar Configuration Set (ie has Configurations and Regions with the same names) and want to preserve the Block and Format assignments at the Page level, then you could null out the Page Configuration IDs and Page Region IDs. At that time, Cascade will locate the new Page Configurations and new Page Regions by name. However, if you do not want to preserve the Page level Block and Format assignments, then you should null out the Page Configurations, which you have done.

    Please let me know if you have any questions.

    Thanks

  7. 7 Posted by christianco on 30 Apr, 2013 04:05 PM

    christianco's Avatar

    Ryan,
    Yeah I figured as much, thanks for the confirmation.

    Been thinking of putting up an idea in the ideas list - to me, it makes a lot of sense for their to be a second kind of edit operation in WS. Currently when I want to make a small change somewhere in the page, I have to save the entire page contents. That pretty much means a read and then a write.

    It would be great if there was a type of edit operation that allowed a small change to one part of an asset, so that I could for example create an object that contained only the edits to the page that I wanted, and save it with the page id and type, and the rest of the page data would remain.

    does that make sense? I'd like to get your opinion.

    thanks

  8. 8 Posted by Ryan Griffith on 30 Apr, 2013 04:47 PM

    Ryan Griffith's Avatar

    Hi Christian,

    Yes that does make sense. A suggestion on the Idea Exchange is a great idea, I am sure others (including myself and one of our developers) have thought the same thing.

    This would also allow us to track and see how popular of an idea it is to see if it would be worthwhile to implement in a future release of Cascade.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  9. Ryan Griffith closed this discussion on 30 Apr, 2013 04:47 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac