Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Content duplicated after </html> !!! ?? 
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

Hi All -

Really weird bug (or my mistake???)

Magento ver. 1.0.19870.4

I’m using a 3-column layout for a new CMS page. I am also using “Layout Update XML” to add content to the left column, using the following code:
(this also happens with the 2 column layouts)

<reference name="left">
<
block type="myCompany_Test/Test" my_param="3"  template="catalog/product/testview.phtml" before="newsletter" />
</
reference>

This works fine, EXCEPT that
A) (not so important at the moment, but ill mention it here) “my_param="3" “ isn’t getting passed into my block
B) More important - The output from the template is getting duplicated AFTER the closing HTML tags! (making it visible - looks like it’s in the footer of the page).

This block does the same in the “right” or “content” columns as well!
My Block / Template could not be simpler!

block:

<?php
class myCompany_Test_Block_Test extends Mage_Catalog_Block_Product_Abstract
{
    
public $heyhey;
    public function 
__construct()
    
{
       
//nothing
    
}
}
?>
Template (.phtml file)
<div>
    <
ul id="leftCatNav" class="leftCatNav">
    <
li><class="leftLink" href="#">Current Category Archive</a></li>
    <
li><class="leftLink" href="#">New Events</a></li>
    <
li><class="leftLink" href="#">Roxanne's Picks</a></li>
    <li><a class="leftLink" href="#">Staff Picks</a></li>
    <li><a class="leftLink" href="#">Faith Middleton</a></li>
    <li><a class="leftLink" href="#">Kid'
s Favories</a></li>
    </
ul>
</
div>
Image Attachments
top.jpgbottom.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
nikefido
Guru
 
Avatar
Total Posts:  481
Joined:  2008-07-11
New Haven, CT
 

Fixed my main problem (bolded in above post) by simple adding a “name” attribute. farking stoopid.

<reference name="left">
<
block type="myCompany_Test/Test" my_param="3" name="mycompany.test"  template="catalog/product/testview.phtml" before="newsletter" />
</
reference>
 
Magento Community Magento Community
Magento Community
Magento Community
 
heist
Jr. Member
 
Total Posts:  3
Joined:  2008-11-12
 

I had the same…
this is STUPID behaviour anyway

 
Magento Community Magento Community
Magento Community
Magento Community
 
BoostMyShop
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2008-06-11
France
 

thank u very much for posting solution smile

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top