0

I installed Magento 2.3 on my local system, but ongoing to the listing page it's showing blank. I have checked the error log, exception log, system log, debug log but nothing are there. I tried this also Magento2 website showing all blank pages but doesn't helped me. I'm attaching a snapshot of my listing page(Gear) here for your reference.

enter image description here.

Edit: After enabling developer mode it's giving me error like

enter image description here

I have overriden my catalog_category_view.xml. here is my Magento_Catalog/layout/catalog_category_view.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <body>
        <referenceContainer name="content">
            <!--DO NOT MODIFY :: Frontend event tracker code START-->
            <block class="Magento\Framework\View\Element\Template" name="shoptimize.category.tracker" template="Magento_Catalog::tracker/category-tracker.phtml">
            </block>
            <!--DO NOT MODIFY :: Frontend event tracker code START-->
        </referenceContainer>
    </body>
</page>
  • did you run indexer? – sudo55 Nov 15 '19 at 5:02
  • Yes I have tried that but nothing helped @sudo55 – AjayKr Nov 15 '19 at 5:14
  • Check the product stock status and Qty as well. If the product out of stock, then it will not show on front-end. – D Singh Nov 15 '19 at 5:45
  • I have almost 3500 products in my Gear category with in-stock status with qty more than 50 for every product. @DSingh – AjayKr Nov 15 '19 at 5:53
  • Please share the url – Shyam Krishna Sreekumar Nov 15 '19 at 5:57
0

I got solution of my own problem, actually there was a problem in product data, product data coming was invalid due to that it was not rendering phtml file of listing page. So I just added try catch block in foreach at Magento_Catalog/templates/product/list.phtml and it's now working fine. Here is the code after changes I have made

<?php foreach ($_productCollection as $_product): ?>
            <?php try { ?>
            <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '<li class="item product product-item">' : '</li><li class="item product product-item">' ?>
            <div class="product-item-info" data-container="product-grid">
                <?php
                $productImage = $block->getImage($_product, $image);
                if ($pos != null) {
                    $position = ' style="left:' . $productImage->getWidth() . 'px;'
                        . 'top:' . $productImage->getHeight() . 'px;"';
                }
                ?>
                <!--DO NOT MODIFY. TRACKER DIV WRAPPER START-->
                <div data-is-trackable="true" data-tracking-context="<?php echo $tracker_constants::PRODUCT_CLICK; ?>" data-event-properties=
                '{"product_id": <?php echo $_product->getId() ?>,
                    "sku": "<?php echo $_product->getSku() ?>",
                    "product_price": <?php echo $_product->getFinalPrice() ?>,
                    "source": "Catalog Page"
                     }'>
                    <!--DO NOT MODIFY. TRACKER DIV WRAPPER TILL HERE-->
                    <?php // Product Image ?>
                    <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">
                        <?php echo $productImage->toHtml(); ?>
                    </a>
                </div>
        ...
        ...
        ...
        ...
         <?php }
            catch (\Exception $err) {
                //echo $err->getMessage();
            }
        ?>
        <?php endforeach; ?>
|improve this answer|||||

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.