Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27149

Reproduce and fix AMNH invalidate/hide notifications

    XMLWordPrintable

    Details

      Description

      Hi ...

      this ticket sums the steps to reproduce/fix issues https://jira.ez.no/browse/CS-6074 and https://jira.ez.no/browse/CS-6042
      AMNH uses ezP 5.4.9.1 and the reco extension v1.0.0

      solution approach to https://jira.ez.no/browse/CS-6042
      The customer says that hidden nodes are still recommended. We could patch it with the following

      diff --git a/eZ/Publish/Slot/HideLocation.php b/eZ/Publish/Slot/HideLocation.php
      index e1453e4..143c691 100644
      --- a/eZ/Publish/Slot/HideLocation.php
      +++ b/eZ/Publish/Slot/HideLocation.php
      @@ -18,6 +18,6 @@ class HideLocation extends Base
                   return;
               }
       
      -        $this->client->updateContent($signal->contentId);
      +        $this->client->deleteContent($signal->contentId);
           }
       }
      

      in the updateContent command, yoochoose tries to fetch infor about the content but as it is hidden, we get an empty response.
      If changed to 'deleteContent' it causes an invalidation of the article on the yoochoose side and the article will disappear after the next modelbuild (nightly)
      There's no change/deployment needed on yoochoose side for this change.

      Background info:
      We can see that v1.0.0. sends notifications to yoochoose while content is changed/updated but HideNotification is using the wrong method.
      In v1.2.0 we cannot see that notifications are sent and therefore cannot test it. Please assure that v1.2.0 is also sending notifications to yoochoose and update the HideNotification method as well

      The notification should look similar to this, the important thing is that the action is DELETE and not UPDATE anymore

      {
          "transaction" : null, 
          "events" : [
              {
                  "action" : "DELETE", // defines that an initial full import is triggered
                  "uri" : "some link to content"
                  "contentTypeId" :16,
                  "lang" : "eng-US", 
                  ....
              }
          ]
      } 
      

      If possible, make the changes available via composer so that Peter can install it.
      Important: The URL where the notification is POSTed to must NOT be changed. It will change only in v2 (what Kamil and Artur are currently doing)

      For testing reasons you can use AMNH's QA account
      mandator: XXX
      licensekey: 42105-1521-81105-7151-9325

      You can check some example content under:
      https://admin.yoochoose.net/api/774/item/2/85338
      BASIC Auth with mandator as username and licensekey as password

      <items version="1">
      <item id="85338" type="2">
      <imageurls/>
      <deeplinkurl>/shelf-life</deeplinkurl>
      <title>Shelf Life</title>
      <validfrom>2014-11-06T15:35:15.000</validfrom>
      <categoryids/>
      <categorypaths/>
      <content/>
      <attributes>
      <attribute value="<p>Dive deep inside the Museum's collection to discover the past, present, and future of its approximately 33 million artifacts and specimens in this new series with original monthly videos.</p> " key="short_description" type="TEXT"/>
      <attribute value="super_article" key="identifier" type="TEXT"/>
      <attribute value="Shelf Life" key="title" type="TEXT"/>
      <attribute value="Jane Levenson" key="author" type="TEXT"/>
      <attribute value="Jane Levenson" key="author" type="NOMINAL"/>
      <attribute value="/shelf-life" key="uri" type="TEXT"/>
      <attribute value="206" key="contentTypeId" type="TEXT"/>
      <attribute value="2014-11-06T15:35:15.000Z" key="publishedDate" type="TEXT"/>
      <attribute value="85338" key="contentId" type="TEXT"/>
      </attributes>
      </item>
      </items>
      

      If this content ID is hidden, a validTo entry (which currently does not exist) should be in the past, meaning the content is not valid anymore

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            johannes.hoerle-obsolete@ez.no Johannes Hörle (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: