Closed (fixed)
Project:
Rules
Version:
4.0.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jun 2024 at 21:19 UTC
Updated:
13 Jul 2024 at 04:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sarwan_verma commentedComment #3
sarwan_verma commentedHi @TR,
I've created the patch for this , please verify the attached patch.
Comment #4
tr commentedThis doesn't work.
loadMultiple() doesn't take a boolean argument.
You have to make sure that the value of $roles doesn't change. I suggest reading the change record that I linked.
Comment #5
sarwan_verma commentedI have added the new updated patch ,kindly review and verify. Thanks.
Comment #6
tr commentedRead what I said in #4.
Comment #10
ankitv18 commentedMR!38 is ready for review
Comment #11
tr commentedAgain,
user_role_names()andRole::loadMultiple()DO NOT GENERATE THE SAME OUTPUT. You can't simply substitute one for the other. More work needs to be done.The contents of
$rolesneeds to be EXACTLY THE SAME after the change as it was before the change.Here is a little drush script that demonstrates this is wrong. This prints the value of
$roleswith the old code then prints the value of$roleswith the new code. Run this asdrush php-script 3457135-roles.txtComment #12
bharath-kondeti commentedComment #13
bharath-kondeti commentedComment #14
tr commentedI don't think
Html::escape()is correct here, so I removed it. The original functionuser_role_names()does not use it. Also, this was discussed in the core issue linked in the change notice. Although the core patch did use it in some places, there was a follow-up issue to remove it.Regardless, in Rules, this code appears in an
OptionsProvider, and sanitation should not take place this early - that should be left to the rendering stage. We have no knowledge in theOptionsProviderabout how the data will eventually be used, so IMO it is premature to modify it withescape().Comment #15
bharath-kondeti commentedOkay. Thanks for the review. @TR do we have to address the build issues on PR in this issue itself ?
Comment #17
tr commentedOnly need to address things caused by this MR, but there are none. I still trying to get all the tests back and running - they're failing due to changed in D10.3 and due to the change from DrupalCI to GitLabCI. I'm working on it, and it's almost all fixed now.