Helpdesk Pro - Articles Missing Category ID in Knowledge Base View

  • AdinaG
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
1 month 1 week ago #171135 by AdinaG
Hello,
I am experiencing an issue with the Knowledge Base Categories view in Helpdesk Pro.

I attempted to see if ChatGPT and I could narrow this down, but was unable to pinpoint the issue, so Im here hoping you guys can address this.

Im receiving the following server error. It appears to be giving ONE error for EVERY article that is displayed on the page. So if there are 15 articles, then it will throw 15 errors.

[STDERR] PHP Warning:  Undefined property: stdClass::$category_id in /home/xxxxx/public_html/xxxxx/components/com_helpdeskpro/View/Categories/tmpl/default.php on line 57\nIssue Details:
  • The articles display correctly under their assigned categories, but the 
    Code:
    category_id
     is missing from the retrieved article data.
  • We checked the database, and every article has a valid 
    Code:
    category_id
     in 
    Code:
    #__helpdeskpro_articles
    .
  • The query used to fetch articles appears to join 
    Code:
    #__helpdeskpro_categories
     correctly, but 
    Code:
    category_id
     is not being assigned to the article object.
  • This results in articles being displayed under "No Category" on the frontend.
Troubleshooting Steps Taken:
  • Verified that all articles have an assigned 
    Code:
    category_id
     in the database.
  • Printed debug output of the 
    Code:
    $article
     object in 
    Code:
    default.php
     → 
    Code:
    category_id
     is missing.
  • Reviewed 
    Code:
    Model/Articles.php
     to confirm the SQL query retrieves 
    Code:
    category_id
    .
  • Tried modifying the query in 
    Code:
    Articles.php
     to explicitly select 
    Code:
    tbl.category_id
    , but no change.
  • Checked 
    Code:
    Model/Categories.php
     for how 
    Code:
    $item->articles
     is assigned → appears to be missing 
    Code:
    category_id
    .
Expected Behavior:Each article should retain and display its category ID so it appears under the correct category in the frontend when we do the debug, but it doesn't.Request:Please review how articles are fetched and assigned in the Knowledge Base view and advise on a fix.Site Details:
  • Joomla Version: 5.2.3
  • Helpdesk Pro Version: 6.0.3
  • PHP Version: 8.3
Thank you!Adina

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #171141 by Tuan Pham Ngoc
Hi Adina

For this, we will have to check it directly on your site. Please submit a support ticket sending us super user account of your site and link to the page which I can see the error

I will check to see why the error happens and get it sorted

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc