Bug #57568
closed
Unable to select DB Mount in sys_action "create backend user"
Added by Christian Buelter over 10 years ago.
Updated over 8 years ago.
Description
Trying to add a new backend user with the sys_action module, I get the following error when I click on the iconf for "DB Mounts":
ReferenceError: setFormValueOpenBrowser is not defined
https://xxx/typo3/mod.php?M=user_task&moduleToken=d67570de912e959d4def97b04ee2e8c39fc5a8ad&SET[function]=sys_action.tx_sysaction_task&show=1
Tested on a fresh 6.2.0 installation.
Files
Having the same problem here.
The problems seems to be located at typo3\sysext\sys_action\Classes\ActionTask.php on line 569 (JSCode-Function).
Its using the deprecated function dbFileCon() which does not return any JS for me. Replacing with printNeededJSFunctions() will fix the javascript error and show up the browser on click but the selection wont be returned to the form value.
protected function JScode() {
$this->t3lib_TCEforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
$this->t3lib_TCEforms->backPath = $GLOBALS['BACK_PATH'];
$js = $this->t3lib_TCEforms->printNeededJSFunctions();
//$this->taskObject->doc->JScodeArray[] = $js;
//\TYPO3\CMS\Core\Utility\DebugUtility::debug($this->t3lib_TCEforms->printNeededJSFunctions());
return $js;
}
- Assignee set to Christian Buelter
(TYPO3 6.2.10)
I have inserted the code. The pop-up will open. But the selected entry we not taken.
- Assignee deleted (
Christian Buelter)
- Target version set to next-patchlevel
Just a note: Right now I'm using Extension "my_user_management" as a replacement for this core function.
Thank you for the tip. The extensions seems to be very useful but creating backend users by a model is not possible as it is with the sys action.
We solved this problem in our environment (TYPO3 6.2.11). In addition to the problem with the function JSCode() as reported by Teamgeist Medien above, we found that the form was missing a name attribute so the javascript can target the form (name="editform").
We also found that the groups assigned on creation of a new user were not shown just after creation. This was fixed too.
We join a patch file with the changes we made to file typo3/sysext/sys_action/Classes/ActionTask.php to solve the problem.
Unfortunately, the problem is also in 6.2.12. still not eliminated. Very very sad. Impossible.
But the patch works. Many Thanks.
- Status changed from New to Accepted
- Assignee set to Benni Mack
- Target version deleted (
next-patchlevel)
- Status changed from Accepted to Closed
- Assignee deleted (
Benni Mack)
I performed a test on 6.2.22, 7.6.7 and 8.2-dev and I was not able to reproduce the issue:
- on 6.2.22 the error does not appear and the user is saved
- on 7.6.7 and 8.2-dev the action "create backend user" does not let you decide the DB mount
therefore I close it as solved; if you think this is the wrong decision or experience the issue again, then let us know (on Slack for example - https://typo3.slack.com/ ) or open a new ticket and add a relation to this ticket number. Thank you
Also available in: Atom
PDF