#64845IRRE: Create new not working with foreign_selector (current master)
Description
If I use a foreign_selector and the current master I cannot create a new element.
Selecting an old one works.
Error:
[Wed Feb 04 11:15:42.821654 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP Catchable fatal error: Argument 2 passed to TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement::checkFileTypeAccessForField() must be of the type array, boolean given, called in {docRoot}/typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php on line 1327 and defined in {docRoot}/typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php on line 1378, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821691 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP Stack trace:, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821707 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 1. {main}() {docRoot}/typo3_src/typo3/ajax.php:0, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821721 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 2. TYPO3\\CMS\\Core\\Utility\\GeneralUtility::callUserFunction() {docRoot}/typo3_src/typo3/ajax.php:80, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821734 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 3. call_user_func_array() {docRoot}/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:4159, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821764 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 4. TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement->processAjaxRequest() {docRoot}/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:4159, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821778 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 5. call_user_func_array() {docRoot}/typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php:1134, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821790 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 6. TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement->createNewRecord() {docRoot}/typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php:1134, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
[Wed Feb 04 11:15:42.821803 2015] [:error] [pid 23403] [client 127.0.0.1:48062] PHP 7. TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement->checkFileTypeAccessForField() {docRoot}/typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php:1327, referer: http://typo3-test.local/typo3/alt_doc.php?returnUrl=mod.php%3FM%3Dweb_list%26moduleToken%3Dbe7ebdfabb744314c6a979e4b1e6b2ff8b5bbc96%26id%3D1%26imagemode%3D1&edit%5Btx_demoinline_domain_model_news%5D%5B1%5D=new
I am not completely sure but I think the issue is that the $foreignUid for this method call
$fileRecord = $this->getRecord(0, $selConfig['table'], $foreignUid);
seems to contain something like this:
{"config":{"type":"inline","foreign_table":"tx_demoinline_domain_model_person_mm","foreign_field":"uid_foreign","foreign_sortby":"sorting_foreign","foreign_table_field":"tablenames","foreign_match_fields":{"fieldname":"person"},"foreign_types":{"1":{"showitem":"person"}},"foreign_types_combination":{"1":{"showitem":"first_name"}},"foreign_label":"person","foreign_selector":"person","foreign_unique":"person","size":10,"minitems":0,"maxitems":1,"appearance":{"useSortable":true,"useCombination":true,"suppressCombinationWarning":true,"collapseAll":false,"expandSingle":true,"levelLinksPosition":"top","removeCreateNewRelationLink":true,"showSynchronizationLink":false,"showPossibleRecordsSelector":true,"showPossibleLocalizationRecords":false,"showAllLocalizationLink":false,"enabledControls":{"info":true,"new":false,"dragdrop":true,"sort":false,"hide":true,"delete":true,"localize":false}},"behaviour":{"disableMovingChildrenWithParent":true},"form_type":"inline","inline":{"first":false,"last":false}},"hmac":"c2647f7bdd93e1d6ab442a35917ba8fac1852b1b"}