Action "Page redirect" needs to be ported to Rules 8.x-3.x.

Remaining tasks

  • Implement restriction, optional and defaultValue contexts.
  • Test if "Append destination parameter" works.
  • Test if "Force redirection" works.
  • Add code to exclude Rules administration pages from redirections in order not to lock out admins

Comments

bbujisic’s picture

Assigned: Unassigned » bbujisic
bbujisic’s picture

Issue summary: View changes
Status: Active » Needs review
dasjo’s picture

Assigned: bbujisic » Unassigned
dasjo’s picture

Status: Needs review » Needs work

Setting to needs work based on the comments left on the pull request

bbujisic’s picture

Status: Needs work » Needs review

Still, lots of todo's, but at least comments on pull request were attended.

klausi’s picture

Status: Needs review » Needs work

Good start, thanks!

I think we need to implement a RedirectResponseSubscriber similar to Drupal\Core\EventSubscriber\RedirectResponseSubscriber .

So the workflow would be:
1) Action gets executed and sets the redirect target. Maybe just a static variable on the SystemPageRedirect class? SystemPageRedirect::redirectTraget?
2) When the response is generated and the KernelEvents::RESPONSE event triggers our RedirectResponseSubscriber kicks in. It checks SystemPageRedirect::redirectTraget and if it is not empty we know that we have to issue a redirect. It generates a redirect response object and sets that on the event.

mariancalinro’s picture

Assigned: Unassigned » mariancalinro
mariancalinro’s picture

mariancalinro’s picture

Status: Needs work » Needs review
mariancalinro’s picture

Assigned: mariancalinro » Unassigned
mariancalinro’s picture

Assigned: Unassigned » mariancalinro
Status: Needs review » Needs work
klausi’s picture

Status: Needs work » Fixed

merged, thanks!

  • klausi committed 2c66a83 on 8.x-3.x
    Issue #2471641 by mariancalinro, bbujisic: Port "Page redirect" action...

Status: Fixed » Closed (fixed)

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