Issue Bug Closed

#76232IconFactory::getIconForRecord() throws an exception in some cases (contrary to former feedback)

Petra Arentzen 05/18/16, 17:05 updated 10/02/18, 11:12

Description

Contrary to my former feedback for bug #75271 the exception occurred again (Now tested in 7.6.6 and 7.6.7)

I can tell that the problem occurrs with the following TCA column configuration:

                'type' => 'group',
                'internal_type' => 'db',
                'allowed' => 'my_relation_table',
                'prepend_tname' => 0,
               'show_thumbs' => '1',

It’s because in TYPO3\CMS\Backend\Form\Element\GroupElement::render() line 275 spliting is done for db value

list($this_table, $this_uid) = BackendUtility::splitTable_Uid($recordParts[0]);

But because 'prepend_tname' is false there is no table name. The value then only contains a number but not a table name.

I added this after the line obove to solve the problem and it worked for me!

                    // if 'prepend_tname' is false $this_table is empty
                    if (!$this_table) {
                        $this_table = reset($allowed);
                    }

Reviews 4