? Pending

User tests: Successful: Unsuccessful:

avatar Didldu-Florian
Didldu-Florian
17 Oct 2020

This solves for following problem #29233. But it finally not solves the real problem!
Currently we have a problem with the "unset" filter in
libraries\src\Form\FormField.php filter() Method,

if ($filter !== '')

because it checks any filter input, but "unset" is not really a filter and than it getts into set value null on

return $obj->filter($this->element, $value, $group, $input, $this->form);

Maybe we have some more problems similary to #29233 with filter="unset", So the filter() method in general needs to be improved to work with filter="unset"

Pull Request for Issue #29233

Summary of Changes

Change filter type of catid

Testing Instructions

See Issue #29233 and try to repoduce

Actual result BEFORE applying this Pull Request

Field required: Category.
These is because of filter() Method fails and the catid is set to NULL

Expected result AFTER applying this Pull Request

catid is filtered with "int" and is correct set.
So it works.

Documentation Changes Required

Nope

avatar Didldu-Florian Didldu-Florian - open - 17 Oct 2020
avatar Didldu-Florian Didldu-Florian - change - 17 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Oct 2020
Category Administration com_content
avatar Didldu-Florian Didldu-Florian - change - 17 Oct 2020
Title
Set category filter to int, because it could be only int
ArticleModel Client('site') set catid filter to int, because it could be only int
avatar Didldu-Florian Didldu-Florian - edited - 17 Oct 2020
avatar Didldu-Florian Didldu-Florian - change - 17 Oct 2020
Title
ArticleModel Client('site') set catid filter to int, because it could be only int
[4.0] ArticleModel Client('site') set catid filter to int, because it could be only int
avatar Didldu-Florian Didldu-Florian - edited - 17 Oct 2020
avatar SharkyKZ
SharkyKZ - comment - 17 Oct 2020

This is wrong on its own. Users without certain permissions are not allowed to change the category. That's what unset filter is used for in here. Potentially, though, this could be moved from form validation into model's save method.

avatar Didldu-Florian
Didldu-Florian - comment - 17 Oct 2020

@SharkyKZ you are right, I will close these.
Maybe it can help to find the Problem for #29233
Because these filter unset effects that!

avatar Didldu-Florian Didldu-Florian - change - 17 Oct 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-10-17 10:40:48
Closed_By Didldu-Florian
Labels Added: ?
avatar Didldu-Florian Didldu-Florian - close - 17 Oct 2020

Add a Comment

Login with GitHub to post a comment