?
avatar PhilETaylor
PhilETaylor
24 Apr 2021

Steps to reproduce the issue

Install Joomla 4
Trash all your Content Categories (Including the default uncategorised)
Attempt to create a new article.

Expected result

Ability to create a new article or a warning that you need to create at least one category first.

Actual result

An error has occurred.
    0 Joomla\CMS\Toolbar\Toolbar::versions(): Argument #2 ($itemId) must be of type int, null given, called in /application/administrator/components/com_content/src/View/Article/HtmlView.php on line 209 

Screenshot 2021-04-24 at 20 21 09

System information (as much as possible)

Additional comments

avatar PhilETaylor PhilETaylor - open - 24 Apr 2021
avatar joomla-cms-bot joomla-cms-bot - change - 24 Apr 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Apr 2021
avatar dgrammatiko
dgrammatiko - comment - 24 Apr 2021

(Including the default uncategorised)

The form shouldn't even load if there are no categories. The existence of at least one category is dictated by the architecture and honestly, I m quite impressed that you're the first one finding this bug after 15 years...

fwiw I would throw an error if the categories count is 0 for the given component. My 2c

avatar PhilETaylor
PhilETaylor - comment - 24 Apr 2021

I only deleted all of my categories to get a blank state for testing of the new blank slate feature ?‍♂️

I am probably the first person ever to delete all of their categories, including the default category that is added when you install Joomla

avatar ReLater
ReLater - comment - 24 Apr 2021

That's a bug only in Joomla 4.

When there's no category in Joomla 3 a category "Uncategorised" is created automatically when you create the first article.

avatar brianteeman
brianteeman - comment - 24 Apr 2021

What is happening in J3 is that the category is being created on the fly

avatar PhilETaylor PhilETaylor - change - 29 Apr 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-04-29 18:53:08
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 29 Apr 2021
avatar PhilETaylor
PhilETaylor - comment - 29 Apr 2021

[4] Only show versions toolbar button if the article has been saved at least once #33412

Add a Comment

Login with GitHub to post a comment