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

setting object states - fatal error in extension/ezfind/search/plugins/ezsolr/ezsolr.php

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • None
    • 4.4.0alpha1
    • None
    • ezfind 2.3.0

    Description

      Hi,

      if you create a new object and you set an object state within the edit mode you are getting a fatal error from the solr plugin because there is no main node available before publishing the object the first time.

      Fatal error:
      Fatal error: Call to a member function attribute() on a non-object in /var/www/vhosts/kaisersysteme.com/httpdocs/extension/ezfind/search/plugins/ezsolr/ezsolr.php on line 357
      Fatal error: eZ Publish did not finish its request

      fix:
      move
      $mainNodePathArray = $mainNode->attribute( 'path_array' );
      after the if clause

      $mainNode = $contentObject->attribute( 'main_node' );
      if ( !$mainNode )

      { eZDebug::writeError( 'Unable to fetch main node for object: ' . $contentObject->attribute( 'id' ), 'eZSolr::addObject()' ); return false; }

      $mainNodePathArray = $mainNode->attribute( 'path_array' );

      Best wishes,
      Georg.

      PS: Version 2.3.0 isn't listed in the affected versions box.

      Steps to reproduce
      • create e.g. 2 object states
      • create a new object (e.g. folder)
      • click on the "set" button in left column to set a new object state

      Attachments

        Activity

          People

            2b274289-6c7c-4b95-a70d-ca6c4a846602@accounts.ibexa.co j h
            emil.webber emil.webber
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: