Bug #76374

Select trees not rendered on inline records

Added by Mathias Brodala over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
Start date:
2016-05-30
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
On Location Sprint

Description

Since the change in #75519 the tree rendering of TCA select is broken for records managed inline.

The change was determined via Git bisecting between TYPO3 6.2.21 and 6.2.22.

See the attached test extension for an example. It adds a single inline relation field to the sys_category table which uses a tree for its parent field. Try to add a relation and see that the tree of the parent field is missing.

6.2.21.png View - Inline select tree rendering working in TYPO3 6.2.21 (20.9 KB) Mathias Brodala, 2016-05-30 12:55

6.2.22.png View - Inline select tree rendering missgin in TYPO3 6.2.22 (19.2 KB) Mathias Brodala, 2016-05-30 12:55

tree.js.diff View (597 Bytes) Mark Herzberg, 2016-06-15 12:45

test_category_inline_tree.zip - Fixed test extension (1.94 KB) Mathias Brodala, 2016-08-31 09:01


Related issues

Related to TYPO3 Core - Bug #75519: Flexform select rendermode tree doesn't respect collapsed nodes Closed 2016-04-11
Related to TYPO3 Core - Bug #75947: Creation of subcategories impossible after upgrading to 6.2.22 Closed 2016-04-27

Associated revisions

Revision d69e182b (diff)
Added by Tymoteusz Motylewski about 3 years ago

[BUGFIX] Initialize selectTree in inline relations

Adds a callback function when requiring the SelectTreeElement module,
so initialization is triggered every time it's required.

Adds check whether component was initialized to prevent
double initialization.

Fix variable name typo $overlayIcon to $overlayIconMarkup

Resolves: #76374
Releases: master
Change-Id: Idbffdc09bc7b4d8dfadd523e1c1ff41fd943ca25
Reviewed-on: https://review.typo3.org/49684
Tested-by: Lukas Raschke <>
Reviewed-by: Markus Gehrig <>
Reviewed-by: Wouter Wolters <>
Reviewed-by: Alexander Stehlik <>
Tested-by: Alexander Stehlik <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Mathias Brodala over 3 years ago

#2 Updated by Mathias Brodala over 3 years ago

The issue only occurs for records created/loaded via AJAX; if a record is already stored and thus opened on editing the parent record, the tree is rendered just fine.

#3 Updated by Mark Herzberg over 3 years ago

To prevent this behavior I added a simple check if Ext.fly('treeinput' + this.id) exists. Have a look at the attached diff.

#4 Updated by Mathias Brodala over 3 years ago

I just tried and it fixes loading of trees within inline records. But at the same time checking items doesn't work at all. Already checked items are kept but you cannot check items. If you uncheck a checked item, you cannot re-check it again.

#5 Updated by Henrik Ziegenhain over 3 years ago

Attached Patch is working for me.
The second issue mentioned by Mathias seems to be resolved with #75947 in the meanwhile.

Tested with 6.2.25 - can we bring it to next patchlevel?

#6 Updated by Tymoteusz Motylewski about 3 years ago

seems that the test extension is broken.
I'm getting "'Unknown column 'related_category' in 'field list'' "

 lastBuiltQuery => 'SELECT uid,sys_language_uid,l10n_parent,parent,items,images,single_pid,short
      cut,related_category,deleted FROM sys_category WHERE uid=257 LIMIT 1'

#7 Updated by Mathias Brodala about 3 years ago

The test extension was missing DB schema updates.

#8 Updated by Mathias Brodala about 3 years ago

  • File deleted (test_category_inline_tree.zip)

#9 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49684

#10 Updated by Tymoteusz Motylewski about 3 years ago

  • TYPO3 Version changed from 6.2 to 8

Can not confirm the issue with v7.6.9, works perfectly there.
It's not a priority bugfix, so it will not go into 6.2

#11 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49684

#12 Updated by Gerrit Code Review about 3 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49684

#13 Updated by Tymoteusz Motylewski about 3 years ago

Testing instructions

- install the attached extension
- edit category record
- add inline relation at the bottom of the record (related_category field)
- without the patch, the category tree is not rendered in the inline child

#14 Updated by Tymoteusz Motylewski about 3 years ago

  • Target version changed from next-patchlevel to 8.4
  • Sprint Focus set to On Location Sprint

#15 Updated by Gerrit Code Review about 3 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49684

#16 Updated by Tymoteusz Motylewski about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#17 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF