Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moderation > Getting a fatal error on the edit screen of users comments on posts #699

Closed
1 task done
QAharshalkadu opened this issue Feb 8, 2024 · 2 comments · Fixed by #709
Closed
1 task done
Assignees
Milestone

Comments

@QAharshalkadu
Copy link

Describe the bug

Moderation > Getting a fatal error on the edit screen of users comments on posts

Steps to Reproduce

  1. Enabled Moderation feature of ClassifAI plugin
  2. Add/edit the post > Enable post comments
  3. Add few comment on post > click on edit button from comment
  4. On edit comment page getting fatal error.

Screenshots, screen recording, code snippet

SS:
image

image

Environment information

Local

WordPress information

Wordpress 6.4.3

Code of Conduct

  • I agree to follow this project's Code of Conduct
@qasumitbagthariya
Copy link

qasumitbagthariya commented Feb 8, 2024

@QAharshalkadu I can reproduce the same issue while editing the screen of the user's comments.

image

[08-Feb-2024 12:51:00 UTC] PHP Fatal error:  Uncaught TypeError: Classifai\Providers\Watson\NLU::add_classifai_meta_box(): Argument #2 ($post) must be of type WP_Post, WP_Comment given, called in /Users/sumitbagthariya/Local Sites/osp/app/public/wp-includes/class-wp-hook.php on line 324 and defined in /Users/sumitbagthariya/Local Sites/osp/app/public/wp-content/plugins/classifai-1/includes/Classifai/Providers/Watson/NLU.php:657
Stack trace:
#0 /Users/sumitbagthariya/Local Sites/osp/app/public/wp-includes/class-wp-hook.php(324): Classifai\Providers\Watson\NLU->add_classifai_meta_box('comment', Object(WP_Comment))
#1 /Users/sumitbagthariya/Local Sites/osp/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#2 /Users/sumitbagthariya/Local Sites/osp/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#3 /Users/sumitbagthariya/Local Sites/osp/app/public/wp-admin/edit-form-comment.php(257): do_action('add_meta_boxes', 'comment', Object(WP_Comment))
#4 /Users/sumitbagthariya/Local Sites/osp/app/public/wp-admin/comment.php(92): require('/Users/sumitbag...')
#5 {main}
  thrown in /Users/sumitbagthariya/Local Sites/osp/app/public/wp-content/plugins/classifai-1/includes/Classifai/Providers/Watson/NLU.php on line 657

@jeffpaul jeffpaul added this to the 3.0.0 milestone Feb 8, 2024
@jeffpaul jeffpaul moved this from Incoming to To Do in Open Source Practice Feb 8, 2024
@dkotter dkotter self-assigned this Feb 8, 2024
@dkotter
Copy link
Collaborator

dkotter commented Feb 8, 2024

I'm currently working on a PR to address #671 which will also fix this issue (as this issue is related to the Classification Feature and not the Moderation Feature).

@dkotter dkotter linked a pull request Feb 9, 2024 that will close this issue
4 tasks
@jeffpaul jeffpaul moved this from To Do to In Review in Open Source Practice Feb 9, 2024
@github-project-automation github-project-automation bot moved this from In Review to Merged in Open Source Practice Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants