News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Warning: Attempt to read property "id"null any Category page [fixed in 3.9.8]

Started by mmerrell, 14.06.2021 14:21:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mmerrell

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.
  •  

ColinM

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
Colin M
  •  

mmerrell

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.

  •  

ColinM

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
Colin M
  •  

mmerrell

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).
  •  

Arno

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!
  •  

mmerrell

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
  •