?
avatar david19161
david19161
2 Sep 2020

Steps to reproduce the issue

Create category Cat1
Create Sub-Category of Cat1, Cat2
Create Article TestArticle, place in category Cat2
Create Field TestField assign to Cat1
Open Article TestArticle

Expected result

TestField should be available (inherited from Cat1)

Actual result

TestField is not available

System information (as much as possible)

joomla_4.0.0-beta4-dev-Development-Full-Package - nightly : 2020-08-31

Additional comments

Result after fix below:
TestField is available, fields are inherited by sub-categories correctly

File : administrator\components\com_fields\src\Model\FieldsModel.php
Line : approx 242 in function getListQuery()

change
$db->quoteName('fc.category_id') . ' IN
(' . implode(',', $query->bindArray(array_values($categories), ParameterType::INTEGER)) . ')' .

To
$db->quoteName('fc.category_id') . ' IN (' . implode(',', $query->bindArray(array_values($categories), ParameterType::INTEGER)) . ')' .

I would have opened a pull request for this but found github too complicated.

avatar david19161 david19161 - open - 2 Sep 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Sep 2020
avatar Formatio-hippocampi
Formatio-hippocampi - comment - 3 Sep 2020

Issue can be closed as there is #30557

avatar Quy Quy - change - 3 Sep 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-09-03 10:15:14
Closed_By Quy
avatar Quy Quy - close - 3 Sep 2020

Add a Comment

Login with GitHub to post a comment