?
avatar vintzl
vintzl
3 Aug 2020

Steps to reproduce the issue

Everything was also done from a clean install (files and db).

  1. Configure Xdebug to run with an IDE, here vscode. Start a debugging session.
    There, if you refresh the empty HOME page (from the frontend), nothing wrong happens.
  2. Create an article, with whatever content you want, and set it to default.
  3. Refresh the HOME page (from the frontend), and you get an unexpected Joomla\CMS\Categories\SectionNotFoundException exception.

Expected result

No exception, especially with the HOME page.

Actual result

For all pages in the frontend, I get this Joomla\CMS\Categories\SectionNotFoundException exception, even if this is not a "category page"…

The stack hit the following function before the exception in CategoryServiceTrait.php

	public function getCategory(array $options = [], $section = ''): CategoryInterface
	{
		return $this->categoryFactory->createCategory($options, $section);
	}

then the exception occurs in CategoryFactory.php :

	public function createCategory(array $options = [], string $section = ''): CategoryInterface
	{
		$className = trim($this->namespace, '\\') . '\\Site\\Service\\' . ucfirst($section) . 'Category';

		if (!class_exists($className))
		{
			throw new SectionNotFoundException;
		}

		return new $className($options);
	}

$className holds the following value:

  • "Joomla\Component\Content\Site\Service\ArticleCategory"

System information (as much as possible)

Joomla 4 beta 3 from here :

Additional comments

Tested with a clean install AND upgrade from beta3-dev.

avatar vintzl vintzl - open - 3 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 3 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Aug 2020
avatar astridx
astridx - comment - 3 Aug 2020

I use Xdebug with netbeans with the current 4.0-dev branch. I had no problems debugging today.
I work on ubuntu.

avatar richard67
richard67 - comment - 3 Aug 2020

@SharkyKZ Could you have a look on this? Is there maybe something wrong with the class name or the section parameter used to build the class name?

avatar alikon
alikon - comment - 3 Aug 2020

@vintzl where did you set a breakpoint ?
or did you see the exception report on error_log ?

avatar SharkyKZ
SharkyKZ - comment - 3 Aug 2020

This is expected. See #26157.

avatar richard67
richard67 - comment - 3 Aug 2020

Can it be fixed? Pinging @wilsonge since he commented in #26157

avatar vintzl vintzl - change - 4 Aug 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-08-04 07:13:37
Closed_By vintzl
avatar vintzl vintzl - close - 4 Aug 2020
avatar vintzl
vintzl - comment - 4 Aug 2020

Ok, so I can close this issue.

Add a Comment

Login with GitHub to post a comment