codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Filter for many-to-many relations not visible #162

Closed dmolineus closed 3 years ago

dmolineus commented 3 years ago

Since https://github.com/codefog/contao-haste/pull/161 the filter for many-to-many related fields are not added to the panel anymore. Issue is caused in this line:

https://github.com/codefog/contao-haste/blob/f6ece9e5a2aafd479b85aa4d683d185d1ebce06d/library/Haste/Model/Relations.php#L113

The correct check has to be:

-            if (isset($GLOBALS['TL_DCA'][$strTable]['list']['panelLayout'])){
+            if (isset($GLOBALS['TL_DCA'][$strTable]['list']['sorting']['panelLayout'])){

/cc @rabauss

qzminski commented 3 years ago

Good catch, should be fixed now.

rabauss commented 3 years ago

Oh damn it, I copied the wrong array keys 😢