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

datatype eZSelection returns allways true in function hasObjectAttributeContent

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: Customer request, 5.1
    • Component/s: Field types
    • Labels:
      None
    • Environment:

      Affects eZ Publish 4.x

      Description

      In kernel/classes/datatypes/ezselectionezselectiontype.php, hasObjectAttributeContent always returns true.
      Although this is correct for single choice eZSelection fields, it's not correct for multiple choice ones (where the user can publish content without any element selected).

      In order to verify, in a template, if the attribute truly has content, the code below can be used. But it would be cleaner if has_attribute returned false when on item had been selected.

      {if ne($node.data_map.ezselectionattribute.content[0], '')}
        {* has content *}
      {/if}
      

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Backlog Backlog
        2m 4s 1 joaquim.cavalleri@ez.no 24/Oct/12 2:27 PM
        Backlog Backlog InputQ InputQ
        26d 5h 15m 1 Jostein Knudsen (Inactive) 19/Nov/12 6:42 PM
        InputQ InputQ Development Development
        6d 15h 47m 1 paul.borgermans@ez.no 26/Nov/12 10:30 AM
        Development Development Development Review Development Review
        4h 13m 1 paul.borgermans@ez.no 26/Nov/12 2:44 PM
        Development Review Development Review Development Review done Development Review done
        10d 20h 8m 1 paul.borgermans@ez.no 07/Dec/12 10:52 AM
        Development Review done Development Review done Removed Status Removed Status
        34m 41s 1 André Rømcke 07/Dec/12 11:27 AM
        Removed Status Removed Status Closed Closed
        12m 1s 1 André Rømcke 07/Dec/12 11:39 AM
        Closed Closed Reopened Reopened
        56d 6h 33m 1 paul.borgermans@ez.no 01/Feb/13 6:13 PM
        Reopened Reopened Closed Closed
        2s 1 paul.borgermans@ez.no 01/Feb/13 6:13 PM

          People

          • Assignee:
            Unassigned
            Reporter:
            Joaquim Cavalleri (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            5 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 - 5 hours
              5h