I have an extension that do layout update to push something to all pages headers. It worked so far for several clients and versions, but suddenly we got a client that just don't get the layout update.

  • We know the extension works because routes we added work.
  • We already checked with the client that extension output is not disabled in admin panel.
  • The client assured us they did clear cache in admin.
  • Its probably not because some full-page cache extensions (like varnish), because we tried accessing the pages with "?aaa=bbb" added to the URL and it still didn't work, and usually full-page caching solutions are URL-based.

And important point to note: this client manage two sites/stores on the same server (from the same admin), if that might affect anything...

Anyway... here's our layout xml:


<!-- Layout updates to inject vendor headers to all pages (include vendor js and page metadata). -->
<layout version="0.1.0">
        <reference name="head">
                <block type="vendor_core/injectjs" name="vendor_js" as="vendor_js" template="vendor/injectjs.phtml" />

And here's the config.xml that apply this update:

<?xml version="1.0" encoding="UTF-8"?>






Note that the company name was replaced with "vendor", so if you notice any typos there ignore them :)

Any ideas why the layout update might not work or how can I figure it out? I might get like an hour at the client's office to test things, but right now I don't have any access, just the code.


Added the phtml file:


<?php if( $this->isEnabled() ): ?>

    <script type="text/javascript" id="vendor-src" <?php echo $this->getAsyncMode(); ?> src="<?php echo $this->getJsUrl(); ?>"></script>

<?php else: ?>

    <!-- Note: Vendor (<?php echo $this->getVersion(); ?>) is temporarily disabled via admin panel. -->

<?php endif; ?>
  • you skipped the boring stuff, but it's not that boring. it's actually important.
    – Marius
    May 23, 2016 at 12:54
  • don't see why but added anyway. thanks!
    – Ronen Ness
    May 23, 2016 at 12:56
  • 1
    Well your <frontend> tag is not closed. May 23, 2016 at 12:57
  • it is sorry it was removed when I pasted it in the question. fixed the question, thanks!
    – Ronen Ness
    May 23, 2016 at 12:58
  • 1
    and does your injectjs block file exists and is name like this? Vendor/Core/Block/Injectjs.php ?
    – Marius
    May 23, 2016 at 13:10

1 Answer 1


One possible issue could be that the page/html/head.phtml template has been modified and the following line has been removed/modified:

<?php echo $this->getChildHtml() ?>

Try to enable Template Hints under System > Configuration > Developers to find out the path of this template and ensure the line I mentioned has not been deleted.

To ensure that the problem does not come from your block, I suggest you should try adding your block to another block, for instance the after_body_start block:

    <reference name="after_body_start">
            <block type="vendor_core/injectjs" name="vendor_js" as="vendor_js" template="vendor/injectjs.phtml" />
  • 1
    So we just got a call from the client, they put one of the folders in the wrong place. what a relief :) I can't accept this solution but I learned from it so have my upvote. Thanks!
    – Ronen Ness
    May 23, 2016 at 14:53
  • @Ness yeah, awesome glad you worked it out =) May 23, 2016 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.