WordPress.org

Ready to get started?Download WordPress

Forums

Google XML Sitemaps - why mktime warning? (9 posts)

  1. somanyqs
    Member
    Posted 5 years ago #

    im not well-versed in wordpress, still learning-
    i get the error below when i try to manually update my sitemap
    it seems to just try transferring and updating over and over. however when i go back to the google xml sitemap page, it looks like everything was updated ok. any advice for me? thank you!

    Warning: mktime() expects parameter 1 to be long, string given in /home2/mysite/public_html/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 2426

  2. 4bmg09
    Member
    Posted 5 years ago #

    I'm getting a similar error ... anybody have a fix??

    Just upgrade the sitemap plugin that was working just fine with the latest WP install and now it doesn't work .. getting:

    Warning: mktime() expects parameter 1 to be long, string given in /home/knritsol/public_html/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 2438

    Thanks in advance!

  3. topcreations
    Member
    Posted 5 years ago #

    Try to change

    return mktime($hour, $min, $sec, $month, $day, $year);

    to

    return mktime(doubleval( $hour), $min, $sec, $month, $day, doubleval($year));

  4. 4bmg09
    Member
    Posted 5 years ago #

    Worked like a charm!

    Thank you!

  5. Christian Schenk
    Member
    Posted 5 years ago #

    I've created a support ticked here and I'm looking forward to a patch in the next release.

  6. m3Rlin
    Member
    Posted 5 years ago #

    Beautiful! Thank you, topcreations!

  7. elizabethrichardson
    Member
    Posted 5 years ago #

    Worked for me too - thanks topcreations...very much appreciated.

  8. badmaash
    Member
    Posted 5 years ago #

    Try to change

    return mktime($hour, $min, $sec, $month, $day, $year);to

    return mktime(doubleval( $hour), $min, $sec, $month, $day, doubleval($year));

    What file is this code suppose to changed in becuase
    sitemap-core.php does not exist?

  9. printing4fun
    Member
    Posted 5 years ago #

    XML Sitemap Generator for WordPress 3.1.4 does have a sitemap-core.php file and the proposed fix indeed seems to solve the problem. I hope this gets fixed automatically in a future upgrade.

Topic Closed

This topic has been closed to new replies.

About this Topic