Problem/Motivation

When we go to the search page, f.e. https://domain.nl/search?terms=searchthis, the url that is submitted for reading is https://domain.nl/search. But this returns an empty page.

Steps to reproduce

Go to a search with readspeaker on it.
Search
Click "read"

Proposed resolution

Add the url parameters to the request_path. (or make this optional)

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

JoshaHubbers created an issue. See original summary.

joshahubbers’s picture

This patch adds the parameters to the url (if they are available).

Koen.Holman’s picture

functional check approved

sunlix’s picture

@JoshaHubbers,

thanks for your patch. Good finding.

I think we can shorten the code a little bit due to Url::fromRoute support a query option.

$url = Url::fromRoute(
  '<current>',
  ['query' => \Drupal::request()->query->all()],
  ['absolute' => TRUE]
)->toString();
joshahubbers’s picture

Status: Active » Needs review
StatusFileSize
new1.58 KB

Thanx @sunlix!

I updated the code in this patch.

joshahubbers’s picture

sunlix’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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