Created on 20 July 2018, over 6 years ago
Updated 9 August 2023, over 1 year ago

If i use realname module - i can't send messages. There some issues relate to autocomplete widget
1. checkPrivateMessageMemberExists method in Mapper\PrivateMessageMapper.php. method can't find user by his realname. so, when you open add message form - validation of user name fails.
2. even if validation if checkPrivateMessageMemberExists success, after submit form appearing message "There are no entities matching "USERNAME". Origin in validateEntityAutocomplete (Drupal/Core/Entity/Element/EntityAutocomplete.php) which don't get uid in username, because submitted name don't have it. Submitted value is "USERNAME", instead of "USERNAME (UID)". When form loaded in first time i can see that http://prntscr.com/k8ypcn (default value like "USERNAME (UID)"), but if check value, it's already will be without uid http://prntscr.com/k8ypui . So, some javascript change it.
Hope this help and someone can continue searching to fix this incompatibility with realname module.

Problem in private_message_members_widget.js, in init method. addUserToMembers called without uid.

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine cosolom

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States drupgirl

    +1 for a 8.x-3.x patch

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    loze β†’ changed the visibility of the branch 2987189-realname-support to hidden.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    loze β†’ changed the visibility of the branch 2987189-realname-support to active.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    Its been some time since the original issue and patches.

    Since then this module now uses the users display name instead of the username, which resolves 1/2 of what was being addressed in the original patches.

    I have created MR!121 which adds realname support to the autocomplete query for the members widget if realname is installed.

    here is a patch for the MR to use with composer.

  • Pipeline finished with Failed
    3 months ago
    Total: 568s
    #289799
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles
  • Pipeline finished with Success
    3 months ago
    Total: 277s
    #289836
  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    Last patch in #22 was wrong, some unintended changes made it in there.
    this one should work with composer

  • πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

    Isn't this reduced to the idea of using User::getDisplayName()?

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    @claudiu.cristea I dont believe that getDisplayName() is a queryable field, right?

    I'm trying to get the auto complete search to use the compiled display name that is stored in the realname table.

  • πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

    Thank you. I think you're right. I'm not a very big fan of adding module soft dependencies (aka "if module exists..."). Is there any way you can hook in from a 3rd-party and alter the suggestions? At least maybe we can create a submodule to add realname support. I admit I didn't have time to give a deeper look at this

Production build 0.71.5 2024