- Issue created by @kubokura
- Status changed to Postponed: needs info
about 1 year ago 8:02pm 28 September 2023 - 🇨🇭Switzerland salvis
As you can see above, pasting code as text does not work.
Reverting part of acl.admin.inc of v1.1.0 to v1.0.0-beta1 works OK.
Such version number have never existed.
Please provide a patch against the current -dev version.
Thank you for reply, and sorry for typo.
wrong: v1.1.0 to v1.0.0-beta1
correct: 8.x-1.1 to 8.x-1.0-beta1And here is a patch against 8.x-1.x-dev (dev-1.x 963031f).
best regards,
- Status changed to Needs review
about 1 year ago 6:11pm 30 September 2023 - last update
about 1 year ago Patch Failed to Apply - Status changed to Needs work
about 1 year ago 7:22pm 30 September 2023 - 🇨🇭Switzerland salvis
Never mind the D9.5 — it's the code for 8 and 9. The test bot says
fatal: corrupt patch at line 31
By now we have a 2.x branch for D10, and the patch needs to go against 2.x-dev now. The D8 and D10 branches haven't diverged much yet, the code that you're concerned with is probably still the same.
- 🇵🇱Poland ad0z
I checked the issue and I think we should just let `EntityAutocomplete::validateEntityAutocomplete` validate this element, instead of trying to validate it ourselves, it will validate and set errors like normal entity_autocomplete form element.
I've tested it as much as I could but I would be good if somebody with live usage ofacl_edit_form
could test it as well.
I have prepared patch which implement it, so please take a look. - Status changed to Needs review
about 1 year ago 6:16pm 21 October 2023 - last update
about 1 year ago 5 pass Hi, thank you for the patch. Unfortunately the patch doesn't work well for me.
Steps to reproduce
1. Copy a username from other web page or txt file, and paste it to the user field.
2. Suggested username appears under the auto-complete user field, but ignore it, and hit the [Add user] button.
3. The username isn't added in "Current users" list without "Invalid user specified." error message.best regards,
- 🇵🇱Poland ad0z
@kubokura are you sure you applying the patch correctly? "Invalid user specified" error message is removed and all errors are handled with
EntityAutocomplete::validateEntityAutocomplete
and they are different.
What version of the module are you using? Hi, @ad0z, I'm sorry. I applied the patch against acl 8.x-1.1 on Drupal 9.5.11.
Please disregard my comment of Oct 25.
I still can't upgrade to D10 due to composer error, so I can't apply the patch correctly at this moment.- last update
about 1 year ago 5 pass - 🇵🇱Poland ad0z
@kubokura I've prepared patch for
8.x-1.1
, attaching below. - last update
about 1 year ago 5 pass Hi, @ad0z, thank you for the new patch.
The same symptom "The username isn't added in "Current users" list without "Invalid user specified." error message." occurs, so I modified your patch a little, and it works for me.
+ $uid = $form_state->getValue([$acl_wrapper_key, 'add']);
-> + $uid = $form_state->getValue([$acl_wrapper_key, 'view', 'add']);- last update
about 1 year ago 5 pass - 🇵🇱Poland ad0z
@kubokura thanks for finding it, my patch didn't support nested form elements, and I think your patch need update as it hard code element machine name to be 'view'.
I am attaching patch to8.x-1.x
and2.x
, could you test one for8.x-1.x
? - last update
about 1 year ago 5 pass Hi, @ad0z, thank you for the update. acl-validate-changes-3389445-19.patch works for me. Username is entered successfully without selecting suggested username.