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

Public API loadContentByRemoteId returns wrong content due to stale cache

    XMLWordPrintable

Details

    Description

      It seems that the ContentService::loadContentByRemoteId() method returns old content, because of old cache.
      However, ContentService::loadContent() returns the correct content.

      Steps to reproduce:

      • Create a folder called 'Test Folder Version 1'
      • Run the script with php ezpublish/console test:caching <content_id> --env=prod
      • Output should be:
        content1.versionNo: 1
        content1.currentVersionNo: 1
        content1.name: Test Folder Version 1
        content2.versionNo: 1
        content2.currentVersionNo: 1
        content2.name: Test Folder Version 1

      ... at this point everything is as expected.

      • Edit the folder using legacy admin interface and change name to 'Test Folder Version 2'
      • Run the script with php ezpublish/console test:caching <content_id> --env=prod
      • Output is:
        content1.versionNo: 2
        content1.currentVersionNo: 2
        content1.name: Test Folder Version 2
        content2.versionNo: 1
        content2.currentVersionNo: 2
        content2.name: Test Folder Version 1

      ... which seems to indicate that loadContentByRemoteId() returned wrong data,
      and that the version numbers stored in ContentInfo and VersionInfo structures differ.

      • In administration interface go to Setup / Clear content caches
      • Run the script with php ezpublish/console test:caching <content_id> --env=prod
        content1.versionNo: 2
        content1.currentVersionNo: 2
        content1.name: Test Folder Version 2
        content2.versionNo: 2
        content2.currentVersionNo: 2
        content2.name: Test Folder Version 2

      .. which seems to indicate that clearing the cache fixed the problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ricardo.correia-obsolete@ez.no Ricardo Correia (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: