Content Templater bug when category filter is use

Search
Other Bug Reports questions
Forum

Content Templater bug when category filter is use

Yorik BAUNAY's Avatar Yorik BAUNAY
Hi,


It seems there is a bug with the Content Templater component: it works perfectly when used by creating a new article -> using the "Content Templater" button in the editor. On the other hand, if we select any article category in the display filter and create a new article -> use the "Content Templater" button in the editor, the template selection window that appears contains a message of error.

RegularLabs\Component\Conditions\Administrator\Api\Conditions::setCategory(): Argument #1 ($category_id) must be of type ?int, array given, called in /home/www/client/www/CPT001/dev/plugins/system/contenttemplater/src/Conditions.php on line 51

According to our developer the error means that the component expects a unique category id, whereas the category filter allows one or more categories to be selected.The PHP code therefore sends the component an array of data when an integer is expected, which causes the error.

To stop it from crashing we did a quick hack to ensure that if the component receives a list of categories it uses the first element in the list, but it could be better to solve the issue in a future update of the component.

Regards,

Yorik
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in