Follow on to #2798829: Cannot add relative internal link.

It's common to want to set privacy policy link to a relative URL such as "node/2" or "privacy-policy. With the fixes in the referenced issue, the code in this module now allows that.

However the field is still marked as #type = 'url', which indicates an absolute URL. The Browser may use this field - and in particular Firefox enforces it. If there is a relative URL, Firefox displays an error "Please enter a URL", and does not allow the form to submit.

The correct fix is to set '#type' => 'textfield'

Comments

AdamPS created an issue. See original summary.

killua99’s picture

Thank you, I'll attend the issue at the end of this during this week.

mr.baileys’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Good catch, here's a patch including a test to make sure we don't revert to type='url' later.

killua99’s picture

Good, I'll added now.

  • killua99 committed f94a305 on 8.x-1.x authored by mr.baileys
    Issue #2852407 by mr.baileys, AdamPS: Browser prevents adding relative...
killua99’s picture

Status: Needs review » Fixed

Now is on the Dev branch. Later I'll create a beta version of it.

adamps’s picture

Great thanks to both of you for a quick response

Status: Fixed » Closed (fixed)

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

LNakamura’s picture

Hi - #3 plus #20 from https://www.drupal.org/node/2798829 works great for us - any idea when there will be a new stable release?