Problem/Motivation

In LocaleController::checkTranslation() we are returning a ResponseRedirect object hardcoding a uri.
We should use $this->redirect with a route name instead.

Proposed resolution

Use $this->redirect()

Remaining tasks

Patch!
See if this is covered by tests.
Write tests if not.
Review!

User interface changes

None.

API changes

None.

 

-->

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Novice Instructions Yes
Reroll the patch if it no longer applies. Novice Instructions
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fran seva’s picture

Issue summary: View changes
fran seva’s picture

Issue summary: View changes
PieterJanPut’s picture

Assigned: Unassigned » PieterJanPut
PieterJanPut’s picture

Status: Active » Needs review
FileSize
826 bytes
PieterJanPut’s picture

Assigned: PieterJanPut » Unassigned

Status: Needs review » Needs work

The last submitted patch, 4: use_this_redirect-2470980-4.patch, failed testing.

PieterJanPut’s picture

FileSize
723 bytes
PieterJanPut’s picture

Status: Needs work » Needs review
mitrpaka’s picture

Status: Needs review » Needs work

$this->redirect() requires route name instead of url.

Use return $this->redirect('locale.translate_status'); to correct it (See locale.routing.yml for details).

No additional test needed, covered by Drupal\locale\Tests\LocaleTranslationUiTest

PieterJanPut’s picture

Status: Needs work » Needs review
FileSize
684 bytes

The last submitted patch, 7: use_this_redirect-2470980-7.patch, failed testing.

fran seva’s picture

Status: Needs review » Reviewed & tested by the community

The patch is good for me

fran seva’s picture

Issue summary: View changes
fran seva’s picture

Issue summary: View changes
penyaskito’s picture

+1, thanks for working on it!

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

Classifying this cleanup as a bug. This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 3d93230 and pushed to 8.0.x. Thanks!

  • alexpott committed 3d93230 on 8.0.x
    Issue #2470980 by PieterJanPut: Use $this->redirect() instead of...

Status: Fixed » Closed (fixed)

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

Gábor Hojtsy’s picture

Issue tags: -sprint

Thanks!