Problem/Motivation

When completing an interactive form the page doesn't redirect and instead states

Interactive Task Execution
Open configuration options
You do not have access to this task. The task has either been reassigned or is no longer valid.

Steps to reproduce

Create an interactive form task and handler that submits to complete the task
Set it to have a redirect, or use the default /tasconsole redirect
On submit you get error instead of redirection

Proposed resolution

It appears that on line 108 of the interactive form base the Form is set to rebuild, but that overrides any of the redirects set earlier.

I think the solution is to check for redirects there, it appears to fix it.
Not sure if it should explicitly check for FALSE since it could be NULL or FALSE

    if(!$form_state->getRedirect()) {
      // Rebuild the form if no redirect is set.
      $form_state->setRebuild(TRUE);
    }

It appears to be present from the 2.0 rewrite to the current 4.x branch

Comments

ehlovader created an issue. See original summary.

_randy’s picture

Status: Active » Postponed (maintainer needs more info)

Just for clarity, this is for non-modal interactive function tasks?

  • _randy committed 01deedd1 on 4.x
    fix: #3559857 Interactive form redirect on completion not functioning...
_randy’s picture

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

Yes, this is non-modal interactive functions, sorry I missed that detail

Thanks for the quick response

_randy’s picture

Status: Needs review » Fixed

I'll mark this as fixed. If the issue persists then this ticket can be reopened or a new issue created.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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