1

Magento CE 1.7.0.1

I've created a new 1column.phtml template file which I have set to be used by my templates catalog.xml file:

<!--
Product view
-->

    <catalog_product_view>
        <!-- Mage_Catalog -->
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>

After that I proceeded to test a few changes but I noticed that not everything was being loaded in my browser window. It seemed to stop immediately after the footer so I view the rendered page source in my browser and I see that my page stops rendering immediately before:

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

The page will load without any problems if I remove that line. I check in the log files of Magento and I see nothing. I check what I believe to be the php error log for the site and I see nothing there as well. Any theories as to why Magento would stop when asked to getChildHtml? Thank you.

1 Answer 1

2

Do you mean that it doesn't complete the closing body tag? That normally would indicate an exception. I guess it's possible that your errors are being written to a location other than where you expect to see them.

Anyway, you should start inspecting what other blocks are being stuffed into the before_body_end handle. On a *nix system, you should be able to do:

grep -rn 'before_body_end' /path/to/mage/app/design/frontend

And that may help you to identify which child block is causing the error.

Another tip is to install an extension like Alan Storm's Layoutviewer module. It will let you see the generated layout XML before page render just by appending a query param to your target page URL.

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.