Problem

Users fill an external URLs in this field. This leads to no accessible profile pages.

Proposed resolution

Before the alias field, we pre-fill-in the current site address and leave the space behind empty for users to fill in. This way it is clearer what the url alias is about and it is easier to imagine what the url will look like. Also we add extra validation that will check if URL is relative.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alex.ksis created an issue. See original summary.

jochemvn’s picture

How about adding an addon to the field? Not sure if it's sustainable, but it looks nice: https://v4-alpha.getbootstrap.com/components/input-group/

Not sure what you mean with: "This leads to no accessible profile pages". If they can fill something out there that leads to non existing pages, this is something we need to validate on submit.

maikelkoopman’s picture

What is meant is that users fill in in this field "http://www.domain.com" which results in their profile having the alias "http://www.domain.com/http://www.domain.com". I do agree we should validate it, but that it feedback afterwards. It is even better is we improve the design so users understand it and do it correctly in one try. I have added your idea for using input group add-ons.

alex.ksis’s picture

Version: 8.x-1.0-rc7 » 8.x-1.x-dev
Status: Active » Needs review
FileSize
3.14 KB

Here is the patch and the PR for it: https://github.com/goalgorilla/open_social/pull/465

ribel’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.16 KB

Here is the new patch which fixes max-width of input field if URL is long.

frankgraave’s picture

Status: Reviewed & tested by the community » Fixed

The pull request has been merged. This will be part of our upcoming 1.4 release!

  • maikelkoopman committed 2ca9108 on 8.x-1.x
    Issue #2887789 by maikelkoopman: add correct border-radius for...
  • 903972c committed on 8.x-1.x
    Issue #2887789 by peterpolman: Added border-radius to the left site of...
  • alex.ksis committed b312910 on 8.x-1.x
    Issue #2887789 by alex.ksis: Add extra validation for external URLs
    
  • frankgraave authored d221b31 on 8.x-1.x
    Merge pull request #465 from goalgorilla/feature/2887789-url-alias-field...
  • ribel committed e95a445 on 8.x-1.x
    Issue #2887789 by ribel: Add input-group-expanded class for full width...

Status: Fixed » Closed (fixed)

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