Project

General

Profile

Actions

Bug #46049

closed

Fatal Error in FlexFormService->convertFlexFormContentToArray()

Added by Stefan Derungs about 11 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2013-03-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When creating own Flexforms for extensions with different kind of field types (i.e. simple input/checkboxes/etc.), a fatal error occurs in class FlexFormService.

Fatal error: Cannot create references to/from string offsets nor overloaded objects in /.../typo3/sysext/extbase/Classes/Service/FlexFormService.php on line 58

The related code part:

public function convertFlexFormContentToArray($flexFormContent, $languagePointer = 'lDEF', $valuePointer = 'vDEF') {
  ...
      } else {
        $valueKeyParts = explode('.', $valueKey);
        $currentNode =& $settings;
        foreach ($valueKeyParts as $valueKeyPart) {
          *$currentNode =& $currentNode[$valueKeyPart];* // Fatal error occurs in this line
        }
  ...
}

I started wondering, if this is a bug of the current version (I use 6.0.2), as I can reproduce the error on several installations (with PHP 5.3.3) and the PHPUnit-Tests of Extbase only complete with errors.
Btw., it also doesn't matter of which type the flexform field is (input/int or input/select or check).


Files

bug46049.diff (3.87 KB) bug46049.diff Proposed patch Sven Carstens, 2016-04-20 17:01
Actions #1

Updated by Anja Leichsenring about 11 years ago

  • Status changed from New to Needs Feedback

Can you please provide some environment data of the server the error occures on? Furthermore an example of your Flexform and the plugin config using the Flexform would be helpful.

Very thanks

Actions #2

Updated by Alexander Schnitzler about 11 years ago

  • Target version set to Extbase 6.0
Actions #3

Updated by Anja Leichsenring almost 11 years ago

  • Target version changed from Extbase 6.0 to Extbase 6.3
Actions #4

Updated by Mohamed Masmoudi over 10 years ago

Fatal error: Cannot create references to/from string offsets nor overloaded objects in /.../typo3/sysext/extbase/Classes/Service/FlexFormService.php on line 58

i think a have the same problem, i'm using [TYPO3 6.0.10], and i added a plugin Google map go_maps_ext v1.2.1

Actions #5

Updated by Alexander Opitz over 9 years ago

  • Project changed from 534 to TYPO3 Core
  • Category changed from Extbase: Core to Extbase
  • Status changed from Needs Feedback to New
  • Target version changed from Extbase 6.3 to 7.0
  • TYPO3 Version set to 6.0
  • Is Regression set to No
Actions #6

Updated by Mathias Schreiber over 9 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)
Actions #7

Updated by Benni Mack almost 9 years ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
Actions #8

Updated by Susanne Moog over 8 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #9

Updated by Benni Mack over 8 years ago

  • Target version deleted (7.5)
Actions #10

Updated by Sven Carstens about 8 years ago

Backend
For me this error shows with flux based flexform plugins, as the backtrace shows that FluidTYPO3\Flux\Service\FluxService::convertFlexFormContentToArray is calling the FlexFormService.

Frontend
Frontend will show this error without flux, the backtrace shows that TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager->overrideConfigurationFromFlexForm is callinf the FlexFormService.

This error is triggered if the flexform content is mangled by changing the used plugins for a tt_content element instead of deleting and recreating the element.
Minimal flexform content to trigger the error for us is this (reduced from a live system):

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<T3FlexForms>
    <data>
        <sheet index="sDEF">
            <language index="lDEF">
                <field index="settings.links">
                    <el index="el">
                                                                               </el>
                </field>
                <field index="settings.links.headline">
                    <value index="vDEF"></value>
                </field>
            </language>
        </sheet>
    </data>
</T3FlexForms>
Actions #11

Updated by Sven Carstens about 8 years ago

Attached is a proposed patch to delegate the responsibility upstream.
The service will now throw an exception that needs to be handled by the caller (eg. FluxService)

Just silently discarding the error is not a valid option as the frontend plugin will not get the proper values the editor entered in the backend!

Actions #12

Updated by Georg Ringer about 4 years ago

still same output in 10

Actions #13

Updated by Benni Mack about 4 years ago

  • Status changed from New to Needs Feedback

Can someone actually confirm this in TYPO3 v10? I cannot, because if I use the change from Sven, it kind-a fatals all the time. It seems like this is/was a PHP issue which is now fixed in PHP 7.2+?

Actions #14

Updated by Gerrit Code Review about 4 years ago

  • Status changed from Needs Feedback 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/c/Packages/TYPO3.CMS/+/63769

Actions #15

Updated by Benni Mack about 4 years ago

  • Status changed from Under Review to Closed

after discussion, I recommend closing this issue - this seemed to be a PHP 5.x bug. Please let me know if we need to change something then I will re-open the ticket.

Actions

Also available in: Atom PDF