Skip to content
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

Fixes issue Undefined index _route #15906

Merged
merged 4 commits into from Oct 28, 2019

Conversation

@Gamesh
Copy link
Contributor

Gamesh commented Oct 10, 2019

Questions Answers
Branch? develop
Descripton? not sure why _route is expected to be part of caller parameters but it's not, the route is actually in the caller_route parameter, so we first merge parameters with defaults array to make sure _route key is set. + will not overwrite params with the same name
Type? bug fix
Category? BO
BC breaks? no
Deprecations? no
Fixed ticket? Fixes issue #14663
How to test ? Please check pagination BO pages not migrated to Symfony is working

This change is Reviewable

not sure why _route is expected to be part of caller parameters but it's not, the route is actually in the caller_route parameter, so we first merge parameters with defaults array to make sure _route key is set. + will not overwrite params with the same name
@Gamesh Gamesh requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 10, 2019
@prestonBot

This comment has been minimized.

Copy link
Collaborator

prestonBot commented Oct 10, 2019

Hi!

Your pull request description seems to be incomplete or malformed:

  • The description shouldn't be empty.

Would you mind completing the contribution table ? This would help us understand how interesting your contribution is.

Thank you!

(note: this is an automated message, but answering it will reach a real human )

@Gamesh Gamesh dismissed stale reviews from matks and PierreRambaud via 845a5ed Oct 14, 2019
@Gamesh

This comment has been minimized.

Copy link
Contributor Author

Gamesh commented Oct 14, 2019

@matks i don't understand what pretty is complaining about, it does not print what rule am i breaking or what needs to be changed, very unclear. Can you help me out and clarify?

Co-Authored-By: GoT <PierreRambaud@users.noreply.github.com>
@sarahdib

This comment has been minimized.

Copy link

sarahdib commented Oct 16, 2019

hello @Gamesh

The issue linked seems to be the wrong one can you confirm ?

Thank you for your contribution

@Gamesh

This comment has been minimized.

Copy link
Contributor Author

Gamesh commented Oct 16, 2019

@sarahdib well it's correct kind of, the solution for the problem was provided by the last comment in that ticket
#14663 (comment)

rather than changing the core files like it suggests i decided to make it a pull request, which was never done

@sarahdib sarahdib added the QA ✔️ label Oct 25, 2019
@sarahdib sarahdib added this to the 1.7.7.0 milestone Oct 25, 2019
@matks

This comment has been minimized.

Copy link
Contributor

matks commented Oct 28, 2019

Thank you @Gamesh

@matks matks merged commit 9c09f9c into PrestaShop:develop Oct 28, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@Gamesh Gamesh deleted the Gamesh:patch-2 branch Oct 28, 2019
@Gamesh

This comment has been minimized.

Copy link
Contributor Author

Gamesh commented Oct 28, 2019

thanks

@fabiorme

This comment has been minimized.

Copy link

fabiorme commented Nov 4, 2019

hi, I found the same error, during a clean installation, from zero to prestashop.
I replaced the old part of the code with this new one but I still have the same problem, and I can't complete the installation
$callerParameters = $request->attributes->get('caller_parameters', array()); foreach ($callerParameters as $k => $v) { if (strpos($k, '_') === 0) { unset($callerParameters[$k]); } } $callerParameters += array('_route' => false); $routeName = $request->attributes->get('caller_route', $callerParameters['_route']); $nextPageUrl = (!$routeName || ($offset + $limit >= $total)) ? false : $this->generateUrl($routeName, array_merge( $callerParameters, array( $offsetParam => min($total - 1, $offset + $limit), $limitParam => $limit, ) ));

config:
PHP: 7.1.19
Prestashop 1.7.6.1

presta_err_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.