codefog/contao-news_categories

Update to contao 4.6 - no news are shown (FE) and Error in BE

Closed this issue · 4 comments

Hi Kamil,
i updated a website from 4.4 to 4.6 yesterday.

After finishing the update i did not get any page rendered wherein a newslist module is placed.

Got a hint by Spooky to update to version 3.0.11 - it was 2.8.10 within the regular manager update i can't now not access to news in backend.

Error:
The service "codefog_news_categories.listener.data_container.feed" was not found or is not public. See https://symfony.com/doc/current/service_container.html#public-versus-private-services

As Spooky mentioned here ( https://community.contao.org/de/showthread.php?71708-Nach-Update-auf-4-6-keine-Frontendausgabe-bei-News-mit-news_categories&p=480359&viewfull=1#post480359 ) the service need to be set to public when using Symfony 4.

Addition - Stack Trace:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
The service "codefog_news_categories.listener.news" was not found or is not public. See https://symfony.com/doc/current/service_container.html#public-versus-private-services

  at vendor/contao/core-bundle/src/Resources/contao/library/Contao/System.php:219
  at Contao\System::importStatic('codefog_news_categories.listener.news')
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:166)
  at Contao\ModuleNewsList->countItems(array('2'), null)
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:96)
  at Contao\ModuleNewsList->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
  at Contao\Module->generate()
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:61)
  at Contao\ModuleNewsList->generate()
     (vendor/codefog/contao-news_categories/src/FrontendModule/NewsListModule.php:42)
  at Codefog\NewsCategoriesBundle\FrontendModule\NewsListModule->generate()
     (vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:78)
  at Contao\ContentModule->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:483)
  at Contao\Controller::getContentElement(object(ContentModel), 'main')
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:193)
  at Contao\ModuleArticle->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
  at Contao\Module->generate()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:75)
  at Contao\ModuleArticle->generate(false)
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:423)
  at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:282)
  at Contao\Controller::getFrontendModule('0', 'main')
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:175)
  at Contao\PageRegular->prepare(object(PageModel))
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:48)
  at Contao\PageRegular->getResponse(object(PageModel), true)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:345)
  at Contao\FrontendIndex->renderPage(object(Collection))
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:78)
  at Contao\FrontendIndex->run()
     (vendor/contao/core-bundle/src/Controller/FrontendController.php:39)
  at Contao\CoreBundle\Controller\FrontendController->indexAction()
     (vendor/symfony/http-kernel/HttpKernel.php:149)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:66)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:188)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:79)

Can you confirm this too?
Thanx a lot
Thomas

Another way to fix it would be to explicitly require

"symfony/dependency-injection": "^3.0"

i can confirm this too.
The service "codefog_news_categories.listener.data_container.feed" was not found or is not public. See https://symfony.com/doc/current/service_container.html#public-versus-private-services
contao 4.6
contao-news_categories 3.0.11

Fixed in 389f320. Please update to 3.0.12 which has been released just now.

Thanx for fixing Kamil. Runs now after update!!