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

Compatibility with Yoast SEO when Form Single Views are disabled #1690

Closed
mehul0810 opened this Issue May 16, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@mehul0810
Contributor

mehul0810 commented May 16, 2017

Issue Overview

When Form Single Views are disabled from Settings > Display Options > Post Types, then still we can see URLs of those form single views under XML Sitemap of Yoast SEO. Also, tried refreshing permalinks.

Expected Behavior

If Form Single Views are disabled, then XML Sitemap of Yoast SEO should not show those pages.

Current Behavior

If Form Single Views are disabled, then XML Sitemap of Yoast SEO is showing all the form single view URLs which is redirecting to homepage with a non-homepage URL.

Possible Solution

Removing those URLs from XML Sitemap or 301 redirection to homepage. We need to investigate the best way around.

Steps to Reproduce (for bugs)

  1. Install Yoast SEO plugin
  2. Disable Form Single View under Settings > Display Options > Post Types
  3. Make Sure you have Donation Forms created
  4. Generate XML Sitemap and visit give_forms-sitemap.xml, you will see a list of URLs of the donation forms

Todos

  • Tests
  • Documentation
@mathetos

This comment has been minimized.

Show comment
Hide comment
@mathetos

mathetos May 16, 2017

Member

Good issue @mehul0810 Thanks!

Member

mathetos commented May 16, 2017

Good issue @mehul0810 Thanks!

@DevinWalker DevinWalker added this to the 1.8.9 milestone May 16, 2017

@mehul0810

This comment has been minimized.

Show comment
Hide comment
@mehul0810

mehul0810 May 29, 2017

Contributor

@DevinWalker @mathetos I have investigated in detail for this issue and discussed the same with @ravinderk based on which I have found few ways with which we can resolve it. However, trying it with accessing the module which is generating the sitemap directly doesn't worked.

Here are the few ways worked:

  1. Converting give_forms CPT to private using public:false when Form Single Views are disabled, then sitemap for give_forms won't get generated.
  2. Using a filter wpseo_sitemap_exclude_post_type, to skip give_forms CPT to while generating a sitemap.

Also, I have made sure that [give_forms] shortcode is working when public is set to false and it is perfectly working including complete donation process.

Some References:
https://wordpress.org/support/topic/automatically-remove-private-pages-from-xml-sitemaps/
https://kb.yoast.com/kb/sitemap-does-not-update/

Looking for you views and suggestions as well.

Contributor

mehul0810 commented May 29, 2017

@DevinWalker @mathetos I have investigated in detail for this issue and discussed the same with @ravinderk based on which I have found few ways with which we can resolve it. However, trying it with accessing the module which is generating the sitemap directly doesn't worked.

Here are the few ways worked:

  1. Converting give_forms CPT to private using public:false when Form Single Views are disabled, then sitemap for give_forms won't get generated.
  2. Using a filter wpseo_sitemap_exclude_post_type, to skip give_forms CPT to while generating a sitemap.

Also, I have made sure that [give_forms] shortcode is working when public is set to false and it is perfectly working including complete donation process.

Some References:
https://wordpress.org/support/topic/automatically-remove-private-pages-from-xml-sitemaps/
https://kb.yoast.com/kb/sitemap-does-not-update/

Looking for you views and suggestions as well.

@mathetos

This comment has been minimized.

Show comment
Hide comment
@mathetos

mathetos May 30, 2017

Member

Personally I'd prefer option (1) since it's the WP core way to resolve that and there may be other plugins that this issue may effect and the (2) option wouldn't resolve it for those plugins, only Yoast.

Member

mathetos commented May 30, 2017

Personally I'd prefer option (1) since it's the WP core way to resolve that and there may be other plugins that this issue may effect and the (2) option wouldn't resolve it for those plugins, only Yoast.

@DevinWalker

This comment has been minimized.

Show comment
Hide comment
@DevinWalker

DevinWalker May 30, 2017

Member

@mehul0810 options #1 sounds good but as long as it doesn't change the visibility of the post items within wp-admin. I don't believe it will, but ensure you double-check.

Member

DevinWalker commented May 30, 2017

@mehul0810 options #1 sounds good but as long as it doesn't change the visibility of the post items within wp-admin. I don't believe it will, but ensure you double-check.

@mehul0810

This comment has been minimized.

Show comment
Hide comment
@mehul0810

mehul0810 May 30, 2017

Contributor

@DevinWalker Sure. I'll do a complete testing after making the change so that none of the existing functionality will get affected.

Contributor

mehul0810 commented May 30, 2017

@DevinWalker Sure. I'll do a complete testing after making the change so that none of the existing functionality will get affected.

@mehul0810 mehul0810 referenced this issue May 31, 2017

Merged

Issue/1690 #1750

3 of 3 tasks complete

@DevinWalker DevinWalker added the has pr label May 31, 2017

@mehul0810 mehul0810 referenced this issue Jul 6, 2017

Merged

Hotfix/1690 #1829

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment