If the user places a string with capitalization in it in the new_site_name field, the cloning process will place that capitalized string into the database (which is very bad to begin with). But it becomes even worse if the user than attempts to clone the resulting site. That site will be duplicated with any new URL placed in the subsequent attempts’ new_site_name field not properly propagating to the database, giving all subsequent sites the identical URL in the database (with the same bad caps in the database) and the same occurring for any sites cloned from those sites.
In short: disaster.
There are good and better ways to solve this issue, but since I just want to resolve the problem ASAP, i just created a patch to de-cap all letters in the resolved field when processing for cloning.
I suggest that the changes I’ve made at https://github.com/AramZS/ns-cloner-site-copier/commit/11102efcf72bb88b0b848e1c0d91ca11cf9cb838 (or some other better validation check at the user level) be merged into the next patch for the plugin.
Thanks for the great plugin!
- The topic ‘Capitalization in new_site_name field causes significant failure’ is closed to new replies.