Bug #58968

RefIndex error when saving files via MM table

Added by Bernhard Kraft over 5 years ago. Updated almost 4 years ago.

Should have
DataHandler aka TCEmain
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


Assume the following TCA:

        'mail_files' => array(
                'exclude' => 1,
                'label' => 'LLL:EXT:webconinstance/Resources/Private/Localization/locallang_db.xml:tx_seminars_seminars.mail_files',
                'config' => array(
                        'type' => 'group',
                        'internal_type' => 'file',
                        'allowed' => 'pdf,xls,xlsx',
                        'uploadfolder' => 'uploads/tx_seminars/',
                        'size' => 10,
                        'MM' => 'tx_seminars_seminars_mail_files_mm',
                        'maxitems' => 10,
                        'wizards' => $tempWizardSend,

When trying to save any files to such a field this will cause an error when trying to update refindex
See attached screenshot

The problem seems to be caused by the following lines because $this->currentTable isn't set.

                        // Update ref index; In tcemain it is not certain that this will happen because
                        // if only the MM field is changed the record itself is not updated and so the ref-index is not either.
                        // This could also have been fixed in updateDB in tcemain, however I decided to do it here ...
                        $this->updateRefIndex($this->currentTable, $uid);

bug-file-mm.png View (72.1 KB) Bernhard Kraft, 2014-05-21 13:35


#1 Updated by Markus Klein over 5 years ago

You didn't mention that this line comes from RelationHandler::writeMM() line 747.

Do have a call stack? Would be interesting why $this->currentTable is not initialized. Looks like the start() method is not called with enough parameters.

#2 Updated by Bernhard Kraft over 5 years ago

Ups. Forgot the screenshot. Here it is.

#3 Updated by Markus Klein over 5 years ago

->start() call is missing in line 2067

#4 Updated by Bernhard Kraft over 5 years ago

Seems so. But I assume just guessing the parameters and hoping it works wont be a solutino :)

I currently do not have time to dig into this any deeper.

#5 Updated by Mathias Schreiber almost 4 years ago

  • Target version deleted (next-patchlevel)

Also available in: Atom PDF