0

I want to add an external URL to the Views More Link Display Settings. It is also mentioned in the guide lines as well ("A Drupal path or external URL the more link will point to. Note that this will override the link display setting above."). But it is validating the URL using internal path component.

Error:- InvalidArgumentException: The internal path component 'https://www.google.com' is external. You are not allowed to specify an external URL together with internal:/. in Drupal\Core\Url::fromInternalUri() (line 410 of /var/www/drupal/web/core/lib/Drupal/Core/Url.php).

Please refer to this screenshot.

enter image description here

Please share if there is a way to alter the link display settings. Thanks in advance!

0

You must be using an older version of Drupal because this has been fixed: Views throws InvalidArgumentException in More Link with external URLs.

I tried it on the latest Drupal 8.6.2 and it accepts external urls (your example) without any errors.

You should update to the latest version, even more so for security fixes.

  • Tried the same in the latest Drupal Core version(8.6.2). I am referring to the more link area in the pager section. Hope we are on the same page. – Srijeeta Ghosh Nov 5 '18 at 9:16
  • Yes, we're on the same page ;) The only difference from your screenshot in my case is that I also have some pages in the same view so besides None and Custom I see those Page displays listed too. But I now tried it in a new view with only one Block display and it still goes through without any errors. – prkos Nov 5 '18 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.