From Kemna.Robin at gmail.com Thu Nov 2 15:22:47 2017 From: Kemna.Robin at gmail.com (Robin Kemna) Date: Thu, 02 Nov 2017 15:22:47 +0100 Subject: [TYPO3-dev] =?utf-8?q?_TCEForms_Backendmodul_-_generate_form_base?= =?utf-8?q?d_on_TCA_definition_and_use_data_manually_in_controller?= Message-ID: Envirement: TYPO3: v.8.7.4 Webserver: Apache PHP: 7.0.24 I intend to design a backendmodul where i can manage data saved behind a REST-API oder nativ Database (MariaDB). Further it should be possible to restrict access to different form fields based on the TYPO3 authorization concept. So i decided to use the already implemented functionality of TCA Form rendering which already includes the user-authorization concept as well as the generation of special form fields like date picker and so on. Therefore i used the following functions.. $nodeFactory = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(NodeFactory::class); $formResultCompiler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(FormResultCompiler::class); $formDataGroup = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TcaDatabaseRecord::class); $formDataCompiler = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup); $formDataCompilerInput = [ 'tableName' => '{tabellen_name}', 'command' => $command, ]; $formData = $formDataCompiler->compile($formDataCompilerInput); $formData['renderType'] = 'outerWrapContainer'; $formResult = $nodeFactory->create($formData)->render(); $formResultCompiler->mergeResult($formResult); $this->view->assign('form',$formResult); The form is getting rendered quiet perfectly but the required JavaScript is not. The documentation said that it should be delivered in the upper functions calls aswell.. but nothing. When i try to send the form, no data is send to the action, because all name attributes are not set properly. Data-name Attributes are set instead. Those should be converted to name attributes by the missing JavaScript. So i looked it up in other extensions and saw that the TYPO3/CMS/Backend/FormEngine AMD is needed. When using the AMD it ends up in following error.. logged in the consol Fehlermeldung: "Cannot read property 'formName' of undefined" (line 3) 1: var FormEngine = { 2: Validation: FormEngineValidation, 3: formName: TYPO3.settings.FormEngine.formName, 4: openedPopupWindow: null, 5: legacyFieldChangedCb: function() { !$.isFunction(TYPO3.settings.FormEngine.legacyFieldChangedCb) || 6: TYPO3.settings.FormEngine.legacyFieldChangedCb(); }, 7: browserUrl: '' 8: }; Does anybody got experience in this topic? You need more information, ask me! From info at bednarik.org Sat Nov 18 19:20:52 2017 From: info at bednarik.org (Jan Bednarik) Date: Sat, 18 Nov 2017 19:20:52 +0100 Subject: [TYPO3-dev] Translating records with ExtBase under 7.6 Message-ID: Hi, I'm creating records via FE and I'd like to translate them in FE as well. So far, what I've done is 1) Create record 2) Persist it 3) Create new record and copy all props from the original (except UID) 4) Set language and parent 5) Persist the translation 6) Redirect to edit #6 is where things go wrong. Although URL contains ID of the translation, I always get the original. If I somehow manage to get the translation at this point, then updating it updates the parent still. I found a few bug reports and one stated that this will be fixed in TYPO3 9. Is that true? Isn't there any way how to achive this under 7.6? Jan