Project

General

Profile

Actions

Bug #81779

closed

SuggestWizardDefaultReceiver overrides pids when pidList is used

Added by Stefan Terborg almost 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2017-07-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The suggest wizard can be configurated to use a list of pids (pidList) to search from. But the array of allowed pids is constructed the wrong way.

This happens in the constructor method in line 116 in combination with method getAllSubpagesOfPage:

111    if (isset($config['pidList'])) {
112        $allowedPages = ($pageIds = GeneralUtility::trimExplode(',', $config['pidList']));
113        $depth = (int)$config['pidDepth'];
114        foreach ($pageIds as $pageId) {
115            if ($pageId > 0) {
116                \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($allowedPages, $this->getAllSubpagesOfPage($pageId, $depth));
117            }
118        }
119        $this->allowedPages = array_unique($allowedPages);
120    }

Example:
pidList = 5,2,3
pidDepth = 0
results in $this->allowedPages: 3,2,3

Reason is that the array of pids has normal integer keys that get overriden when merged. Perhaps the pid array should take the pids as keys.

Actions

Also available in: Atom PDF