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

Bug in eZJSCore's ezjscajaxcontent.php - Attribute 'creator_id' does not exist

    Details

      Description

      Even if it's a bad practice deleting users from a site we can sometimes delete some user by mistake... And if this happens, and we don't have a way to bring it back (for instance) we will start having an error in the logs every time we navigate in our content tree:

      [ Nov 07 2012 12:19:49 ] [127.0.0.1] eZContentObject::attribute:
      Attribute 'creator_id' does not exist
      

      This error is shown because the "creator_id" attribute is being fetched in the wrong way.
      The bug seems to be on line 263 in extension/ezjscore/classes/ezjscajaxcontent.php

                      $ret['creator'] = array( 'id'   => $contentObject->attribute( 'creator_id' ),
                                               'name' => null );// user has been deleted
      

      The correct fetch to the 'creator_id' attribute should be something like this:

                      $ret['creator'] = array( 'id'   => $contentObject->attribute( 'current' )->attribute('creator_id'),
                                               'name' => null );// user has been deleted
      

      Steps to Reproduce:

      • Create an editor user.
      • With the new editor user create a folder under /Home
      • delete the editor user
      • visit the root node on site_admin
      • in the logs there will be an error message like:
        [ Nov 07 2012 12:19:49 ] [127.0.0.1] eZContentObject::attribute:
        Attribute 'creator_id' does not exist

      With the proposed solution the error isn't shown anymore.

        Activity

        Show
        Jérôme Vieilledent (Inactive) added a comment - Fixed in eZ Publish master : https://github.com/ezsystems/ezpublish/commit/98596aa1ca331457f418dc6b016fd4a0bcd14394 Fixed in eZJSCore : stable-1.5: https://github.com/ezsystems/ezjscore/commit/f135cfb15677cedcc74f4028810f2ce329ea37c4 stable-1.4: https://github.com/ezsystems/ezjscore/commit/87fa972c10d51a0336476c180b2aff29edf0c194 stable-1.3: https://github.com/ezsystems/ezjscore/commit/7bff20631115cf38695ec4c810d7040296702b4a stable-1.2: https://github.com/ezsystems/ezjscore/commit/3f7bcb4cd7283602cadd1a536e7e057d58686df6

          People

          • Assignee:
            Unassigned
            Reporter:
            Ricardo Correia (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 day, 2 hours, 18 minutes
              1d 2h 18m