Hello,
After installing Yoast SEO module 8.x-2.0-alpha6 version, adding the field on a taxonomy term and start testing, i have the following error :
Error: Call to undefined method Drupal\taxonomy\Entity\Term::getTitle() in Drupal\yoast_seo\EntityAnalyser->replaceContextAwareTokens() (line 161 of /var/www/html/docroot/modules/contrib/yoast_seo/src/EntityAnalyser.php)
#0 /var/www/html/docroot/modules/contrib/yoast_seo/src/EntityAnalyser.php(96): Drupal\yoast_seo\EntityAnalyser->replaceContextAwareTokens()
#1 /var/www/html/docroot/modules/contrib/yoast_seo/src/Form/AnalysisFormHandler.php(77): Drupal\yoast_seo\EntityAnalyser->createEntityPreview()
#2 [internal function]: Drupal\yoast_seo\Form\AnalysisFormHandler->analysisSubmitAjax()
#3 /var/www/html/docroot/core/lib/Drupal/Core/Form/FormAjaxResponseBuilder.php(69): call_user_func_array()
#4 /var/www/html/docroot/core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php(109): Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse()
#5 [internal function]: Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException()
#6 /var/www/html/docroot/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#7 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(227): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#8 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(79): Symfony\Component\HttpKernel\HttpKernel->handleException()
#9 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#10 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#11 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#12 /var/www/html/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#13 /var/www/html/docroot/modules/contrib/shield/src/ShieldMiddleware.php(91): Drupal\page_cache\StackMiddleware\PageCache->handle()
#14 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\shield\ShieldMiddleware->handle()
#15 /var/www/html/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#16 /var/www/html/docroot/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#17 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle()
#18 /var/www/html/docroot/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle()
#19 /var/www/html/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
Did i messed some configurations
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3204291-5.patch | 1.08 KB | batigolix |
| #4 | 3204291-4.patch | 1.04 KB | strykaizer |
Comments
Comment #2
medwassim commentedComment #3
marckwee commentedHi medwassim,
I ran into the same issue and created a small patch.
Hope this helps you out =)!
Comment #4
strykaizerSame issue when using yoast on user entities.
Added extra check.
Comment #5
batigolixI had to change the patch to make it apply to the latest 2.0 alpha version
Comment #6
bramdriesenThis solved the issue for me on taxonomy term edit pages!
Comment #7
bramdriesenComment #10
kingdutchThis has been fixed on 8.x-2.x-dev
I opted for using
labelinstead of using themethod_existscheck. For Terms and Node's thelabelcall is equivalent to using their respective get* method. Additionally thelabelmethod is available on theEntityInterfaceso we can be sure it's always available.I've added a Behat test to make sure the RTSEO module works on Terms, similar to what was already present for Nodes (that test also properly demonstrated the bug).
GitLab CI support for Behat is still a work in progress.