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

Sitemap.xml Additional Pages break with no date entered #940

Closed
michaeltorbert opened this issue Jun 28, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@michaeltorbert
Copy link
Member

commented Jun 28, 2017

reported here: https://wordpress.org/support/topic/sitemap-xml-additional-pages/
_ not manually entered a Last Modified date that the options stored in the db ended up empty.

In the aioseop_sitemap.xml the date conversion around line 2272 when used with an empty date string returns 1970-01-01. We had entered a lot of URLs before I released so I implemented a temporary solution adding a basic check

$mod = (empty($mod) ? date(“Y-m-d”) : $mod);

just above this line

$mod = date( ‘Y-m-d\TH:i:s\Z’, mysql2date( ‘U’, $mod ) );_

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2017

@michaeltorbert I believe all the 4 parameters are mandatory. We should have a date selector as well as validate the values and reject values that do not have all 4 parameters. Thoughts?

image

@michaeltorbert

This comment has been minimized.

Copy link
Member Author

commented Nov 16, 2017

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2017

@michaeltorbert PR: #1364

I can't seem to get rid of codeclimate's false positives. Is there a code directive that I can use in the future to make it ignore specific lines?

@michaeltorbert

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2017

@contactashish13 We don't want it to ignore specific lines, instead we should use the config file to fine tune it. https://github.com/semperfiwebdesign/all-in-one-seo-pack/blob/master/.codeclimate.yml

@contactashish13 contactashish13 added this to the 2.4.4 milestone Jan 3, 2018

@wpsmort wpsmort modified the milestones: 2.4.4, 2.4.5 Jan 11, 2018

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

Sitemap.xml Additional Pages break with no date entered #940 (#1364)
* Sitemap.xml Additional Pages break with no date entered #940

* handle only regular sitemap

* codeclimate

* codeclimate
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.