Problem/Motivation

I am trying to link to https://www.drupal.org/u/rajab-natshah
When I enter rajab-natshah the form does not validate says the user could not be found.
If I enter Rajab Natshah the page will save, but then it links improperly to:
https://www.drupal.org/u/Rajab%20Natshah

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

hussainweb’s picture

Thank you for the MR. Can you take a look at #3394442: Decide if we should accept actual username or URL slugs and let me know your thoughts? We can fix it properly that way.

nicxvan’s picture

Commented!

hussainweb’s picture

Status: Active » Needs review

@nicxvan, I have adapted your fix into a different MR. Can you take a look and review? Thanks!

I tested this locally with your example and it works properly.

hussainweb’s picture

I just found #3416847: Drupal.org profile link in display page is formatted incorrectly which is the same issue as this. I am brining in the test from that issue and crediting the author.

hussainweb’s picture

I pushed a change to the test removing some of the use cases. The usernames being tested are actual users. In this case, that user is not confirmed and the URL returned by the API is different than what we would expect (it is of the format /user/uid). We can test this as well but this test might break in the future when this user gets confirmed. So, let's remove it instead.

nicxvan’s picture

I can try to test this on Friday

  • hussainweb committed e63abfae on 2.x
    Issue #3464064 by nicxvan, hussainweb: Usernames with Spaces do not work
    

hussainweb’s picture

hussainweb’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nicxvan’s picture