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

Bug in eZContentOperationCollection::registerSearchObject() in eZ Publish 4.1.3

    XMLWordPrintable

Details

    Description

      found a minor bug in eZContentOperationCollection::registerSearchObject()

      here

              if ( $delayedIndexing == 'enabled' )
              {
                  $db = eZDB::instance();
                  $rows = $db->arrayQuery( "SELECT param FROM ezpending_actions WHERE action='index_object' AND param = '$objectID'" );
                  if ( count( $rows ) == 0 )
                  {
                      $db->query( "INSERT INTO ezpending_actions( action, param ) VALUES ( 'index_object', '$objectID' )" );
                  return;
                  }
              }
      

      the "return" should be outside the "if ( count..." because when an object is already pending for indexation, it never enters inside this if, causing a realtime indexation, not delayed, and this is causing timeout errors when publishing content.

      Steps to reproduce
      • enable delayedindexing
      • publish some content -> a pending action is added (this is ok)
      • before runing update index cron, edit and publish the same object -> you get realtime indexation in this case (this is not desired with delayed indexing enabled)

      Attachments

        Activity

          People

            gl gl
            luckylefti luckylefti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: