Bug #84632
closedUpgrade wizards do not show executed SQL statements
Added by Sybille Peters over 6 years ago. Updated about 6 years ago.
0%
Description
Upgrade wizards do not show executed SQL statements if checkbox is checked.
Possible Cause:¶
`UpgradeController::upgradeWizardsExecuteAction` calls `UpradeWizardService::executeWizard()` without second parameter.
This will always evaluate to false:
Updated by Sybille Peters over 6 years ago
- Subject changed from Upgrade wizard does not show executed SQL statements to Upgrade wizards do not show executed SQL statements
- Description updated (diff)
Updated by Gerrit Code Review over 6 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56578
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56578
Updated by Gerrit Code Review over 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/56578
Updated by Sybille Peters over 6 years ago
In patch 56578 the problem was fixed and the SQL statements are displayed again (as Flash Message).
new todo¶
As pointed out by Jan they are now displayed with a placeholder string such as :dcValue1
UPDATE `be_users` SET `uc` = :dcValue2 WHERE `uid` = :dcValue1
due to QueryBuilder::getSql (Doctrine).
possible solution¶
- One could use getParameters() to retreive the parameters
- see also comment : https://github.com/TYPO3/TYPO3.CMS/blob/5a12dc5ffa8daaadd4ee6af71e164d4e46de2fb2/typo3/sysext/install/Classes/Updates/StartModuleUpdate.php#L92
This must be done in all performUpdate functions that use SQL statements this way.
Updated by Sybille Peters over 6 years ago
Question¶
Does it even make sense to always output the SQL statement (especially in cases like
StartModuleUpdate.php with a lengthy serialized array of user settings) or should a general string be displayed describing what was actually changed?
In StartModuleUpdate example:
Instead of:
UPDATE `be_users` SET `uc` = 'a:16:{s:14:"interfaceSetup";s:7:"backend";s:10:"moduleData";a:5:{s:10:"web_layout";a:2:{s:8:"function";s:1:"2";s:8:"language";s:1:"0";}s:10:"FormEngine";a:2:{i:0;a:4:{s:32:"01d694419259294ae31415da0c8f9d78";a:4:{i:0;s:12:"Carousel III";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:194;s:4:"edit";}}s:7:"defVals";a:1:{s:10:"tt_content";a:3:{s:6:"colPos";s:1:"0";s:16:"sys_language_uid";s:1:"0";s:5:"CType";s:8:"carousel";}}s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:179:"&edit[tt_content][194]=edit&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=carousel&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:194;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"b0b01f89ae8c69705396d08cb4ed1df7";a:4:{i:0;s:10:"Carousel I";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:196;s:4:"edit";}}s:7:"defVals";a:1:{s:10:"tt_content";a:3:{s:6:"colPos";s:1:"0";s:16:"sys_language_uid";s:1:"0";s:5:"CType";s:8:"carousel";}}s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:179:"&edit[tt_content][196]=edit&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=carousel&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:196;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"b464608dab96111615bc5e859954b105";a:4:{i:0;s:10:"Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:198;s:4:"edit";}}s:7:"defVals";a:1:{s:10:"tt_content";a:3:{s:6:"colPos";s:1:"0";s:16:"sys_language_uid";s:1:"0";s:5:"CType";s:8:"carousel";}}s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:179:"&edit[tt_content][198]=edit&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=carousel&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:198;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"60aa43c5df57852e723b29f42b128fab";a:4:{i:0;s:10:"Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:200;s:4:"edit";}}s:7:"defVals";a:1:{s:10:"tt_content";a:3:{s:6:"colPos";s:1:"0";s:16:"sys_language_uid";s:1:"0";s:5:"CType";s:8:"carousel";}}s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:179:"&edit[tt_content][200]=edit&defVals[tt_content][colPos]=0&defVals[tt_content][sys_language_uid]=0&defVals[tt_content][CType]=carousel&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:200;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}}i:1;s:32:"c2abf82ef66a2ddb5072b2074c80b90d";}s:57:"TYPO3\CMS\Backend\Utility\BackendUtility::getUpdateSignal";a:0:{}s:16:"opendocs::recent";a:8:{s:32:"c2abf82ef66a2ddb5072b2074c80b90d";a:4:{i:0;s:10:"Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:200;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][200]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:200;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"e6ad29e00e04f7bcf0ea418f850a331d";a:4:{i:0;s:33:"[Translate to German:] Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:201;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][201]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:201;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"5cad2326f890612457cdb3ca88f38dd7";a:4:{i:0;s:33:"[Translate to German:] Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:199;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][199]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:199;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"86b8d7fdc45807c41c97c531bd865d31";a:4:{i:0;s:10:"Carousel 1";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:198;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][198]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:198;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"ad37e7539cf893291dbcf45d459eca81";a:4:{i:0;s:33:"[Translate to German:] Carousel I";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:197;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][197]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:197;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"8352c4d57746215b994d98ee3ab1613f";a:4:{i:0;s:10:"Carousel I";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:196;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][196]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:196;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"be3c9f453a56d76edcd1d456e595bece";a:4:{i:0;s:35:"[Translate to German:] Carousel III";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:195;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][195]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:195;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}s:32:"f3b72a40a5f005821074ebf392d73a70";a:4:{i:0;s:12:"Carousel III";i:1;a:6:{s:4:"edit";a:1:{s:10:"tt_content";a:1:{i:194;s:4:"edit";}}s:7:"defVals";N;s:12:"overrideVals";N;s:11:"columnsOnly";N;s:6:"noView";N;s:9:"workspace";N;}i:2;s:82:"&edit[tt_content][194]=edit&defVals=&overrideVals=&columnsOnly=&noView=&workspace=";i:3;a:5:{s:5:"table";s:10:"tt_content";s:3:"uid";i:194;s:3:"pid";i:58;s:3:"cmd";s:4:"edit";s:12:"deleteAccess";b:1;}}}s:8:"web_list";a:0:{}}s:19:"thumbnailsByDefault";i:1;s:14:"emailMeAtLogin";i:0;s:11:"startModule";s:17:"help_aboutmodules";s:8:"titleLen";i:50;s:8:"edit_RTE";s:1:"1";s:20:"edit_docModuleUpload";s:1:"1";s:15:"resizeTextareas";i:1;s:25:"resizeTextareas_MaxHeight";i:500;s:24:"resizeTextareas_Flexible";i:0;s:4:"lang";s:0:"";s:19:"firstLoginTimeStamp";i:1520836747;s:15:"moduleSessionID";a:5:{s:10:"web_layout";s:32:"1f5595236da5ea9b0744b78765a44170";s:10:"FormEngine";s:32:"4cdfc42966269028ab49c68b3765abb7";s:57:"TYPO3\CMS\Backend\Utility\BackendUtility::getUpdateSignal";s:32:"4cdfc42966269028ab49c68b3765abb7";s:16:"opendocs::recent";s:32:"4cdfc42966269028ab49c68b3765abb7";s:8:"web_list";s:32:"a01a8ea6eb5e95c8434fcb097058bcb3";}s:17:"BackendComponents";a:1:{s:6:"States";a:1:{s:8:"Pagetree";a:1:{s:9:"stateHash";a:3:{s:3:"0_1";s:1:"1";s:4:"0_55";s:1:"1";s:4:"0_53";s:1:"1";}}}}s:10:"inlineView";s:1041:"a:2:{i:0;b:0;s:10:"tt_content";a:13:{i:183;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:2:{i:0;s:0:"";i:1;i:7;}}i:185;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;s:0:"";}}i:192;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:3;s:0:"";}}s:25:"NEW5abff7a9b0312613865000";a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;i:23;}}i:194;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;s:0:"";}}i:195;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;s:0:"";}}s:25:"NEW5abffb4801a64109774479";a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;i:29;}}i:196;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:2;s:0:"";}}i:197;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;s:0:"";}}i:198;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:2:{i:1;s:0:"";i:2;i:39;}}s:25:"NEW5abffca311638668845312";a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;i:41;}}i:200;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:2;s:0:"";}}i:201;a:1:{s:33:"tx_bootstrappackage_carousel_item";a:1:{i:0;s:0:"";}}}}";}'
WHERE `uid` = 1
something like:
flash msg #1
title: Update `be_users` change field `uc` to include startModule['help_AboutAbout'] instead of startModule['help_aboutmodules']
uid=1
flash msg #2
title: Update `be_users` change field `uc` to include startModule['help_AboutAbout'] instead of startModule['help_aboutmodules']
uid=2
This would probably be easier to implement and be more helpful for the user.
Updated by Sybille Peters over 6 years ago
- Related to Bug #80780: Incomplete query when "Show database queries performed" selected added
Updated by Christian Kuhn about 6 years ago
- Status changed from Under Review to Rejected
Hey. The feature has always been done half-way since ever and it got worse with doctrine since v8. In v9, the feature has been removed. Since v8 (?) wizards are also marked in db as done and not in LocalConfiguration anymore, so it is much easier now to re-run them after deployment. Since v9, that's even possible via cli. Thus, there shouldn't be any need to copy+paste the queries around anymore - just re-run the wizard. I'll reject the issue for now.