Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

Bug? content element limitations from content_defender affect children in mask-field 'content' #449

Closed beyring closed 3 years ago

beyring commented 3 years ago

TYPO3-Version: 10.4.21 mask-version: 7.0.28 content_defender-version: 3.2.1 container extension (b13): 1.4.0 (maybe involved?)

Setup for Reproduction:

  1. Create a mask-element, that has a field of type content to hold other content elements (e.g. mask_container)
  2. Create another mask-element, that should be used as a repeating child element for the container element mentioned above (e.g. mask_item)
  3. As you have created the child element, you now can limit the allowed content_elements in the content-filed of mask-element 'mask_container' to that child element (mask_item)
  4. If you are using colPos 0 for the test, then limit the allowed content elements for colPos 0 in your backend-layout to the mask_container element using content_defender extension.
  5. Create one instance of mask_container in colPos 0
  6. Try to add an instance of mask_item to the newly created instance of mask_container

Behaviour:

The child element can not be added properly:

  1. The drop-down for field 'type' is empty - it should automatically show the content type of the child element as it is the only one allowed.
  2. The Column-field shows an error '[ INVALID VALUE ("999") ]'
  3. If you still save the new child element and reopen it for changes, the content-type is not recognized anymore and the edit-mask of a standard content element is presented.

Test with content-defender deactivated:

Child element can be added as expected.

Question:

  1. Can you confirm that behaviour?
  2. Can you determine if the error is within mask? If rather the error is in content_defender I would get in contact with Nicole.

Thank you in advance and best regards, Benjamin

nhovratov commented 3 years ago

Hi Benjamin, thanks for the report. I will try this out. Can you maybe drop me a mask.json file, so I can reproduce it quicker?

beyring commented 3 years ago

Hi Nikita, thanks for the quick reply!

Sure, let me send it to you tomorrow morning.

Best, Ben

Nikita Hovratov @.***> schrieb am Mi., 17. Nov. 2021, 21:02:

Hi Benjamin, thanks for the report. I will try this out. Can you maybe drop me a mask.json file, so I can reproduce it quicker?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gernott/mask/issues/449#issuecomment-971927597, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU3M4ECY4DR5TE2KXY7MKTUMQC5DANCNFSM5IG3BMXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

beyring commented 3 years ago

Hi Nikita, this is our test setup - one container element, one child element.

{ "tt_content": { "elements": { "300_slideshow": { "color": "#000000", "columns": [ "header", "tx_mask_300_slideshow_items" ], "description": "", "hidden": "0", "icon": "", "key": "300_slideshow", "label": "Slideshow im Contentbereich", "labels": [ "", "Slides" ], "shortLabel": "" }, "310_slideshow_item": { "color": "#000000", "columns": [ "header" ], "description": "", "icon": "", "key": "310_slideshow_item", "label": "Slide", "labels": [ "Titel des Slides" ], "shortLabel": "" } }, "sql": { "tx_mask_300_slideshow_items": { "tt_content": { "tx_mask_300_slideshow_items": "int(11) unsigned DEFAULT '0' NOT NULL" } } }, "tca": { "header": { "coreField": 1, "key": "header", "name": "string" }, "tx_mask_300_slideshow_items": { "cTypes": [ "mask_310_slideshow_item" ], "config": { "appearance": { "collapseAll": 1, "enabledControls": { "dragdrop": 1 }, "levelLinksPosition": "top", "showAllLocalizationLink": 1, "showPossibleLocalizationRecords": 1, "useSortable": 1 }, "foreign_sortby": "sorting", "foreign_table": "tt_content", "overrideChildTca": { "columns": { "colPos": { "config": { "default": 999 } } } }, "type": "inline" }, "description": "", "key": "300_slideshow_items", "l10n_mode": "", "name": "content" } } } }

nhovratov commented 3 years ago

Hey Benjamin, I can confirm the bug happens only with b13/container. Will do further investigations on why this can be.

beyring commented 3 years ago

Great, thanks!

Nikita Hovratov @.***> schrieb am Do., 18. Nov. 2021, 11:28:

Closed #449 https://github.com/Gernott/mask/issues/449 via de9a09f https://github.com/Gernott/mask/commit/de9a09f7da5f8a33e494baec25efbf206743ab48 .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Gernott/mask/issues/449#event-5637771593, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU3M4HEQVYUAGXEMECJOFTUMTINJANCNFSM5IG3BMXA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.