Bug #51998
closedExtDirect StateProvider only stores first setting in a row
100%
Description
ExtDirect StateProvider seems to queue Ext.state.Manager.set() calls and collects them to fire only one ajax call.
In TYPO3\CMS\Backend\InterfaceState\ExtDirec on the other hand setState() only stores the first item of the data array to $GLOBALS['BE_USER']->uc the other settins are just ignored.
Simple solution: iterate the data array and store all items:
--- a/typo3/sysext/backend/Classes/InterfaceState/ExtDirect/DataProvider.php +++ b/typo3/sysext/backend/Classes/InterfaceState/ExtDirect/DataProvider.php @@ -70,7 +70,9 @@ class DataProvider { public function setState($parameter) { $key = $parameter->params->key; $data = json_decode($parameter->params->data); - $this->userSettings->set($key . '.' . $data[0]->name, $data[0]->value); + foreach ($data as $setting) { + $this->userSettings->set($key . '.' . $setting->name, $setting->value); + }
Updated by Joh. Feustel about 11 years ago
See e.g. https://review.typo3.org/#/c/23771/4/typo3/sysext/viewpage/Resources/Public/JavaScript/common.js line 95
To reproduce remove setTimeout() wrapping and check if both settings are stored in $GLOBALS['BE_USER']->uc['moduleData']['web_view']['States'] after a resize in the View module.
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23843
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23843
Updated by Gerrit Code Review about 11 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/23843
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25498
Updated by Gerrit Code Review about 11 years ago
Patch set 1 for branch TYPO3_6-0 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25499
Updated by Joh. Feustel about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6c6582ab95d9eed208f75ff98de3ecb0a0c321e7.