1

I've spent all day trying to debug this.

system.log error stack:

[2016-11-16 16:37:18] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_2999a55d7d9f00b9a016b5e16762ce70a and handles default, customer_account_login: Please correct the XML data and try again.  [] []
[2016-11-16 16:37:19] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_20a98983867a1770682b48d9a0ad63441 and handles 1column: Please correct the XML data and try again.  [] []
[2016-11-16 16:37:19] main.CRITICAL: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-16 16:37:19] main.CRITICAL: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-16 16:37:19] main.CRITICAL: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2016-11-16 16:37:19] main.INFO: Cache file with merged layout: LAYOUT_frontend_STORE1_26f1b068ec7ccf4878f9284dd1137afd1 and handles catalog_product_prices: Please correct the XML data and try again.  [] []
[2016-11-16 16:37:20] main.CRITICAL: Invalid template file: 'google/‌​button.phtml' in module: 'Inchoo_SocialConnect' block's name: 'inchoo_socialconnect_login_google_button' [] []
[2016-11-16 16:37:20] main.CRITICAL: Invalid template file: 'facebook/‌​button.phtml' in module: 'Inchoo_SocialConnect' block's name: 'inchoo_socialconnect_login_facebook_button' [] []
[2016-11-16 16:37:20] main.CRITICAL: Invalid template file: 'twitter/‌​button.phtml' in module: 'Inchoo_SocialConnect' block's name: 'inchoo_socialconnect_login_twitter_button' [] []
[2016-11-16 16:37:20] main.CRITICAL: Invalid template file: 'pixelpin/‌​button.phtml' in module: 'Inchoo_SocialConnect' block's name: 'inchoo_socialconnect_login_pixelpin_button' [] []

snippet of customer_account_login.xml:

<body>
        <referenceContainer name="customer.login.container">
        <block class="Inchoo\SocialConnect\Block\Login" name="inchoo_socialconnect_login" template="Inchoo_SocialConnect::login.phtml">
            <block class="Inchoo\SocialConnect\Block\Google\Button" name="inchoo_socialconnect_login_google_button" template="Inchoo_SocialConnect::google/‌​button.phtml"/>
            <block class="Inchoo\SocialConnect\Block\Facebook\Button" name="inchoo_socialconnect_login_facebook_button" template="Inchoo_SocialConnect::facebook/‌​button.phtml"/>
            <block class="Inchoo\SocialConnect\Block\Twitter\Button" name="inchoo_socialconnect_login_twitter_button" template="Inchoo_SocialConnect::twitter/‌​button.phtml"/>
            <block class="Inchoo\SocialConnect\Block\Pixelpin\Button" name="inchoo_socialconnect_login_pixelpin_button" template="Inchoo_SocialConnect::pixelpin/‌​button.phtml"/>
        </block>
        </referenceContainer>
    </body>

pixelpin/button.phtml:

<div class="clearer">
    <div class="inchoo-socialconnect-pixelpin">
        <div class="inchoo-socialconnect-pixelpin-left">

        </div>
        <div class="inchoo-socialconnect-pixelpin-inner">
            <a href="<?php echo $this->escapeUrl($this->_getButtonUrl()); ?>"><?php echo $this->_getButtonText(); ?></a>
        </div>
        <div class="inchoo-socialconnect-pixelpin-right">

        </div>
    </div>
</div>

snippet of login.phtml where pixelpin/button.phtml gets called:

<?php if($this->_pixelpinEnabled()): ?>
            <div class="<?php echo $this->_getButtCol(); ?> inchoo-socialconnect-login-lower-pixelpin">
                <div class="buttons-set">
                    <?php echo $block->getBlockHtml('inchoo_socialconnect_login_pixelpin_button'); ?>
                </div>
            </div>

file structure:

enter image description here

if you need any more information just ask

1 Answer 1

1

For some reason. Magento 2 doesn't like button.phtml being in a custom folder (Inchoo_SocialConnect::google/‌​button.phtml), so i moved it to the root of the templates folder along side login.phtml (Inchoo_SocialConnect::login.phtml) so the template file path for button.phtml is now:

Inchoo_SocialConnect::button.phtml

I called it like this:

<?php echo $block->getBlockHtml('inchoo_socialconnect_login_button'); ?>

and my layout file is as follows:

<body>
        <referenceContainer name="customer.login.container">
        <block class="Inchoo\SocialConnect\Block\Login" name="inchoo_socialconnect_login" template="Inchoo_SocialConnect::login.phtml" cacheable="false"/>          
        <block class="Inchoo\SocialConnect\Block\Pixelpin\Button" name="inchoo_socialconnect_login_button" template="Inchoo_SocialConnect::button.phtml" cacheable="false"/>     
        </referenceContainer>
    </body>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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