Problem/Motivation

There can be error if value for the destination query parameter doesn't begin with '/':
InvalidArgumentException: The user-entered string 'product/1' must begin with a '/', '?', or '#'. in Drupal\Core\Url::fromUserInput() (line 216 of core/lib/Drupal/Core/Url.php).

Steps to reproduce

Use some path without '/' at the beginning of the value for the destination query parameter.
Example: /cart-links/1-2?destination=product/1

Proposed resolution

Improve description on the project's page and readme file.

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

khiminrm created an issue. See original summary.

rszrama’s picture

Ahh, good catch. We might also just prepend the / if we see it's missing when parsing the link as a safeguard.

vmarchuk made their first commit to this issue’s fork.

  • vmarchuk committed dac17cd5 on 1.0.x
    Resolve #3428042 "Improve description of"
    
vmarchuk’s picture

Status: Active » Fixed

Committed!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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