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

Better logic and customizability for enabling Text Links indexing on per-post-type basis #8323

Open
2 tasks done
boonebgorges opened this issue Nov 22, 2017 · 3 comments
Open
2 tasks done

Comments

@boonebgorges
Copy link

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

A plugin is causing large numbers of post items to be generated as part of a batch process. In my specific case, it's wp-rss-multi-importer, though what's described here could happen in similar cases. The plugin defines its post type as public, and as such, the Text Links module processes the item

return ( $post_type_object !== null && $post_type_object->public === true );
. This generates a large amount of database I/O - about 7 extra databse queries for each item. During batch processing, where a substantial number of items may be created as part of one request, this can cause performance issues.

In this specific case, the post type (though registered as public) is never actually viewed from the front end. So there's no benefit to having Text Links run on its content.

Please describe what you expected to happen and why.

The public argument for post types is possibly too broad a check. A post type registered with public = true is not necessarily visible on the front end; publicly_queryable = false or exclude_from_search = true, for example, override public. wordpress-seo could probably improve the default logic here.

Moreover, it would be nice to allow for the possibility that a plugin will register a post type with arguments values that don't properly match the actual use of the post type. In these cases, developers/site owners should be able to manually disable indexing of these items. For this purpose, a post type blacklist, or a general filter on is_processable, would be helpful.

How can we reproduce this behavior?

  1. Install wp-rss-multi-importer and subscribe to some feeds (note - wp-rss-multi-importer has been removed from the repo for unrelated reasons, but can be pulled from the GitHub mirror https://github.com/wp-plugins/wp-rss-multi-importer)
  2. Set up a tool to log Text Links indexing
  3. Trigger an import batch

You probably don't really need to reproduce this specific plugin to see what I'm asking for :-D

Technical info

  • WordPress version: 4.9
  • Yoast SEO version: 5.8

Thanks for considering - and please feel free to close or suggest alternative methods if this is not an appropriate enhancement request.

@benvaassen
Copy link
Contributor

Thank you for opening a feature request.
We've labeled this issue needs decision which means our product managers will assess your request.

@jdevalk
Copy link
Contributor

jdevalk commented Jan 17, 2018

Thanks for the detailed comments @boonebgorges! @moorscode can you look at his feedback above re our logic? I think he's right, especially the exclude_from_search seems a logical extra check.

@moorscode
Copy link
Contributor

We have added additional filters to facilitate a more granular control on which post-types are placed in specific feature lists.

The task at hand here is to add additional filters on our end to strip out the specific arguments on the post types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants