Uploaded image for project: 'eZ Platform Enterprise Edition'
  1. eZ Platform Enterprise Edition
  2. EZEE-1784

eZ Recommendation doesn't send update events when related Content Object is modified

    XMLWordPrintable

    Details

      Description

      When publishing a Content Object, only this Content Object is synced with YOOCHOOSE. There are however cases when the published Content Object is used as a relation for other Content Object(s) and the latter are not synced. This makes the information stored in YOOCHOOSE outdated.
      For example, URL to the Image stored in YOOCHOOSE for the Article Content Object might be outdated, because the related embedded Image Content Object could be changed without syncing the stored Article Content Object.
      For the embedded Image, this is the example value of the field:

      "<![CDATA[<div> <!-- START eZDemoBundle:embed:image.html.twig --> <div class="content-view-embed"> <div class="class-image"> <div class="attribute-image"> <div class="attribute-image full-head"> <img src="http://your-site.dev/var/ezdemo_site/storage/images/media/images/mountain/243-36-eng-GB/Mountain_medium.jpg" alt="" /> </div> </div> </div> </div> <!-- STOP eZDemoBundle:embed:image.html.twig --> </div> ]]>"
      

      Steps to reproduce

      1. Set up the fresh installation of eZ Publish 5.4 with eZ Recommendation using the install steps: https://github.com/ezsystems/EzSystemsRecommendationBundle.
      2. Configure mapping on the YOOCHOOSE side. You need to add the "caption" field as the image.
      3. Put the following configuration of eZ Recommendation in your config.yml file:
        ez_recommendation:
            system:
                default:
                    yoochoose:
                        customer_id: "XXX"
                        license_key: "XXX"
                    server_uri: "http://your-site.dev"
                    recommender:
                        included_content_types: ["article"]
        
      4. Go to Legacy Admin and create and publish an Article. Write down its Content Id.
      5. Go to Legacy Admin and create and publish an Image.
      6. Embed the Image in any of the RichText fields of the Article (for example "caption") and publish the new version.
      7. Make sure you have logging enabled with the info level (you can use dev environment for this purpose). Delete your logs before performing the next step.
      8. Edit the Image Content Object and replace the image the file. Publish the new version.
      9. Check your logs. There should be a message there that says "Notifying YooChoose: updateContent(<Article's Content Id>)", but it isn't there. Also, if you access the YOOCHOOSE API (using the URL like http://reco.yoochoose.net/api/v2/XXX/XXX/top_clicked_ezdemo.json?numrecs=5&contextitems=68&contenttype=16&outputtypeid=16&categorypath=%2F1%2F2%2F64%2F66%2F67%2F&lang=eng-GB&attribute=ez_publishedDate&attribute=ez_url&attribute=title&attribute=image&attribute=author&attribute=intro&attribute=caption) there will be old Image URL in the value for "caption" field for the Article.

      Steps to reproduce on eZ Platform are similar, but you should either create a new field for the Article Content Type named "caption" or use another RichText Field (like "intro" or "body").

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jacek.foremski-obsolete@ez.no Jacek Foremski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: