Not existing tables lead to huge log file
-
Hey!
I recently discovered this plugin and love it. Coming from BuddyPress.
Looking forward to testing all the interesting add-ons.Am using the plugin in a multisite with the default configuration for it. Leading for a central user management inside the main site.
During my work integrating the plugin into a project I noticed, that the plugin creates massive amounts of log entries due to the way the plugin handles fetching data.
For example:
Inside the get_custom_field_keys() method the plugin attempts to fetch data from the table “wp_4_uwp_form_fields”. But this table does not exists due to the central data storage inside the “wp_uwp_form_fields” table.So every time the plugin tries to get some data an entry inside the error log is created:
WordPress-Datenbank-Fehler Table 'wp_4_uwp_form_fields' doesn't exist für Abfrage SELECT * FROM wp_4_uwp_form_fields WHERE htmlvar_name = 'avatar_thumb' AND form_type = 'account' von require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('wp-includes/template-canvas.php'), get_the_block_template_html, do_blocks, render_block, WP_Block->render, WP_Block->render, WP_Block->render, render_block_core_post_template, WP_Block->render, WP_Block->render, WP_Block->render, WP_Block->render, render_block_core_post_author, get_avatar, get_avatar_url, get_avatar_data, apply_filters('get_avatar_url'), WP_Hook->apply_filters, UsersWP_Profile->get_avatar_url, uwp_get_usermeta, UsersWP_Meta->get_usermeta, uwp_maybe_unserialize, uwp_get_custom_field_info
On average I get 460 of this entries per page load ??
This makes the log file unusable for it’s original purpose. The log should display errors and not be a dump.
Also it’s a huge wast of resources.Idea for a solution:
Right before every DB request add a check if the data can be at the location and if not skip the DB request.
I guess there is an option that can be checked if the database tables are existing.Speed:
I have added two hot fixes to my local plugin copy and used Query Monitor to measure the page load. My hot fix reduced the time needed to talk to the database by 30 – 60%.Would love to see a change to the plugin to prevent the not necessary database request.
Greetings
derRALF
- The topic ‘Not existing tables lead to huge log file’ is closed to new replies.