No Error
Warning: Attempt to read property "id" on null in components/com_content/views/category/view.html.php on line 270
3.9.23 with php8-rc5
Maybe only a php8 issue
Labels |
Added:
?
|
Labels |
Added:
?
|
I get this. PHP 8.0.2-dev. Joomla 4 beta 6
My set up was for #31925 and then I just clicked the Category that was linked to http://127.0.0.1/index.php?view=category&id=2
@PhilETaylor where can find Joomla 4 repo.
I have cloned Joomla 3.x repo, but I want to work on some known issues related to Joomla 4.x
After cloning you need to check out the 4.0 branch
Thanks sir
i want to contribute and try to resolve this issue please assign this task to me
unable to replicate this with php 8 in 3.9.26-dev
@PhilETaylor Could you please check to see if you still get this error with latest Joomla 4.0-dev? I could not re-procedure this issue anymore
I cannot replicate this, in todays (8f9fac6) Joomla staging
branch, based on the "Steps to reproduce the issue" provided by @HLeithner in opening this issue last year.
However, This same problem was reported by me in Joomla 4 (#31925) and was replicated by others and ultimately fixed (#32027) in Joomla 4 in January 2021
The fix used there was to cast to (int)
As its complaining that $category
is null, and as $category
is derived from $category = $this->category->getParent();
we have to assume that the Uncategorised category parent is not ROOT like it should be in a normal set up.
I have exhaustively tested this, making wild assumptions, deleting the root category etc, and I have been unable to replicate it in Joomla staging
today.
As this report was made on 24th November 2020 I have reverted to the commit 435d780 which was on that day, which was also the "Prepare Joomla! 3.9.23 release" commit to test as well.
Using that commit, and my current custom PHP 8.0.3 version, with full error reporting set to development in Joomla and maximum in PHP.ini I am unable to replicate this issue at all.
@PhilETaylor Actually, after looking carefully at the code, I can re-procedure the issue myself. The error happens when there is no menu item created to one of the options:
And category is accessed via Articles - Categories module. The actual error causes by some changes in php 8:
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-03-21 06:59:27 |
Closed_By | ⇒ | alikon | |
Labels |
Added:
?
Removed: ? |
Trying to reproduce this in php 8 , J3.9.23, but I don't get a notice.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/31473.