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

Don't throw an ERROR if a non-existing field of content is requested

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: High High
    • 16.02
    • 2015.11
    • eZ Recommendation
    • None
    • customer

    Description

      If a field is requested on the extension's interface that is not existing on the requested content the sever throws the error below

      After a short discussion the following behavior is expected:
      If a non-existing field was requested, the result should be deliverd and NOT include this field. No error shold be thrown!
      A log message should note about this.

      <?xml version="1.0" encoding="UTF-8"?>
      <ErrorMessage media-type="application/vnd.ez.api.ErrorMessage+xml">
          <errorCode>500</errorCode>
          <errorMessage>Internal Server Error</errorMessage>
          <errorDescription>Notice: Trying to get property of non-object</errorDescription>
          <trace>#0 /opt/hegnar/vendor/ezsystems/recommendation-bundle/Rest/Field/Value.php(78): Symfony\Component\Debug\ErrorHandler-&gt;handleError(8, 'Trying to get p...', '/opt/hegnar/ven...', 78, Array)
      #1 /opt/hegnar/vendor/ezsystems/recommendation-bundle/Rest/Controller/ContentController.php(154): EzSystems\RecommendationBundle\Rest\Field\Value-&gt;getFieldValue(Object(eZ\Publish\Core\Repository\Values\Content\Content), 'abstract', 'nor-NO')
      #2 /opt/hegnar/vendor/ezsystems/recommendation-bundle/Rest/Controller/ContentTypeController.php(70): EzSystems\RecommendationBundle\Rest\Controller\ContentController-&gt;prepareContent(Array, Object(Symfony\Component\HttpFoundation\Request))
      #3 /opt/hegnar/vendor/ezsystems/recommendation-bundle/Rest/Controller/ContentTypeController.php(32): EzSystems\RecommendationBundle\Rest\Controller\ContentTypeController-&gt;prepareContentByContentTypeIds(Array, Object(Symfony\Component\HttpFoundation\Request))
      #4 [internal function]: EzSystems\RecommendationBundle\Rest\Controller\ContentTypeController-&gt;getContentType('16', Object(Symfony\Component\HttpFoundation\Request))
      #5 /opt/hegnar/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(139): call_user_func_array(Array, Array)
      #6 /opt/hegnar/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #7 /opt/hegnar/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php(69): Symfony\Component\HttpKernel\HttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #8 /opt/hegnar/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(185): Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #9 /opt/hegnar/web/index.php(77): Symfony\Component\HttpKernel\Kernel-&gt;handle(Object(Symfony\Component\HttpFoundation\Request))
      #10 {main}</trace>
          <file>/opt/hegnar/vendor/ezsystems/recommendation-bundle/Rest/Field/Value.php</file>
          <line>78</line>
      </ErrorMessage>
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: