• Resolved Adil ?zta?er

    (@oztaser)


    Hi there,

    I’ve updated from 4.1.1 to 4.1.5 and realized that lots of update option queries when I visit the /sitemap.xml page. Then I tried to reproduce the problem fresh install with WordPress 6.0 to see any of my configurations or plugins effect the sitemap plugin or not, I saw the same queries.

    I do not think there is any point of doing that, I hope I’m missing something or you can fix this.

    Logs from my site:

    
    NOTICE: PHP message: rewrite_option_updated_528
    NOTICE: PHP message: rewrite_option_updated_529
    NOTICE: PHP message: rewrite_option_updated_530
    NOTICE: PHP message: rewrite_option_updated_531
    NOTICE: PHP message: rewrite_option_updated_532
    NOTICE: PHP message: rewrite_option_updated_533
    NOTICE: PHP message: rewrite_option_updated_534
    NOTICE: PHP message: rewrite_option_updated_535
    

    Here is my mu-plugin to see rewrite option updates:

    
    <?php
    namespace NefisYemekTarifleri\Test_Sitemap;
    
    global $rewrite_update_count;
    $rewrite_update_count = 0;
    
    function updated_option( $option, $old_value, $value ) {
    	global $rewrite_update_count;
    
    	if ( 'rewrite_rules' !== $option ) {
    		return;
    	}
    
    	if ( true === empty( $value ) ) {
    		return;
    	}
    
    	$rewrite_update_count++;
    
    	@error_log( sprintf( 'rewrite_option_updated_%d', $rewrite_update_count ) );
    }
    add_action( 'updated_option', __NAMESPACE__ . '\\updated_option', 10, 3 );
    
Viewing 7 replies - 1 through 7 (of 7 total)
  • Even worse, the plugin started to mess up with the “rewrite_rules” in “wp_options” table – some of my recent posts permalinks on my site suddenly started to randomly return 404, because of strange rewrite rules being generated.

    It’s super-strange when you can see the automatically generated post feed showing the posts overview and when you click the post, you get “404, page not found”. When you look into the database, and search for “rewrite_rules” item in the “wp_options” table (“option_name” column) , you’ll see the problematic post permalink at the very beginning of the “option_value”.

    Deactivating the XML Sitemap plugin and re-saving (change to other option, save, change back, save again) the permalink options in WP helped repair this. When the XML Sitemap plugin is reactivated, this mess with random broken permalinks of recent posts came back.

    Currently turned off this plugin on my site.

    I forgot the specifications:

    WordPress: v6.0
    Web server: Apache (API version 20120211), PHP: v7.4.30
    Plugin version: 4.1.5

    No caching, or SEO plugins. Polylang, two languages.

    For redirection, I use this https://www.ads-software.com/plugins/redirection/ Deactivating it made no difference in the issue described above.

    Hi,

    Any update on this? I’m seeing the same thing. It’s resetting the rewrite_rules option that is being used by the “redirection” plugin. It’s causing large numbers of queries because the redirection plugin has to keep resetting the options value.

    Plugin Author Auctollo

    (@auctollo)

    Thanks for reaching out to us. We have tracked and resolved this issue in our upcoming new release (4.1.6). Please upgrade to it when it’s released and let us know if you still have any issues.

    Hi, @auctollo ,

    We are also facing a severe performance issue.
    the function get_xml_url() always remove cron task ‘sm_ping_daily’ and cron job re-registered repeatedly.

    It seems that you are already apply the patch on GitHub.
    https://github.com/Auctollo/google-sitemap-generator/commit/dbca6fc9b9dd8cd0cd9e63758650d3f727d99683#diff-5b5d2e0f4280f6da1fded988db3fa53e1747df05b09d3b95eb7f19fb7610751dR1712-R1720

    Hope it’ll be released soon.

    Thanks in advance!

    saurabhdhariwal01

    (@saurabhdhariwal01)

    Hello @takahashi_fumiki,

    We just released the new version 4.1.6. Can you please upgrade it and let us know if any feedback?

    Takahashi Fumiki

    (@takahashi_fumiki)

    @saurabhdhariwal01 Thanks for your reply!
    We’ll apply the update and send feedback soon.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Trying to flush and recreate rewrite rules whenever call `get_xml_url` function.’ is closed to new replies.