If user uses /user for logged in user, it gives me too-many-redirection error due to the destination paramater in query string. So give other modules ability to alter/modify the $options array.

CommentFileSizeAuthor
#7 2883264-7.patch2.89 KBpiyuesh23
#4 2883264-4.patch2.9 KBjoshi.rohit100
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joshi.rohit100 created an issue. See original summary.

joshi.rohit100’s picture

Title: Not redirecting on 403 error » Too many redirection for logged in user
Issue summary: View changes
joshi.rohit100’s picture

Issue summary: View changes
joshi.rohit100’s picture

Status: Active » Needs review
FileSize
2.9 KB

Patch for just allowing altering the $options array. We can add documentation separately.

nedjo’s picture

Status: Needs review » Needs work

Thanks for noting this issue. However, the patch doesn't address the error the issue describes. There may be a case to be made to allow altering the $options array, but if this is indeed a major bug it should be fixed here.

Could you please provide steps to reproduce the issue? Thanks.

Nixou’s picture

Status: Needs work » Postponed (maintainer needs more info)

@joshi.rohit100, as @nedjo just said above, we can't reproduce your problem actually.

Can you provide steps to reproduce please ?

piyuesh23’s picture

FileSize
2.89 KB

Steps to reproduce this one:
- Create a redirect so that 403 pages are redirected to login page for authenticated user
- Try to login to the site with a destination parameter set to a 403 page.

Re-rolled the patch above to work with latest dev version. The patch above just adds an alter & we are getting rid of the query param inside the alter hook while redirecting.

Nixou’s picture

Status: Postponed (maintainer needs more info) » Needs review
Nixou’s picture

Status: Needs review » Closed (duplicate)

Ok I understand you want to override the $options array here by using a new hook.

This has already be done in https://www.drupal.org/project/r4032login/issues/2700797 using an Event Subscriber (better way than using procedural hook).

See more details in https://www.drupal.org/project/r4032login/issues/2700797#comment-12635207.