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

XML Sitemap - Blank sitemap pages with WPML #884

Closed
wpsmort opened this issue May 1, 2017 · 10 comments

Comments

Projects
None yet
5 participants
@wpsmort
Copy link
Member

commented May 1, 2017

This was identified whilst testing prior to release of 2.3.12.3.

When you are using WPML to translate content and you have sitemap indexes and pagination enabled, we are creating empty sitemap pages.

For example:

If you have 6 pages in English and pagination is set to 3 URLs per page, you get 2 pages populated with the 6 URLs (3 per page). However, you also get a number of blank pages as well. This happens for each language. See screenshots:

screen shot 2017-09-12 at 4 48 34 pm

screen shot 2017-09-12 at 4 48 52 pm

@wpsmort wpsmort added the Bug label May 1, 2017

@wpsmort wpsmort added this to the 2.3.13 milestone May 1, 2017

@wpsmort wpsmort modified the milestones: 2.3.14, 2.3.13 May 31, 2017

@wpsmort wpsmort modified the milestones: 2.3.14, 2.3.15 Jul 11, 2017

@wpsmort wpsmort modified the milestones: 2.3.16, 2.3.15 Aug 2, 2017

@wpsmort wpsmort modified the milestones: 2.3.16, 2.3.17 Aug 22, 2017

@wpsmort wpsmort modified the milestones: 2.3.17, 2.4 Sep 5, 2017

@wpsmort wpsmort modified the milestones: 2.4, 2.5 Sep 27, 2017

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2017

@wpsmort @arnaudbroes @michaeltorbert can I get a copy of the WPML plugin to reproduced and fix this?

@arnaudbroes

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2017

@contactashish13 sending it on Slack.

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 11, 2017

@arnaudbroes I followed Steve's suggestions and configured WPML with French an the additional language. When I view the sitemap in default as well as the /fr/ URLs, I get the same number of pages and not the additional pages he mentions. Maybe my settings are not identical to reproduce the issue. Could you please check?

@arnaudbroes

This comment has been minimized.

Copy link
Contributor

commented Nov 11, 2017

@contactashish13 I was able to reproduce this issue with the settings that Steve mentioned above. Sending credentials for the test site on Slack that you can use to verify the issue.

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Nov 12, 2017

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 12, 2017

@arnaudbroes PR: #1358. Have also made changes to the test site and tested there.

@michaeltorbert there were a few bits of messy and redundant code that I've removed to improve readability. Have left comments as well.

@contactashish13 contactashish13 modified the milestones: 2.5, 2.4.4 Jan 3, 2018

@wpsmort wpsmort removed this from the 2.4.4 milestone Jan 11, 2018

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2018

@wpsmort I was able to reproduce the issue on my dev instance and have fixed this.

PS - Can you please add comments to the issue instead of the PR so that all comments are in one place?

@wpsmort wpsmort modified the milestones: 2.4.6, 2.4.5 Feb 6, 2018

@wpsmort

This comment has been minimized.

Copy link
Member Author

commented Feb 6, 2018

@contactashish13 I tested with your latest code and it still creates a blank sitemap file. It also now doesn't include the custom post types such as WooCommerce products. See screenshot below:

screen shot 2018-02-06 at 1 31 04 pm

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2018

@wpsmort The plugin "All In One SEO Pack-884" does not seem to have my latest changes.

Please compare ad4f494 with the below screenshot from the plugin editor, where I can still see the old code.

image

@wpsmort

This comment has been minimized.

Copy link
Member Author

commented Feb 7, 2018

@contactashish13 I tested the latest code from PR #1358 which includes the code from commit ad4f494 and it's still not including custom post types. It does include custom taxonomies.

The blank sitemap issue is fixed in the latest code from your PR.

@wpsmort wpsmort self-assigned this Feb 7, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Feb 8, 2018

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2018

@wpsmort have fixed this.

michaeltorbert added a commit that referenced this issue Feb 12, 2018

XML Sitemap - Blank sitemap pages with WPML (#1358)
* XML Sitemap - Blank sitemap pages with WPML #884

* codeclimate

* fix post counts

* test case

* custom post type not being picked up when attachments are included

* comprehensive test case

* fix failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.