Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect event type #461

Merged
merged 4 commits into from
Aug 26, 2019
Merged

Fix incorrect event type #461

merged 4 commits into from
Aug 26, 2019

Conversation

mckenzieclark
Copy link
Contributor

Error happening when additional sitemap URLs added in plugin. Looks like this has been happening since this commit:

4ecdc2a#diff-00283e6e3abca12c7a43592c4bb634d8

Error:

TypeError: Argument 1 passed to dynam\tulloch\Tulloch::dynam\tulloch{closure}() must be an instance of nystudio107\seomatic\events\RegisterSitemapUrlsEvent, instance of nystudio107\seomatic\events\RegisterSitemapsEvent given in /home/vagrant/code/tulloch-homes.com/plugins/tulloch/src/Tulloch.php:128
Stack trace:
#0 [internal function]: dynam\tulloch\Tulloch->dynam\tulloch{closure}(Object(nystudio107\seomatic\events\RegisterSitemapsEvent))
#1 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/base/Event.php(312): call_user_func(Object(Closure), Object(nystudio107\seomatic\events\RegisterSitemapsEvent))
#2 /home/vagrant/code/tulloch-homes.com/vendor/nystudio107/craft-seomatic/src/models/SitemapIndexTemplate.php(223): yii\base\Event::trigger('nystudio107\seo...', 'registerSitemap...', Object(nystudio107\seomatic\events\RegisterSitemapsEvent))
#3 /home/vagrant/code/tulloch-homes.com/vendor/nystudio107/craft-seomatic/src/models/SitemapIndexTemplate.php(178): nystudio107\seomatic\models\SitemapIndexTemplate->addAdditionalSitemaps(Object(nystudio107\seomatic\models\MetaBundle), 1, Array)
#4 [internal function]: nystudio107\seomatic\models\SitemapIndexTemplate->nystudio107\seomatic\models{closure}(Object(yii\caching\FileCache))
#5 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/caching/Cache.php(597): call_user_func(Object(Closure), Object(yii\caching\FileCache))
#6 /home/vagrant/code/tulloch-homes.com/vendor/nystudio107/craft-seomatic/src/models/SitemapIndexTemplate.php(140): yii\caching\Cache->getOrSet('seomatic_sitema...', Object(Closure), 30, Object(yii\caching\TagDependency))
#7 /home/vagrant/code/tulloch-homes.com/vendor/nystudio107/craft-seomatic/src/services/Sitemaps.php(166): nystudio107\seomatic\models\SitemapIndexTemplate->render(Array)
#8 /home/vagrant/code/tulloch-homes.com/vendor/nystudio107/craft-seomatic/src/controllers/SitemapController.php(55): nystudio107\seomatic\services\Sitemaps->renderTemplate('SeomaticSitemap...', Array)
#9 [internal function]: nystudio107\seomatic\controllers\SitemapController->actionSitemapIndex(1, NULL)
#10 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /home/vagrant/code/tulloch-homes.com/vendor/craftcms/cms/src/web/Controller.php(110): yii\base\Controller->runAction('sitemap-index', Array)
#13 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('sitemap-index', Array)
#14 /home/vagrant/code/tulloch-homes.com/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('seomatic/sitema...', Array)
#15 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('seomatic/sitema...', Array)
#16 /home/vagrant/code/tulloch-homes.com/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#17 /home/vagrant/code/tulloch-homes.com/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#18 /home/vagrant/code/tulloch-homes.com/web/index.php(21): yii\base\Application->run()
#19 {main}

@khalwat khalwat changed the base branch from v3 to develop August 22, 2019 13:18
@khalwat khalwat merged commit 51761bb into nystudio107:develop Aug 26, 2019
@khalwat
Copy link
Collaborator

khalwat commented Aug 26, 2019

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants