magefan / module-blog

Magento 2 Blog Extension is a solution that helps you to create a blog on Magento and manage posts,categories, tags, authors, and comments.
https://magefan.com/magento2-blog-extension
Other
265 stars 136 forks source link

posts are not added to the sitemap #6

Closed Wojton closed 8 years ago

Wojton commented 8 years ago

in Magento\Sitemap\Model\Sitemap\SitemapPlagin.php $subject->addSitemapItems($sitemapItem); Method 'addSitemapItems' does not exist and posts are not added to the sitemap in Magento 2 Blog Extension by Magefan.

magefan commented 8 years ago

Hello Piotr, this issue is fixed. Please update you local code.

Wojton commented 8 years ago

Hi, Map does not show up correctly. Invalid path for posts. It is only the main domain. Example:

http://domain.dev/weekly0.25 http://domain.dev/weekly0.25

fix

magefan commented 8 years ago

Piotr, we cannot replicate the issue on our end. Could you please send to us your ftp and admin panel credentials, so we can check and fix that. Email: support@magefan.com Contact form: http://magefan.com/#contact

If you are working on localhost, we can solve this problem using teamviewer.

Wojton commented 8 years ago

The _sitemapItems[] category should be added parameter $this->getStoreId() Sitemap is generated correctly.

(...)
     $this->_sitemapItems[] = new \Magento\Framework\DataObject(
            [
                'changefreq' => 'weekly',
                'priority' => '0.25',
                'collection' =>  \Magento\Framework\App\ObjectManager::getInstance()->create(
                        'Magefan\Blog\Model\Category'
                      )->getCollection($this->getStoreId())
                    ->addStoreFilter($this->getStoreId())
                    ->addActiveFilter(),
            ]
        );
(...)
magefan commented 8 years ago

Thank you Piotr. $this->getStoreId() has been added. Can this issue be closed?