BUG: SQL updates on each request: CWS_PageLinksTo->maybe_upgrade()
-
There is a bug in this plugin (Version 3.3.3), wich causes this plugin to fire 3 SQL updates for the
wp_postmeta
database table on each page request. The problem is caused by the functionmaybe_upgrade()
. These update queries are fired on both frontend and admin interface.CWS_PageLinksTo->maybe_upgrade() - Line 283 wp-content\plugins\page-links-to\classes\plugin.php
maybe_upgrade() is a migration function. The function searches for wp_options key “txfx_plt_schema_version” in a condition, which is unfortunately never set to the wp_options table after the successful migration. (See get_option(self::VERSION_KEY))
Because of this, each and every request on every page generates
wp_postmeta
SQL updates in the database, because the plugin tries to migrate data.These queries look like this:
UPDATE
wp_postmeta`
SETmeta_key
= ‘_links_to’
WHEREmeta_key
= ‘links_to’UPDATE
wp_postmeta
SETmeta_key
= ‘_links_to_target’
WHEREmeta_key
= ‘links_to_target’UPDATE
wp_postmeta
SETmeta_key
= ‘_links_to_type’
WHEREmeta_key
= ‘links_to_type’`
- The topic ‘BUG: SQL updates on each request: CWS_PageLinksTo->maybe_upgrade()’ is closed to new replies.