0

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Mirasvit\SeoMarkup\Block\Rs\Product Exception #1 (ReflectionException): Class abc\MirasvitExtended\Block\Rs\Product\Interceptor does not exist

2 Answers 2

0

php bin/magento setup:di:compile should help. Otherwise you probably have some typo in namespaces or block names.

0

Please Follow This namespace

layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="footer">
            <block class="[Namespace]\[Module]\Block\Timeline" name="twitterfeed-timeline" template="footer/timeline.phtml"></block>
        </referenceBlock>
    </body>
</page>

and my block class in vendor/[namespace]/[module]/Block/Timeline.php

namespace [Namespace]\[Module]\Block;

use Magento\Framework\View\Element\Template;

class Timeline extends Template
{

    /**
     * Timeline constructor.
     * @param Template\Context $context
     * @param array $data
     */
    public function __construct(
        Template\Context $context,
        array $data = []
    ) {
        parent::__construct($context, $data);
    }

    /**
     * @return mixed
     */
    public function getTweets()
    {
        // ---
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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