? bug PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
4 Nov 2023

Pull Request for Issue #42259 .

Summary of Changes

Filter field value after onCustomFieldsPrepareField

Testing Instructions

Please follow #42259
Create a Text field,
Save it,
And check the field rendering in the layout override.
Or use dump($this->item->jcfields); to see the field ->value

Actual result BEFORE applying this Pull Request

Value contain an empty space

Expected result AFTER applying this Pull Request

Value is empty

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:
  • No documentation changes for docs.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed

Reference:

avatar Fedik Fedik - open - 4 Nov 2023
avatar Fedik Fedik - change - 4 Nov 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2023
Category Administration com_fields
avatar Fedik Fedik - change - 4 Nov 2023
Title
Filter values of custom field, fix #42259
[5.0] Filter values of custom field, fix #42259
avatar Fedik Fedik - edited - 4 Nov 2023
avatar Fedik Fedik - change - 4 Nov 2023
Labels Added: bug PR-5.0-dev ?
avatar Scrabble96
Scrabble96 - comment - 4 Nov 2023

The com_patchtester_4.3.1 doesn't seem to work in J5 so I can't test this. The error message message says:

An error has occurred while fetching the data from GitHub.

Error inserting pull request data into the database: Incorrect string value: '\xF0\x9F\xA5\x87 )...' for column [mydomain]_joomlalatestversion.m2f0c_patchtester_pulls.description at row 13

avatar fgsw
fgsw - comment - 4 Nov 2023

No Problem using Patchtester 4.3.1 in J5.

avatar Scrabble96
Scrabble96 - comment - 4 Nov 2023

No Problem using Patchtester 4.3.1 in J5.

Can you confirm what needs to be checked/ticked when I get an access token? Is it just the default that the link from the Patchtester checks? I've installed it on a brand new installation of J5 on a brand new subdomain on a new database.

I uninstalled it, logged out, logged back in and installed it again. Same result.

avatar fgsw
fgsw - comment - 4 Nov 2023

pt1
pt2
pt3

avatar Scrabble96
Scrabble96 - comment - 4 Nov 2023

All those settings in Joomla are correct. What I meant was, what do I check/tick when I request an authentication token on Github at github.com/settings/tokens? I tried on another test site that had been updated from 4.4.0 to 5.0. Same result. It has public_repo, repo:status selected at the moment.

avatar fgsw
fgsw - comment - 4 Nov 2023

pt-token

avatar angieradtke angieradtke - test_item - 4 Nov 2023 - Tested unsuccessfully
avatar angieradtke angieradtke - test_item - 4 Nov 2023 - Tested successfully
avatar angieradtke
angieradtke - comment - 4 Nov 2023

I have tested this item ✅ successfully on 4143e6b

Thanks Fedir, works as expected


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42285.

avatar angieradtke angieradtke - test_item - 4 Nov 2023 - Tested successfully
avatar HLeithner
HLeithner - comment - 6 Nov 2023

@Scrabble96 can you please test this pr, simple use the prebuilt packages from https://artifacts.joomla.org/drone/joomla/joomla-cms/5.0-dev/42285/downloads/71682

avatar korenevskiy
korenevskiy - comment - 6 Nov 2023

@Fedik And if you just return the value from the array when checking.

$value = array_filter($value, function ($v) {
  return $v;
});

or

$value = array_filter($value, fn ($v) => $v);
avatar Fedik
Fedik - comment - 6 Nov 2023

@korenevskiy nope, what will hapen when value is '0'?

avatar korenevskiy
korenevskiy - comment - 6 Nov 2023

@korenevskiy nope, what will hapen when value is '0'?

You right!

avatar Quy Quy - test_item - 7 Nov 2023 - Tested successfully
avatar Quy
Quy - comment - 7 Nov 2023

I have tested this item ✅ successfully on 4143e6b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42285.

avatar Quy Quy - change - 7 Nov 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 7 Nov 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42285.

avatar Quy Quy - change - 7 Nov 2023
Labels Added: ?
Removed: ?
avatar HLeithner HLeithner - change - 7 Nov 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-11-07 07:42:12
Closed_By HLeithner
Labels Added: ?
Removed: ?
avatar HLeithner HLeithner - close - 7 Nov 2023
avatar HLeithner HLeithner - merge - 7 Nov 2023
avatar HLeithner
HLeithner - comment - 7 Nov 2023

thanks

avatar angieradtke
angieradtke - comment - 7 Nov 2023

Do we need this Fix in 4.4 as well?

avatar HLeithner
HLeithner - comment - 7 Nov 2023

No because we changed the plugin trigger code in 5.0 which leads to this issue.

avatar angieradtke
angieradtke - comment - 7 Nov 2023

ah ok - understand , thanks

avatar Scrabble96
Scrabble96 - comment - 8 Nov 2023

@Scrabble96 can you please test this pr, simple use the prebuilt packages from https://artifacts.joomla.org/drone/joomla/joomla-cms/5.0-dev/42285/downloads/71682

Hi @HLeithner - I've just got around to testing this. It works fine. Thank you all for fixing and testing this.

avatar Fedik
Fedik - comment - 8 Nov 2023

@laoneo please check my previous comment #42285 (comment)
trim also a bad idea, it will remove "white space" value

avatar laoneo
laoneo - comment - 8 Nov 2023

Thanks for the info

avatar Scrabble96
Scrabble96 - comment - 8 Nov 2023

Silly question, perhaps, but can whatever was done to change it from J4.4.0 to J.5.0 just be reversed, rather than adding yet more code?

avatar Fedik
Fedik - comment - 8 Nov 2023

We have updated old events APi to new ?

Add a Comment

Login with GitHub to post a comment