Problem/Motivation

Currently, attempting to enter urls longer than 128 characters is not allowed by the redirect form element. This is because the maxlength property of drupal textfield element is set to 128 by default, and Rabbit Hole doesn't specify anything different.

Proposed resolution

This issue has already been addressed for Drupal 7 but not for Drupal 8 in #2929474: Can't enter redirect urls longer than 128 characters.

Since it's commonly accepted that all browsers support URLs up to about 2000 characters in length I propose we allow that.

Remaining tasks

  • Patch to follow
  • Review
  • Merge
CommentFileSizeAuthor
#4 2020-02-21_10-50-09.png394.61 KBdanny englander
#2 3115059-02.patch556 byteswengerk

Comments

wengerk created an issue. See original summary.

wengerk’s picture

Issue summary: View changes
StatusFileSize
new556 bytes

Here is the patch, lets tests it

wengerk’s picture

Status: Active » Needs review
danny englander’s picture

StatusFileSize
new394.61 KB

I tested the patch in the following way:

  • Installed rabbit_hole via composer
  • Enabled the main module and Rabbit hole for nodes
  • Confirmed that I was only able to enter 128 characters for a Rabbit hole URL (redirect) at /admin/structure/types/manage/article
  • Added this patch to composer:
    "patches": {
          "drupal/rabbit_hole": {
            "Can't enter redirect urls longer than 128 characters": "https://www.drupal.org/files/issues/2020-02-21/3115059-02.patch"
          }
        }
  • Installed the patch with composer install
  • Navigated back to /admin/structure/types/manage/article
  • Entered a URL longer than 128 charcters and saved
  • Visited an article page to confirm the new longer than 128 character url worked

The UI for rabbit hole

danny englander’s picture

Status: Needs review » Reviewed & tested by the community

dylan donkersgoed’s picture

Thanks for the patch and Danny thanks for the detailed explanation of testing. I've merged this in.

dylan donkersgoed’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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