Skip to content

[5.x]: Link field URL will no longer accept a root-relative string. #15579

@thisisjamessmith

Description

@thisisjamessmith

What happened?

Description

Prior to 5.3 we could use root-relative links in the URL field type, now the new "Link" field.

image

On sites that use root-relative links extensively this will cause validation errors when attempting to save.

We don't want to use absolute URLs for internal links because they need to work on both dev and live environments, which use different TLDs.

We don't want to update all content to use element relationships because 1) Not everything on a given site is necessarily a URL-addressable Entry/Category/Asset, and 2) Your docs state that elements are not currently eager-loadable, and 3) it'll take ages on old sites that already have lots of populated URL fields.

Can we please just allow URLs that start with a slash to maintain backwards compatibility? (We'll have lots of Craft 3 & 4 sites to upgrade soon and this will be a show-stopper for those).

Craft CMS version

5.3.4

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions