jDownloadsownloads.com

Author Topic: Warning: Attempt to read property "id"null any Category page [fixed in 3.9.8]  (Read 518 times)

0 Members and 1 Guest are viewing this topic.

Offline mmerrell

  • Newbie
  • *
  • Posts: 6
Hello,

Fresh install on Joomla 3.9.27, Maria DB 10.4.17, PHP 8.0.2.  Each Category displays the following error:

Warning: Attempt to read property "id" on null in C:\xampp\apps\joomla\htdocs\components\com_jdownloads\views\category\view.html.php on line 326

Thought maybe it was something to do with the defaul Uncategorized menu, but I get the same error on a category that I made.  This error does not appear in the download links or in the overview, only at the Category view.

Install log reports no errors.
« Last Edit: 18.07.2021 17:04:22 by ColinM »

Offline ColinM

  • Moderator
  • *
  • Posts: 4.072
Hi
Have you created a ajD menu item "list All Categories"? Noticed you are running on XAMPP - I use this a lot for my test sites Normally this is a location such as C:\xampp\htdocs\jdx391\ where in this case jdx391 is the location of Joomla!You have C:\xampp\apps\joomla\htdocs\components\should it be something like C:\xampp\htdocs\apps\joomla\components\  ?
Colin

Offline mmerrell

  • Newbie
  • *
  • Posts: 6
Yup, followed the instructions to create the default category.  I even deleted the menu item and recreated it with the same result

This is the bit of code referenced:

while (($menu->query['option'] != 'com_jdownloads' || $menu->query['view'] == 'download' || $id != $category->id) && $category->id > 1){
            $path[] = array('title' => $category->title, 'link' => JdownloadsHelperRoute::getCategoryRoute($category->id, true));
            $category = $category->getParent();

Attached pictures of the setup and the error in action.


Offline ColinM

  • Moderator
  • *
  • Posts: 4.072
Hi
Still concerned about the localhost address C:\xampp\apps\joomla\htdocs\components\   :(
jD does require access to various Joomla! servicesIn jD Options 'Path Settings' tab what are the contents of option 'Upload directory path'  ?

Similarly in Joomla! Global Configuration -System tab what are the contents of 'Path to Log Folder' option?
Colin

Offline mmerrell

  • Newbie
  • *
  • Posts: 6
Upload director path = C://xampp//apps//joomla//htdocs//jdownloads
(I tried changing it to C:/xampp/apps/joomla/htdocs/jdownloads) - everything still works after the change.

Log folder is here:  C:/xampp/apps/joomla/logs
(I do see the jdownloads install log file and joomla log file)

I am able to upload / add files without issue.  They download perfectly as well.  So core functions are working, just have the error. 

That error ONLY appears under a Category page.  It never appears any other time (not on overall categories page, not on download pages).

Offline Arno

  • Administrator
  • ***
  • Posts: 12.379
    • jDownloads.com
Hi,
please try the (unzipped) attached file. Copy it to \components\com_jdownloads\views\category\
Try it then again and post here your result. Thanks.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline mmerrell

  • Newbie
  • *
  • Posts: 6
Thank you so very much! 

Replacing the file with the one you attached completely resolved the error.  All other functions appear to be working normally (I uploaded files, downloaded files, and created a category without issue)!

I appreciate your assistance so very much!

Merrell