From 6b6ad97cac6558ea63b7a5aa8c9290ba31f18e76 Mon Sep 17 00:00:00 2001 From: "EMEA\\roesslerb" Date: Tue, 25 Apr 2017 14:16:19 +0200 Subject: [PATCH 1/3] https://jira.ez.no/browse/EZP-27299: search index not updated if object is hidden by cronjob --- cronjobs/hide.php | 1 + 1 file changed, 1 insertion(+) diff --git a/cronjobs/hide.php b/cronjobs/hide.php index b4f71be915f..633edd0ea34 100644 --- a/cronjobs/hide.php +++ b/cronjobs/hide.php @@ -49,6 +49,7 @@ { $cli->output( 'Hiding node: "' . $node->attribute( 'name' ) . '" (' . $node->attribute( 'node_id' ) . ')' ); eZContentObjectTreeNode::hideSubTree( $node ); + eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); } // clear memory after every batch eZContentObject::clearCache(); From 9f0df51655e88a024998b2faf433c1e5402a83c7 Mon Sep 17 00:00:00 2001 From: "EMEA\\roesslerb" Date: Tue, 25 Apr 2017 14:28:02 +0200 Subject: [PATCH 2/3] https://jira.ez.no/browse/EZP-27299: search index not updated if object is hidden by cronjob --- cronjobs/hide.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cronjobs/hide.php b/cronjobs/hide.php index 633edd0ea34..d2fa309e1e0 100644 --- a/cronjobs/hide.php +++ b/cronjobs/hide.php @@ -49,7 +49,7 @@ { $cli->output( 'Hiding node: "' . $node->attribute( 'name' ) . '" (' . $node->attribute( 'node_id' ) . ')' ); eZContentObjectTreeNode::hideSubTree( $node ); - eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); + eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); } // clear memory after every batch eZContentObject::clearCache(); From 660b933412ee02c16feb03a9fd7b8d631991b26c Mon Sep 17 00:00:00 2001 From: "EMEA\\roesslerb" Date: Tue, 25 Apr 2017 15:08:27 +0200 Subject: [PATCH 3/3] https://jira.ez.no/browse/EZP-27299: search index not updated if object is hidden by cronjob --- cronjobs/hide.php | 1 - kernel/classes/ezcontentobjecttreenode.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cronjobs/hide.php b/cronjobs/hide.php index d2fa309e1e0..b4f71be915f 100644 --- a/cronjobs/hide.php +++ b/cronjobs/hide.php @@ -49,7 +49,6 @@ { $cli->output( 'Hiding node: "' . $node->attribute( 'name' ) . '" (' . $node->attribute( 'node_id' ) . ')' ); eZContentObjectTreeNode::hideSubTree( $node ); - eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); } // clear memory after every batch eZContentObject::clearCache(); diff --git a/kernel/classes/ezcontentobjecttreenode.php b/kernel/classes/ezcontentobjecttreenode.php index 6aad6d306b8..c4048469950 100644 --- a/kernel/classes/ezcontentobjecttreenode.php +++ b/kernel/classes/ezcontentobjecttreenode.php @@ -6021,6 +6021,8 @@ static function hideSubTree( eZContentObjectTreeNode $node, $modifyRootNode = tr $db->commit(); + eZSearch::updateNodeVisibility( $node->attribute( 'node_id' ), 'hide' ); + eZContentObjectTreeNode::clearViewCacheForSubtree( $node, $modifyRootNode ); }