Project

General

Profile

Actions

Bug #96135

open

IRRE: Hide Record switch not work

Added by Devid Messner about 3 years ago. Updated 4 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 2 (1 open1 closed)

Related to TYPO3 Core - Bug #105677: File reference cannot be hiddenNew2024-11-22

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

Actions
Actions #1

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.

Actions #2

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.

Actions #3

Updated by Ralph Pöllath over 2 years ago

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

Actions #4

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.

Actions #5

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.

Actions #6

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.

Actions #7

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.

[...]

Actions #8

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!

Actions #9

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to Stabilization Sprint
Actions #10

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

Actions #11

Updated by Ulrich Mathes 10 months ago

Still a problem in TYPO3 12 and TYPO3 13

Actions #12

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!

Actions #13

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
Actions #14

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!

Actions #15

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

Actions #16

Updated by Fabian Haider 5 months ago

  • TYPO3 Version changed from 12 to 11
  • PHP Version changed from 8.2 to 7.4
Actions #17

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

Actions #18

Updated by Georg Ringer 14 days ago

  • Related to Bug #105677: File reference cannot be hidden added
Actions

Also available in: Atom PDF