Database schema sync called on frontend
2 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: Yesterday at 9:25pm (RSS)
Hi,
I getting a lot of messages in the error log:
#134387 - Notice: Database schema sync called on frontend. This performance-heavy operation should only occur during plugin installation/upgrades. Update plugins if happening frequently.
/docker_data/services-staging/www/cmsAdmin/plugins/websiteMembershipCUSTOM/websiteMembership_CUSTOM.php on line 360
> in line 360 is the createMissingSchemaTablesAndFields();
using the v3.78 (Build 2904) with a customized Website Membership that we created for a project.
is there anything that i can do in order to stop this generating?
By Dave - Yesterday at 9:25pm
Hiht1080z,
That notice just means the plugin is checking if it needs to create your accounts table on every page load. Newer CMSB versions save schema files as .schema.php, but your plugin is still looking for the old .ini.php files. It never finds them, so it assumes the table still needs creating and runs the full schema sync (and logs that notice) on every page view.
It's harmless, though, your table is fine, and logins work. It's just extra work each load, and your pages will load faster if you fix it. So a few options:
- Leave it. If the log noise doesn't bother you, ignore it. Nothing's broken.
- Quick fix. Your accounts table already exists, so you can just comment out the createMissingSchemaTablesAndFields(); call on line 360 of your custom plugin.
- Proper fix. Download the latest Website Membership, diff it against your custom file, and merge in the schema-file check, making sure it looks for .schema.php. The sync then skips on its own once the table's set up.
Hope that helps, let me know any questions.
interactivetools.com