Bug #31198
Switchable Controller Actions in Flexform are not checked against the actual flexform.
| Status: | Under Review | Start date: | 2011-10-23 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | Extbase: Configuration | |||
| Target version: | Extbase 6.2 | |||
| Has patch: | No | Tags: | ||
| Votes: | 1 (View) |
Description
An edge case but when you have an Extbase Plugin with switchable actions in flexform and one without and you set the controller/action to something with the first plugin and then change the content element to the second plugin you will have an exception stating that Extbase could not determine the default controller / action as it seems the flexform data (which is of course still in the DB) is taken into consideration for the second plugin.
Clearing the flexform data from the DB row helped. I think we need to check if the actual plugin has a flexform assigned before even considering the data.
History
Updated by Andreas Kiessling over 1 year ago
Clearing the flexform data from the DB row helped. I think we need to check if the actual plugin has a flexform assigned before even considering the data.
Checking if "a flexform is assigned" won't be enough. If you switch to another plugin, that has a flexform but not that field, the values will still be there.
I had such a problem with an extension last week that restructured the flexform in a new version and i wondered why my settings did not work as expected.
So to make it "bulletproof", we would need to check the structure of the actual flexform and only take "available" fields into account when creating the resulting array.
PS: The extension i mentioned was not extbased, but pi_based. The fix should then work for all. I'm not sure ATM, if Extbase handles parsing the flexform values differently.
Updated by Alexander Schnitzler 7 months ago
- Category set to Extbase: Configuration
- Assignee changed from Christian Mueller to Alexander Schnitzler
- Target version set to Extbase 6.1
Updated by Gerrit Code Review 7 months 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 http://review.typo3.org/16012
Updated by Alexander Schnitzler 6 months ago
As Helmut mentioned we can solve this properly by comparing the flexform on save. But I guess this has to be a Core bugfix then and not an Extbase issue any longer. What do you think?
Updated by Alexander Schnitzler 6 months ago
- Status changed from Under Review to Needs Feedback
Updated by Alexander Schnitzler 5 months ago
- Status changed from Needs Feedback to On Hold
- Assignee deleted (
Alexander Schnitzler)
Updated by Thomas Maroschik about 1 month ago
- Status changed from On Hold to Rejected
-- see below --
Updated by Thomas Maroschik about 1 month ago
- Status changed from Rejected to Under Review
Sorry, the duplicate ticket closed this one but it is not related. So reopened.
Updated by Thomas Maroschik about 1 month ago
I would suggest to check for a assigned flexform structure definition first.
If so then walk through the data structure definition and see if the key is also present in the flex form values.
Then override keys in settings.
But we cannot catch the issue with the wrongly assigned switchable controller actions in the following scenario:
- Content element created, Plugin A is assigned (implicit save), switchable controller actions for Plugin A are chosen, Record saved.
- => Everything works as expected
- Content element opened, Plugin B is assigned (implicit save), switchable controller actions field in flexform shows "Value not allowed", ignored
- => Frontend will break as the switchable controller actions map to wrong controller actions of Plugin A instead of Plugin B
Updated by Gerrit Code Review about 1 month ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19930
Updated by Gerrit Code Review about 1 month ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19930
Updated by Alexander Schnitzler 29 days ago
- Target version changed from Extbase 6.1 to Extbase 6.2
Updated by Gerrit Code Review 3 days ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19930