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

Avoid doing admin tasks in the module constructor #61

Merged
merged 1 commit into from Nov 5, 2018

Conversation

Projects
None yet
3 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Nov 2, 2018

The module constructor can be called anytime: during the installation, the tests and so on. On these environments, the admin context does not always exist and this makes the module failing at the admin link generation.

@MrBaiame

This comment has been minimized.

Contributor

MrBaiame commented Nov 5, 2018

@Quetzacoalt91 the front_controller variable is also called in the theme controller from what i remember

@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Nov 5, 2018

I searched in the whole project, nothing was found outside these files.

@MrBaiame

This comment has been minimized.

Contributor

MrBaiame commented Nov 5, 2018

Ready for QA, @marionf

@marionf

This comment has been minimized.

marionf commented Nov 5, 2018

capture d ecran_561

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:get-controller-link-lazy branch from 8b587c6 to 3a9c3cf Nov 5, 2018

@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Nov 5, 2018

Just set the method as public.

@Quetzacoalt91 Quetzacoalt91 force-pushed the Quetzacoalt91:get-controller-link-lazy branch from 3a9c3cf to 5267286 Nov 5, 2018

@marionf marionf added QA approved and removed Waiting for QA labels Nov 5, 2018

@MrBaiame MrBaiame merged commit 5056cb0 into PrestaShop:dev Nov 5, 2018

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