New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LegacyContext::getLegacyAdminLink #11309

Merged
merged 3 commits into from Nov 15, 2018

Conversation

Projects
None yet
5 participants
@jolelievre
Contributor

jolelievre commented Nov 7, 2018

Questions Answers
Branch? 1.7.5.x
Description? The import feature looped indefinitely because it tried to redirect to the legacy controller, but because of the _legacy_link feature it was redirected to itself. So a new method is added in LegacyContext to be able to build a legacy link.
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #10838
How to test? See #10838

This change is Reviewable

@jolelievre jolelievre added this to the 1.7.5.0 milestone Nov 7, 2018

@@ -125,7 +125,8 @@ public function importAction(Request $request)
}
$formData = $form->getData();
if (!$errors = $formHandler->save($formData)) {
$errors = $formHandler->save($formData);

This comment has been minimized.

@matks

matks Nov 9, 2018

Contributor

👍

*
* @return string
*/
public function getLegacyAdminLink($controller, $withToken = true, $extraParams = array())

This comment has been minimized.

@matks

matks Nov 9, 2018

Contributor

Are you sure this should go into LegacyContext class, rather than in Link core class ?

As it is inspired by https://github.com/PrestaShop/PrestaShop/blob/develop/classes/Link.php#L807

This comment has been minimized.

@jolelievre

jolelievre Nov 9, 2018

Contributor

good idea, but then it should be in both no?

This comment has been minimized.

@jolelievre

jolelievre Nov 12, 2018

Contributor

@matks done! ;)

@marionf marionf self-assigned this Nov 15, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Nov 15, 2018

@marionf marionf removed their assignment Nov 15, 2018

@Quetzacoalt91 Quetzacoalt91 merged commit 063479c into PrestaShop:1.7.5.x Nov 15, 2018

1 of 2 checks passed

Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Nov 15, 2018

Thank you @jolelievre

@jolelievre jolelievre deleted the jolelievre:import-loop branch Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment