New answers tagged

0

Many people may tell you this is what NOT to do, but for exotic and incomprehensible reasons, TrustedRedirectResponse can cause your controller to throw the error about metadata leaking "somewhere". I checked all around my desk and on the floor, and I couldn't find any metadata :) This can happen even if you disable caching for your route in every ...


0

You can try to manually add the query parameters to the redirect URL. Add this code: $query = []; parse_str($current_uri, $query); just below this code: $current_uri = \Drupal::request()->getRequestUri(); And then change this line: $url = Url::fromRoute('entity.node.canonical', ['node' => $nid]); To this: $url = Url::fromRoute('entity.node....


Top 50 recent answers are included