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

Fix: Pages are not being scanned by Language Processing #164

Merged
merged 11 commits into from
Feb 26, 2020

Conversation

dinhtungdu
Copy link
Contributor

@dinhtungdu dinhtungdu commented Jan 16, 2020

Description of the Change

  • Add page to rest route check (is_rest_route).
  • Add a filter (classifai_rest_bases) to support custom post type with custom rest base.
  • Remove unused enqueue.
  • Remove deprecated (and removed) function (is_gutenberg_page).

Benefits

Pages now are scanned and tagged by Language Processing.

Verification Process

  1. Edit a page then hit the Update button.
  2. See the page updated normally without any error.
  3. Go back to the pages list, see the page processed by Waston.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Closes #161

@dinhtungdu dinhtungdu self-assigned this Jan 16, 2020
@jeffpaul jeffpaul added this to the 1.5.0 milestone Jan 16, 2020
@jeffpaul jeffpaul added the type:bug Something isn't working. label Jan 16, 2020
Co-Authored-By: Ryan Welcher <ryan.welcher@10up.com>
@ryanwelcher
Copy link
Contributor

@dinhtungdu great work on this! I'm thinking we should have some unit tests to cover pages - any objections?

@ryanwelcher
Copy link
Contributor

@dinhtungdu I'm not sure what we're testing here. I think we want to be sure that when a page is saved, it is being scanned.

@dinhtungdu
Copy link
Contributor Author

@ryanwelcher I added test for is_rest_route only because it gets updated in this PR and it's the cause of the issue.

The issue only happens for block editor only, so I think WPAcceptance tests will be better fit and more straight forward. We can wait for #179 to be merged then continue work on this?

@jeffpaul jeffpaul mentioned this pull request Feb 26, 2020
19 tasks
Copy link
Contributor

@ryanwelcher ryanwelcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinhtungdu that works for me - merge away!

@jeffpaul jeffpaul merged commit ae141a5 into develop Feb 26, 2020
@jeffpaul jeffpaul deleted the fix/pages-not-scanned-161 branch March 5, 2020 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pages are not being scanned by Language Processing
3 participants