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

Fix renderModules error when getTemplate called with true from included module templates #4421

Closed
wants to merge 1 commit into from
Closed

Fix renderModules error when getTemplate called with true from included module templates #4421

wants to merge 1 commit into from

Conversation

haydenyoung
Copy link

When getTemplate(true) is called from a module override (i.e. to retrieve template params), JModuleHelper renderModules method breaks because the $template variable's value has changed from a string (the name of the template) to an object (holding the template's params) between being assigned and when actually called. This is due to module overrides being called after the variable has been assigned a value but before it is used by the chrome and attribs vars.

Instead of assigning to a $template var, getTemplate is called directly to ensure the template name is available rather than the stdClass.

infograf768 referenced this pull request Oct 10, 2014
Fixes for a regression introduced by #4221
@kathastaden
Copy link

I couldn't reproduce the problem with the break of the function. The value of $template doesn't change from a string to an object. In my tests it always stayed as a string and the function didn't break. So the test was not successful, because there is no problem to reproduce.

@roland-d roland-d closed this Aug 21, 2015
@roland-d
Copy link
Contributor

With 2 unsuccessful tests and the topic starter removed the repository I am closing this issue. Feel free to open the issue at anytime if you want to continue.

Thank you for your contribution.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4421.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants