From b4d88c4d566fbe0ae3205e173ae2255689fd82c6 Mon Sep 17 00:00:00 2001 From: kbohnenblust Date: Wed, 8 Nov 2017 13:00:28 +0100 Subject: [PATCH 1/2] Fix memory exeption when getting tags --- .../components/articles/processors/extras/gettags.class.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/components/articles/processors/extras/gettags.class.php b/core/components/articles/processors/extras/gettags.class.php index 3b704e0..fa7adc0 100755 --- a/core/components/articles/processors/extras/gettags.class.php +++ b/core/components/articles/processors/extras/gettags.class.php @@ -18,11 +18,7 @@ public function process() { return false; } - $articles = $parent->getMany('Children',array('deleted' => 0)); - $articleIDs = array(); - foreach($articles as $article){ - $articleIDs[] = $article->id; - } + $articleIDs = $this->modx->getChildIds($parent->id,6,array('context' => 'web')); $templateVariable = $this->modx->getObject('modTemplateVar', array('name' => 'articlestags')); if(!$templateVariable){ From 96536843dfa723a06222b287bd47b1867bb3a3a9 Mon Sep 17 00:00:00 2001 From: Kilian Date: Mon, 27 Nov 2017 16:21:52 +0100 Subject: [PATCH 2/2] Update gettags.class.php --- core/components/articles/processors/extras/gettags.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/components/articles/processors/extras/gettags.class.php b/core/components/articles/processors/extras/gettags.class.php index fa7adc0..a564da8 100755 --- a/core/components/articles/processors/extras/gettags.class.php +++ b/core/components/articles/processors/extras/gettags.class.php @@ -18,7 +18,7 @@ public function process() { return false; } - $articleIDs = $this->modx->getChildIds($parent->id,6,array('context' => 'web')); + $articleIDs = $this->modx->getChildIds($parent->id,6,array('context' => $parent->get('context_key'))); $templateVariable = $this->modx->getObject('modTemplateVar', array('name' => 'articlestags')); if(!$templateVariable){ @@ -54,4 +54,4 @@ public function process() { } } -return 'ArticleExtrasGetTagsProcessor'; \ No newline at end of file +return 'ArticleExtrasGetTagsProcessor';