Closed (cannot reproduce)
Project:
Redirect
Version:
8.x-1.0-alpha3
Component:
Code
Priority:
Normal
Category:
Bug report
Reporter:
Created:
6 Feb 2017 at 23:59 UTC
Updated:
5 May 2020 at 21:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
oheller commentedComment #3
Anonymous (not verified) commentedI can confirm that the issue was fixed simply by reverting back to 8.x-1.0-alpha2 from 8.x-1.0-alpha3. I didn't even revert the configuration changes that were made during the update hook.
I'll come back later with a solution to this.
EDIT: This issue caused the xmlsitemap.module to generate a sitemap.xml file that didn't use aliases.
EDIT 2: My issue was actually with #2822190: PathValidator validates based on a RequestContext leaked from the current request, resulting in false negatives during CLI requests and POST submissions and there were a couple of different factors that made the bug show up.
Comment #4
berdirThe only explanation I have for this is that your Drupal actually thinks it needs this and it *generates* such links. That's obviously bad as it mean that every single request needs a redirect first? How do your links look like? If so then this is a problem with your configuration/set up and not the fault of this module.
Pretty sure we have tests for this and that it is working.
Comment #5
oheller commentedBerdir, I'm not sure what you mean by how my links look like.
I am using Drupal 8.2.6. We are using pathauto to generate some paths. I looked at the redirect page and noticed that we had a number of urls, because we have the option to set a redirect when the url alias was changed. I deleted all of them. Upon updating the redirect module I found the urls again with ?q=.
I'm more than willing to think that we did something funky to make this happen, but it's also affecting the sites admin urls, which I'm sceptical to take credit for.
I just created a fresh D8.2.6 install and installed the latest redirect with drush. After enabling it, node/2 became node/2?q=node/2.
Upon uninstalling redirect, the urls went back to before. node/2
Comment #6
wesleydv commentedI have the same issue, and like oheller the issue disappears after uninstalling
Comment #7
berdirI don't see why you would get that ?q. Drupal 8 doesn't do that. do you use apache, nginx, ..? do you have some old Drupal 7 configuration there that populates the q variable?
Comment #8
webflo commentedThe issue is related to caching in the RouteProvider, i don't understand it completely. Maybe the screenshot from my xdebug session helps.
Comment #9
webflo commentedI filled a issue against drush https://github.com/drush-ops/drush/pull/2599
Comment #10
berdirThat was committed. Make sure you update drush to have that fix and then report back if you still have any problems.
Comment #11
davps commentedAll what you need is to disable the option 'Enforce clean and canonical URLs' on settings page.
In 8.x-1.0-alpha3 was added new class RouteNormalizerRequestSubscriber and new option 'route_normalizer_enabled' in settings with default value TRUE.
Best solution (patch) for this issue, as I think, set default value to FALSE for route_normalizer_enabled setting.
Comment #12
berdirYou are supposed to have this enabled. If you don't, then you don't get redirects to aliases or based on language detection, trailing / and so on.
Again, the most likely cause for anything weird happening is a misconfiguration in apache/nginx or using a drush run-server without the bugfix linked above.
Comment #13
aveldina commentedSame issue here, appeared after updating from alpha2 to alpha4. A downgrade back to alpha2 resolves it. Am using Nginx.
Comment #14
berdirAs mentioned before, most likely you are still using 7.x configuration. Remove the ?q= stuff from your nginx configuration, it is not needed and wrong for D8.
Comment #15
oheller commentedI'm using Kalabox 2.1.3-dev and the drupal8.conf file in the ~/Kalabox/project/config/nginx/drupal8.conf needs to be updated.
At least lines 73-79 replace with :
Comment #16
berdirClosing issues that have not been providing additional information for over a month.
Comment #17
bburgAfter running into this circular redirect on the latest version (8.x-1.5), here are the changes I made to my nginx config. Old lines are commented out. I just replaced them with the equivalent from https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/.