×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Error when showing ccoment in custom component

Error when showing ccoment in custom component 9 years 5 months ago #31432

  • Jamez
  • Jamez's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hi, I have create custom component for my website and I really like to integrate it with ccomment
Until now I can show ccomment in my custom component but with a lot of error message

Notice: Undefined property: CcommentComponentSongPlugin::$row in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 22
Notice: Trying to get property of non-object in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 45
Notice: Undefined property: CcommentComponentSongPlugin::$row in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 70
Notice: Trying to get property of non-object in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 70
Notice: Undefined property: CcommentComponentSongPlugin::$row in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 117
Notice: Trying to get property of non-object in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 117
Notice: Undefined property: CcommentComponentSongPlugin::$row in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 117
Notice: Trying to get property of non-object in C:\xampp\htdocs\Project\administrator\components\com_comment\plugins\com_song\song.php on line 117


And when I try to add new comment in my database show that contentId is zero
So how to fix that $row ? when I try to var_dump it in com_content it show all my database row but I can't find any file that call that data

Thanks in advance.

Error when showing ccoment in custom component 9 years 5 months ago #31452

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Online
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
How are you initialising the comment system? We expect to have a $row object from your component that you pass to ccomment. The row object should cary information such as id, catid and any params that might be necessary.

Since the contentid in the db is 0, it seems that you haven't passed the correct object to ccomment.
Regards,
Daniel
  • Page:
  • 1
Time to create page: 0.097 seconds