Magento + Varnish -> module double effect + show poll block even if disabled - magento

I'm hosted on siteground and I have enbaled all the cache option (I'm using magento 1.9.1):
Varnish Static Cache
Varnish Dynamic Cache
Memcached
Unfortunately the second one duplicate the effect of my minicart module, this is its xml:
<layout version="0.1.0">
<default>
<reference name="head">
<action method="addItem"><type>skin_js</type><name>js/hm/minicart.js</name><params/></action>
<action method="addCss"><stylesheet>css/hm/minicart.css</stylesheet></action>
</reference>
<reference name="header">
<reference name="top.links">
<remove name="checkout_cart_link"/>
<block type="minicart/view" name="minicart_toplink" template="minicart/toplink.phtml" >
<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/>
</block>
<action method="addLinkBlock"><blockName>minicart_toplink</blockName></action>
<block type="checkout/links" name="checkout_cart_link_minicart">
<action method="addCheckoutLink"></action>
</block>
</reference>
</reference>
</default>
</layout>
and this is the error:
I have also tried to clean all the cache that I could, but with no success...
The other problem (that I don't know to which one of the cache is related to) doesn't allow me to remove the poll sidebar block, in particular the module is disable through the admin panel and actually I can't see anything related to poll managment, but the block is still displayed in the frontend, so I had to remove all the polls from my database to avoid to show the block.
Siteground said that this problem is related to my theme, but I don't know where to put my hands, since it's default theme with some xml and css edits.

We are on Siteground as well with Magento 1.9.1
We do NOT use Varnish Dynamic cache since this creates many problems with our completely basic theme (few blocks changed). Same on previous Magento versions.
Tried tickets but it's due to our (standard) theme.... so no VDC for us either.
I suggest, just turn it to off.
Also, remember to log out of Magento and use a INCOGNITO browser (mode) to check your site, usually the header affected by VDC as well. Refresh the page even in the incognito browser to get a fresh one.

Related

Magento CE 1.7.0.2: some methods do not work only when the cache is enabled on footer.phtml

Magento Cache Enabled: methods like Mage::getBlockSingleton('page/html_header')->getIsHomePage(), among others, do not work only when the cache enabled on footer.phtml
No they wont as the phtml of the footer will cache as a block. You should either nest blocks within it in your page.xml which will not cache - such as cart_sidebar for example, or if you are targeting the home page only, then in admin go to the home page cms, go to layout updates and add the block there;
<reference name="footer">
<block type="your/block" name="yourblock" template="path/to/block.phtml" before="-" />
</reference>

Magento Varnish Turpentine By Pass a Block (dont cached a block)

I am testing magento with varnish and turpentine extesion. I installed all successfully but when i try to by pass (or flush per second) a block, it is hidden or disapear.
For Example i want to by pass product.info.media block.
My xml configuration for by pass in turpenine_esi.xml :
<catalog_product_view>
<reference name="product.info.media">
<action method="setEsiOptions">
<params>
<access>public</access>
<ttl>1</ttl>
</params>
</action>
</reference>
</catalog_product_view>
The block is:
<block type="catalog/product_view_media" name="product.info.media" as="media" template="catalog/product/view/media.phtml">
<block type="core/text_list" name="product.info.media.after" as="after" />
</block>
is possible to do this? I'm doing wrong?
thanks a lot.
Can you try next:
<catalog_product_view>
<reference name="product.info.media">
<action method="setEsiOptions">
<params>
<method>esi</method>
<access>public</access>
<scope>page</scope>
<ttl>1</ttl>
</params>
</action>
</reference>
</catalog_product_view>
Also check what your block inherit from Mage_Core_Block_Template class.
You're better off putting your ESI options in the local.xml for your theme, since turpentine_esi.xml may get overwritten when you update the extension.
Turn on debugging in Turpentine and see if anything interesting shows up in your system.log. Other caching extensions or having other caches enabled can cause errors like these. Also, check for exceptions being generated from your template, those can also cause issues like this.

How do I add the recently viewed products box to the homepage?

It is a totally easy problem, but Im not able to solve it.
I tried the following:
add layout xml to the update layout field in the backend for this cms page:
<reference name="right">
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>
or the same in the local.xml
<cms_index_index>
<reference name="right">
<block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
</reference>
</cms_index_index>
Thanks a lot, I know its not complicated, but I cant get it.
Here is some checks:
Check if your page is using two-column-right or three-column layout.
Clearing cache
Add your layout update to cms.xml directly and clearing cache.
Hope this help
You might have missed to echo the block in the custom home page template file?
echo $this->getChildHtml('right.reports.product.viewed');
Or may be your home page is using 2-template left or other templates where there is no 'right' content block.

Magento - changes to template file not showing up - /customer/form/register.phml

I'm making some changes to /customer/form/register.phml but they are not showing up in the frontend. Changes that I made to login.phtml and forgotpassword.phtml do show up.
I checked if magento was using a fallback from the base/default theme but it's not. I deleted register.phtml in both my theme and in the base/default theme to check what would happen: the page showed up just fine (without the changes of course).
I looks like magento gets the file from somewhere else (maybe the core). I've got no idea on how to solve this.
Thanks in advance for your help.
My Customer.xml file looks like this, I'm using magento 1.5.1
<customer_account_create translate="label">
<label>Customer Account Registration Form</label>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
</customer_account_create>
The best way to debug this - is to turn on template path hints.
You probably need to edit template/persistent/customer/form/register.phtml.
Yes i agree with WebFlake turn on template hints that will let you know which template file the form is being pulled from, most likely you are modifying the wrong template.
Here is a link which explains how to turn on template hints: http://vimeo.com/1067069
Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).
I used template hints and discovered a plugin replaced the file. Enabling template hints: http://vimeo.com/1067069 helped a lot

Magento custom theme template file not used 1.6

I have a custom magento template which im trying to tweak and just have a question regarding templates.
Currently the customer login uses the base .phtml file.
So I have created the customer/form/login.phtml file and placed it in my CUSTOM theme folder.
Then in my custom theme folder I went into layouts and and customer.xml. This is where in not sure what I need to do.
I found the following XML code:
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
</reference>
</customer_account_login>
Im not sure what I need to change with this to make it use my custom login form instead of using the base login form.
At first I thought the system would automatically check to see if the file exists in custom and just apply and if it doesnt exist fall back on base template but that didnt seen to work.
Any help would be appreciated. A noob explanation would also be great!
Thanks for reading
Magento seems to use a login file from:
template/persistent/checkout/onepage/login.phtml
In version 1.6 of Magento.
Edited that and the changes appeared as expected. Sorry but i also just found this post
In Magento 1.6, changes to login.phtml don’t reflect
Mine seems to be a dupe (sorry I didnt come across it when searching before) so feel free to close this one :)

Resources