-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Load all child blocks in Adminhtml Head block #3222
Load all child blocks in Adminhtml Head block #3222
Conversation
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.
since the getchildhtml outputs all of the children if no name is passed, it seems good to me.
did a brief test and worked fine
I wonder if there may be other blocks that were not printed before and that now get printed and that could cause problems. |
|
Do you think we should backport this to v19 for the next release? |
it wouldn't cause any harm, absolutely, but I think we shouldn't anyway :-) |
I found a workaround by observing public function addDebugbarHeadToAdminhtml(Varien_Event_Observer $observer)
{
$block = $observer->getEvent()->getBlock();
if (!$block instanceof Mage_Page_Block_Html_Head) {
return;
}
/** @var Varien_Object $transport */
$transport = $observer->getEvent()->getTransport();
$renderer = Mage::getSingleton('elidrissidev_debugbar/debugbar')
->getDebugbar()
->getJavascriptRenderer();
$transport->setHtml($transport->getHtml() . $renderer->renderHead());
} Although not as clean, at least it doesn't require to rewrite the block. |
sure, but I think this PR still makes a lot of sense :-) |
Is there a general issue now? do: <?php echo $this->getChildHtml('debugbar_head') ?>
<?php echo $this->getChildHtml() ?> and the debugbar is displayed 2x do: <?php echo $this->getChildHtml('debugbar_head') ?>
<?php echo $this->getChildHtml() ?>
<?php echo $this->getChildHtml() ?> and the debugbar is displayed 3x Or it's me? and it's already the time to travel again! |
@luigifab I think that's the intended behaviour, |
Description (*)
First roadblock I encountered when creating the extension mentioned in #3219, I can't add a custom child block to admin head 😢, and since the content is dynamically created through calling PHP code I can't use
addJs
either.I don't know why this change wasn't done before, maybe it caused some issue? but it seems to work fine for me.
Manual testing scenarios (*)
Should be loaded after this change.
Contribution checklist (*)