GordonLesti / Lesti_Fpc

Simple Magento Fullpagecache
https://gordonlesti.com/lesti-fpc-documentationversion-1-4-5/
Other
358 stars 159 forks source link

customer_logged_in handle ignored? #335

Closed aurmil closed 5 years ago

aurmil commented 5 years ago

hello,

in a layout file, I have:

<?xml version="1.0"?>
<layout>
    <customer_logged_in>
        <reference name="after_body_start">
            <block type="mytype" name="myblock" as="myblock" template="mytemplate.phtml" />
        </reference>
    </customer_logged_in>
</layout>

I added myblock to the lazy blocks list and customer_account_login is present in refresh actions list but layout structure of pages is not refreshed after customer login so I visit a page, it is put in cache without my block, I log in then come back to the same page, the block is still missing

same thing if block is listed in dynamic blocks

If I clear the cache then reload the page, the block is present If I change the handle in XML layout file from customer_logged_in to default, everything works as expected

am I missing something? I'm using Magento 1.9.3.10 and Lesti FPC 1.4.8

thanks

pixiemediaweb commented 5 years ago

Hi, you should enable 'Customer Group Caching' in the lesti FPC config (system > configuration, advanced > system)

aurmil commented 5 years ago

you are right, it works but I do not understand how this option (according to it's label) is officially supposed to fix my case

pixiemediaweb commented 5 years ago

glad it helped - it's because a guest and logged in users are 2 different customer groups. Most sites present the same information to either - apart from the odd 'logout' link here or there.

aurmil commented 5 years ago

yes, I understand the fact that guest and logged in users are associated with different user groups so this option works here. I am just surprised to need this option in my case, I would expect it to be needed for logged in users, belonging to different groups, not for guest / logged in users. but anyway, fine with that thank you for your help