Is unpublish property required for objects?

Michael McGinnis's Avatar

Michael McGinnis

21 Feb, 2013 08:42 PM

I'm getting error messages in our emergency notification script - perhaps because of our upgrade to Cascade 7.0.7?

Message-Id: <[email blocked]>
Date: Wed, 20 Feb 2013 17:26:02 -0600 (CST)
PHP Fatal error:  SOAP-ERROR: Encoding: object has no 'unpublish' property in /bin/emergency/codeMaroon.php on line 248
PHP Stack trace:
PHP   1. {main}() /bin/emergency/codeMaroon.php:0
PHP   2. updateCMS() /bin/emergency/codeMaroon.php:38
PHP   3. SoapClient->publish() /bin/emergency/codeMaroon.php:268

According to our /AssetOperationService?wsdl, the unpublish property is not required - am I mistaken?

<complexType name="publish">
<sequence>
<element maxOccurs="1" minOccurs="1" name="identifier" type="impl:identifier"/>
<!--
Similar to the GUI - you can choose to unpublish the asset instead of publishing it. Not required. Default: false
-->
<element name="unpublish" type="xsd:boolean"/>
</sequence>
</complexType>

Yet this code no longer works.

  ## Publishing index page 3913043d80b4867c5 on wwww
    $identifier = array (
        'id' => '3913043d80b4867c5',
        'type' => 'page'
    );
    $publishParams = array ('authentication' => $auth, 'identifier' => $identifier ); 
        $reply = $client->publish($publishParams);

This code does:

  ## Publishing index page 3913043d80b4867c5 on wwww
    $identifier = array (
        'id' => '3913043d80b4867c5',
        'type' => 'page'
    );
    $publishParams = array ('authentication' => $auth, 'identifier' => $identifier, 'unpublish' => false );
        $reply = $client->publish($publishParams);

I see that things will be different when we upgrade to 7.2, but I'm just clarifying what I have to work with now. Thanks for all your help.

  1. Support Staff 1 Posted by Tim on 21 Feb, 2013 08:45 PM

    Tim's Avatar

    Hi Michael,

    It looks like you are running into this bug which was corrected in 7.2. Until you decide to upgrade to 7.2, you should be able to include 'unpublish' => false as you've done above as a valid workaround.

    Let me know if you have any further questions.

    Thanks!

  2. Michael McGinnis closed this discussion on 21 Feb, 2013 08:52 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