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
Fix all miswritten getAdminLink calls in templates #11531
Fix all miswritten getAdminLink calls in templates #11531
Conversation
'editGraft': 1 | ||
} %} | ||
{% if selectedModule %} | ||
{% set linkParams = liParams|merge({'show_modules': selectedModule}) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linkParams
and not LiParams
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PierreRambaud done!
@@ -1966,7 +1967,7 @@ private function getNotificationTip($type) | |||
array( | |||
'[1]' => '<strong>', | |||
'[/1]' => '</strong>', | |||
'[2]' => '<a href="' . $this->context->link->getAdminLink('AdminCarts') . '&action=filterOnlyAbandonedCarts">', | |||
'[2]' => '<a href="' . $this->context->link->getAdminLink('AdminCarts', true, array(), array('action' => 'filterOnlyAbandonedCarts')) . '">', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why array()
and not []
like above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this class uses the array()
notation everywhere so I prefer to write it this way
admin-dev/themes/new-theme/template/components/layout/employee_dropdown.tpl
Show resolved
Hide resolved
Nothing to add regarding the PR content. However, if you had to update all URLs generated, you should probably warn the module developers to do the same thing in https://devdocs.prestashop.com/1.7/modules/core_updates/1.7.5/ If their module cannot reach specific pages of the back office and they are not aware of it, this is bad. |
@Quetzacoalt91 I mentioned it in the routing section https://devdocs.prestashop.com/1.7/development/architecture/migration-guide/controller-routing/#more-about-the-legacy-link-property |
Nice to see you already wrote something about this. But yes, the link I gave you is mentioned in the Build article, to help contributors knowing what are the potential regression brought by 1.7.5.0. If we can add a link to the other page, that'd be great. |
@Quetzacoalt91 here is the update for dev doc: PrestaShop/docs#168 |
Thank you @jolelievre |
getAdminLink
is miswritten, it uses only the controller as a parameter and appends manually the parameter afterwards. This PR fixes every templates so that they are correctly written using fullgetAdminLink
parameters. The same work will have to be done in the controller classes. It especially fixes the edition of module position, but lots of other links have been improved as well.This change is