Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$this->strTable not passed correctly into DC_Table::initPicker() #1535

Closed
Defcon0 opened this issue May 30, 2018 · 1 comment
Closed

$this->strTable not passed correctly into DC_Table::initPicker() #1535

Defcon0 opened this issue May 30, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@Defcon0
Copy link
Contributor

Defcon0 commented May 30, 2018

Hello folks,

I just found a possible issue in DC_Table::initPicker(). In this function the intersection of the root nodes with the mounted nodes doesn't work because the active table isn't passed into $this->eliminateNestedPages():

// Calculate the intersection of the root nodes with the mounted nodes (see #1001)
if (!empty($this->root) && $arrRoot != $this->root)
{
	$arrRoot = $this->eliminateNestedPages(
		array_intersect(
			array_merge($arrRoot, $this->Database->getChildRecords($arrRoot, $this->strTable)),
			array_merge($this->root, $this->Database->getChildRecords($this->root, $this->strTable))
		)
	);
}

It should be

if (!empty($this->root) && $arrRoot != $this->root)
{
	$arrRoot = $this->eliminateNestedPages(
		array_intersect(
			array_merge($arrRoot, $this->Database->getChildRecords($arrRoot, $this->strTable)),
			array_merge($this->root, $this->Database->getChildRecords($this->root, $this->strTable))
		),
		$this->strTable
	);
}

After doing this, I don't have the issue of having too many entries in my category picker anymore.

Hope this can be fixed in a future release.

Bye

@leofeyer leofeyer added the bug label Jun 11, 2018
@leofeyer leofeyer added this to the 4.4.19 milestone Jun 11, 2018
@leofeyer leofeyer self-assigned this Jun 14, 2018
@leofeyer
Copy link
Member

Fixed in 94c9091. Thank you @Defcon0.

@leofeyer leofeyer modified the milestones: 4.4.19, 4.4 May 14, 2019
leofeyer added a commit that referenced this issue Aug 25, 2020
Description
-----------

| Q                | A
| -----------------| ---
| Fixed issues     | Fixes #1535
| Docs PR or issue | -

@Defcon0 Can you please check if this fixes your issue?

Commits
-------

0fbcab4c Use the active record in the protectFolder() callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants