Bug #96135
openIRRE: Hide Record switch not work
0%
Description
If you have an inline record open and then click Hide in the MenuBar, the record is greyed out, but after saving the main record this setting is lost.
The Hide field in the Inline Record, on the other hand, works without problems.
When the inline record is closed, the hide function in the menu bar works normally.
Attached is an example of the extension "news"
Files
Updated by Benni Mack almost 3 years ago
- Status changed from New to Accepted
Hey Devid,
yes. I can already imagine why this is the case. The issue is that the hide/unhide works, but as soon as you hit the save button, the form (POST data) is submitted and the value of the checkbox/toggle field is used, overriding the previous action.
Updated by Devid Messner almost 3 years ago
Benni Mack wrote in #note-1:
Hey Devid,
yes. I can already imagine why this is the case. The issue is that the hide/unhide works, but as soon as you hit the save button, the form (POST data) is submitted and the value of the checkbox/toggle field is used, overriding the previous action.
Hey,
Yes probably. Another interesting behavior is,
that if the "Hidden" field does not have the "invertStateDisplay" set, the actions may be reversed. Depending on the initial value of the hidden field, when the hidden button in the icon bar is activated, the field in the form is deactivated. Thus the status of the two buttons is no longer syncron.
Updated by Ralph Pöllath over 2 years ago
@Devid Messner
I had the same problem. Thanks for the tip.
Updated by Sascha Zander over 2 years ago
@Benni Mack Mack
On my TYPO3 10.4.30 Projects i have the same issue but i don't have the "hidden"-field in the show list of the IRRE TCA.
If i debugg the \TYPO3\CMS\Core\DataHandling\DataHandler::process_cmdmap and if i check the value of the IRRE in "$this->cmdmap" the "hidden"-field is only set on the items that has not open by the editor. On the items that was open it is missing the "hidden"-field and his new value.
Updated by Daniel Hoffmann over 2 years ago
I have done some research:
When the IRRE item is NOT expanded
the switch works as expected.
When the IRRE item is expanded and the hidden toggle is not shown in the expanded area
it is not possible to change the state of the expanded IRRE item
When the IRRE item is expanded and the hidden toggle is shown with renderType 'checkboxToggle' and invertStateDisplay = false
it is possible to use both toggles and everything works fine, but for the editor it is difficult, because the switch in the "Header-Bar" shows the inverted State of the switch in the "Content-Area" of the irre Item
When the IRRE item is expanded and the hidden toggle is shown with renderType 'checkboxToggle' and invertStateDisplay = true
The toggle in the expanded area works like expected.
The toggle in the "Header-Bar" does not work
I tried to find the bug and fix it, but ended up in some javascript, where my knowledge is not very high.
I think the problem is the click event on the toggle in the "Header-Bar", it does not recognize the invertedState of the button in the "Content-Area" and changes the value not correct then.
Updated by Peter Wimmer over 2 years ago
As an additional comment / temporary improvement:
I changed the TCA for the hidden field to "check" and "invertStateDisplay" = false. So the "hidden" input element looks like in older version, just a checkbox. This works.
$GLOBALS['TCA']['<TABLENAME>']['columns']['hidden']['config']['renderType'] = 'check'; $GLOBALS['TCA']['<TABLENAME>']['columns']['hidden']['config']['items'][0]['invertStateDisplay'] = false;
So it could be that there was no change in the javascript, it was just the change from "invertStateDisplay" false => true in TYPO3 11...
This fix will then most likely break again if a real fix is implemented. It should work, but most likely it will not.
Updated by Christian Buelter about 2 years ago
I had the same problem with mask elements.
That workaround helped. Thanks.
Peter Wimmer wrote in #note-6:
As an additional comment / temporary improvement:
I changed the TCA for the hidden field to "check" and "invertStateDisplay" = false. So the "hidden" input element looks like in older version, just a checkbox. This works.
[...]
Updated by websedit AG about 2 years ago
Hello everyone,
we are facing the same problem in one of our customer projectes.
Is it already foreseeable when a solution will be available?
Kind regards!
Updated by Nick Aumann about 1 year ago · Edited
Is work on the bug planned? Will there be a patch for it?
See it on sprint board https://forger.typo3.com/sprint/core/9
Updated by Ulrich Mathes 10 months ago
Still a problem in TYPO3 12 and TYPO3 13
Updated by Fabian Haider 9 months ago
Ulrich Mathes wrote in #note-11:
Still a problem in TYPO3 12 and TYPO3 13
I'm having the same issue on a customer project on TYPO3 11, hope there will be a solution soon!
Updated by Nikita Hovratov 8 months ago
- Has duplicate Bug #103482: Inline records cannot always be toggled when hidden field is part of the showitems added
Updated by Jan Kornblum 8 months ago · Edited
I can confirm the problem exists in 11 LTS. Toggle the "hide" button within the inline elements header bar (inline element collapsed) does not work. Directly toggle the "hide" button within the expanded child content area works instead. In my case there is " 'invertStateDisplay' => true". Should be fixed soon!
Updated by Fabian Haider 5 months ago
- TYPO3 Version changed from 11 to 12
- PHP Version changed from 7.4 to 8.2
updated the project to TYPO3 12.4 and i can confirm that the problem still exists to this day
Updated by Fabian Haider 5 months ago
- TYPO3 Version changed from 12 to 11
- PHP Version changed from 8.2 to 7.4
Updated by Philipp Gollmer 4 months ago
I can confirm same behavior still in v13.2.1 (PHP 8.3)
Used invertStateDisplay true
collapsed element => works
expanded element => does not work
Updated by Georg Ringer 14 days ago
- Related to Bug #105677: File reference cannot be hidden added