Bug #80426


Creating a FlexForm section causes exception in ajax request (none admin user)

Added by Benjamin no-lastname-given about 7 years ago. Updated over 6 years ago.

Must have
FormEngine aka TCEforms
Target version:
Start date:
Due date:
% Done:


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


I can´t add a new flexform section because the ajax request that´s being made gets a typo3 exception.

This does not happen with a admin account.
Only a default be-user triggers this error. (In my case this be-user is not limited to any languages)

The problem is, that the $result form DatabaseUserPermissionCheck::addData is not correctly filled.

I made a quick&dirty workaround here:

Files (4.39 KB) Marcus Schwemer, 2017-03-27 15:08

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Task #80100: Bypass fetch of database record if already loadedClosedXavier Perseguers2017-03-02

Related to TYPO3 Core - Bug #80473: Do not bypass fetch of database record if tableName is tt_contentClosedFaton Haliti2017-03-27

Related to TYPO3 Core - Bug #80825: FlexForm Sections don't get saved before the parent record was stored to the DBClosedChristian Kuhn2017-04-12

Actions #1

Updated by Benjamin no-lastname-given about 7 years ago

  • Category changed from Frontend to FormEngine aka TCEforms
Actions #2

Updated by Wouter Wolters about 7 years ago

  • Status changed from New to Needs Feedback

Could provide us with some more information what the exact error is you get?
Is it possible to attach a test extension that can reproduce this error on current master?

Actions #3

Updated by Marcus Schwemer about 7 years ago

Sounds like the same what we are experiencing currently.

We have a content element where editors can add one or more items to a list via a flexform.

If editors create a new ce, they can add as many items as they want. If the save it and then try to add a new item, it results in an error 500. Looking at the console, reveils an error 500. The exception message is

    No content edit permission for user 2 on page root node

This is "right", because the user does not have permission to edit on the root page. On the other hand, this is the explanation, why this does not "harm" admin users. They are allowed to edit records on uid 0.

The ajax request in both cases (new ce and saved ce) is:


I'm using the current master with php 7.0

Actions #4

Updated by Marcus Schwemer about 7 years ago

Here is a basic example extension, which contains an additional CE building a link list. Only the backend stuff is included ...

Actions #5

Updated by Markus Sommer about 7 years ago

Actions #6

Updated by Alex Kellner about 7 years ago

Our current workarround to get this issue done for two new content elements is to add an own FormDataProvider. Thx to Markus Sommer for the quick fix.
Maybe someone else needs this.

ext_tables.php of the template extension:

$class = \In2code\In2template\Backend\FormDataProvider\FixEditorPermissions::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'][$class] = [
    'before' => [


declare(strict_types = 1);
namespace In2code\In2template\Backend\FormDataProvider;

use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
use TYPO3\CMS\Backend\Utility\BackendUtility;

 * Resolve return Url if not set otherwise.
 * This fixes FlexForm with inline elements. Editors can not add new itemsets.
 * An error 500 is thrown in browser console that's not allowed to add new items to page with uid=0.
class FixEditorPermissions implements FormDataProviderInterface

     * @param array $result
     * @return array
    public function addData(array $result)
        if ($result['tableName'] === 'tt_content') {
            $result['databaseRow'] = BackendUtility::getRecord($result['tableName'], $result['databaseRowUid']);
        return $result;

Actions #7

Updated by Christian Kuhn about 7 years ago

I'm able to reproduce the issue with the extension and will review the proposed pending fix now.

Actions #8

Updated by Gerrit Code Review about 7 years ago

  • Status changed from Needs Feedback to Under Review

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

Actions #9

Updated by Xavier Perseguers about 7 years ago

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

Updated by Daniel Goerz about 7 years ago

  • Related to Bug #80825: FlexForm Sections don't get saved before the parent record was stored to the DB added
Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF