Project

General

Profile

Actions

Bug #96135

open

IRRE: Hide Record switch not work

Added by Devid Messner over 2 years ago. Updated about 2 months ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2021-11-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Stabilization Sprint

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

irre_hidebug.png (25.5 KB) irre_hidebug.png Devid Messner, 2021-11-29 13:12
debugging_process_cmdmap.png (438 KB) debugging_process_cmdmap.png Sascha Zander, 2022-08-04 09:32

Related issues 1 (1 open0 closed)

Has duplicate TYPO3 Core - Bug #103482: Inline records cannot always be toggled when hidden field is part of the showitemsNew2024-03-25

Actions
Actions #1

Updated by Benni Mack over 2 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.

Actions #2

Updated by Devid Messner over 2 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.

Actions #3

Updated by Ralph Pöllath about 2 years ago

@Devid Messner
I had the same problem. Thanks for the tip.

Actions #4

Updated by Sascha Zander almost 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.

Actions #5

Updated by Daniel Hoffmann almost 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.

Actions #6

Updated by Peter Wimmer over 1 year 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.

Actions #7

Updated by Christian Buelter over 1 year 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.

[...]

Actions #8

Updated by websedit AG over 1 year 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!

Actions #9

Updated by Benni Mack 12 months ago

  • Sprint Focus set to Stabilization Sprint
Actions #10

Updated by Nick Aumann 6 months 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

Actions #11

Updated by Ulrich Mathes 3 months ago

Still a problem in TYPO3 12 and TYPO3 13

Actions #12

Updated by Fabian Haider 3 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!

Actions #13

Updated by Nikita Hovratov about 2 months ago

  • Has duplicate Bug #103482: Inline records cannot always be toggled when hidden field is part of the showitems added
Actions #14

Updated by Jan Kornblum about 2 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!

Actions

Also available in: Atom PDF