remove check for statusSystemID and statusSystem in module ProcessPageClone#1258
remove check for statusSystemID and statusSystem in module ProcessPageClone#1258FdeQuillettes wants to merge 4 commits intoryancramerdesign:masterfrom
Conversation
removed check for statusSystemID, clone doesn't affect the id or delete the page
There is no status that technically denies cloning, but statusSystemID and statusSystem prevent cloning in the current implmentation. Therefore during the cloning, status should be 1 for the newly cloned page. When the actual cloning is done, the original status can be restored.
neither should block cloning
When updating the pages_parents table, all items referencing this page were removed but not necessarily readded, resulting in queries that used has_parent not working correctly
|
Note: the last commit (7834e49) fixes another issue with clone: When updating the pages_parents table, all items referencing this page were removed but not necessarily readded, resulting in queries that used has_parent not working correctly. |
|
Thanks @FdeQuillettes, the preventing of system page cloning was intended, though to be honest I'm not sure if the reason is still applicable, so will look into it. Which system page are you needing to clone? Regarding the pages_parents table issue–good find. We actually fixed this a couple of weeks ago on the dev branch. Are you using the dev branch, and if so, were you still experiencing the pages_parents table issue? Thanks. |
|
Actually we only needed this for statusSystemID (for the multisite plugin we set our site roots to statusSystemID)., but when working on the fix I noticed the same may also apply to statusSystem.
edit: actually I noticed that in the dev branch the numChildren check is still after the DELETE and before the INSERT, so which fix do you mean? We have applied the fix suggested in 'has_parent buggy' #1195 (40441f6), but the problem still persisted until I did the above fix. |
With the proposed change to Pages::___clone(), having statusSystemID or statusSystem on a page should no longer block the cloning of a page/tree, so its check can be removed from ProcessPageClone.