wordpress toolkit table prefix mixed case fix/patch
I'm not sure if it's still the case but the toolkit used to (possibly still does) create table prefixes with mixed case characters (or this is done via the security checkup for existing tables).
Unix is case sensitive, windows is not.
lowercasetablename=0 default for Unix = stored as provided and case-sensitive. $tableprefix = '7a6pcDc' will be stored as 7a6pcDctablename in the DB
lowercasetablename=1 default on Windows = uppercase changed to lowercase but still case-insensitive $tableprefix = '7a6pcDc' will be stored as 7a6pcdctablename in the DB.
This is mostly fine with normal database transactions SELECT/DELETE etc but this will fail for the following scenarios
Scenario 1: Elementor Plugin checks to see if PREFIXeevents exits and then uses an identical check !== to see if they're identical comparing against the prefix in wp-config and expected table name against what the column name is and then attempts to create the table if it's not there.
Unix results in 7a6pcDceevents !== 7a6pcDceevents (returns false and doesn't try to create the table)
Windows results in 7a6pcDceevents !== 7a6pcdceevents (returns true, tries to insert table and errors)
Scenario 2: Migration from Windows to Unix, previously mixed case table names would have been changed to lowercase when creating tables but still works. However when migrated to Unix this would fail as 7a6pcDc_ doesn't equal 7a6pcdc_
If mixed case table prefixes is still a feature, then Plesk needs to recognise what environment it's being used in, it should restrict itself on Windows to lowercase characters only or know to store the prefix value in wp-config.php (and Plesk tables) as lowercase as this is the default install settings for MariaDB in Plesk.
If this isn't still a feature (table prefixes are all now lowercase) and/or for fixing historical installations. There also needs to be a way to remedy this problem. The prefix isn't editable via the wordpress toolkit once set and causes problems if you try to edit it from within wp-config.php
For some reason uservoice is removing underscores from some words, apologies.
Thank you for this idea. It is a valid claim. We will consider this functionality in upcoming releases if it will be popular.
Everyone, please continue voting for this feature if you consider it important.