{"action":"created","issue":{"url":"https://api.github.com/repos/FluidTYPO3/flux/issues/898","labels_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/898/labels{/name}","comments_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/898/comments","events_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/898/events","html_url":"https://github.com/FluidTYPO3/flux/issues/898","id":102336399,"number":898,"title":"flux:field.inline.fal workspace issue on editing in draft","user":{"login":"mkrappitz","id":5528239,"avatar_url":"https://avatars.githubusercontent.com/u/5528239?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrappitz","html_url":"https://github.com/mkrappitz","followers_url":"https://api.github.com/users/mkrappitz/followers","following_url":"https://api.github.com/users/mkrappitz/following{/other_user}","gists_url":"https://api.github.com/users/mkrappitz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrappitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrappitz/subscriptions","organizations_url":"https://api.github.com/users/mkrappitz/orgs","repos_url":"https://api.github.com/users/mkrappitz/repos","events_url":"https://api.github.com/users/mkrappitz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrappitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T09:22:36Z","updated_at":"2015-08-21T09:26:28Z","closed_at":null,"body":"Given the following EXT:fluidcontent content element for example with a flux:field.inline.fal field:\r\n\r\n```html\r\n{namespace flux=FluidTYPO3\\Flux\\ViewHelpers}\r\n{namespace v=FluidTYPO3\\Vhs\\ViewHelpers}\r\n\r\n<f:layout name=\"Content\" />\r\n\r\n<f:section name=\"Configuration\">\r\n\t<flux:form id=\"image\" label=\"Image\" description=\"Image\" options=\"{Fluidcontent: {sorting: 05}, group: 'FCE'}\">\r\n\t\t<flux:field.select name=\"position\" label=\"Position\" items=\"{pos1 : 'Position 1', pos2: 'Position 2'}\" />\r\n\t\t<flux:field.inline.fal name=\"images\" label=\"Image\" minItems=\"1\" maxItems=\"1\" collapseAll=\"TRUE\" />\r\n\t</flux:form>\r\n</f:section>\r\n\r\n<f:section name=\"Preview\">\r\n\t...\r\n</f:section>\r\n\r\n<f:section name=\"Main\">\r\n\t<f:for each=\"{v:content.resources.fal(field: 'images')}\" as=\"image\">\r\n\t\t<f:image treatIdAsReference=\"TRUE\" src=\"{image.id}\" alt=\"{image.alternative}\" title=\"{image.title}\" />\r\n\t</f:for>\r\n</f:section>\r\n```\r\n\r\nIt all works fine in the live workspace but starts to become erroneous in a draft workspace. Creating new EXT.fludicontent elements in draft workspace of this kind and publish to live workspace works fine though.\r\n\r\nBut if you edit an element of this kind which already exists in live workspace in a draft workspace in any field (even not in the fal field - for example here the position select field), it results in doubling the fal file references in the element directly after the edit in the draft workspace. You can also track this in the mysql table sys_file_reference, after this kind of edit in the draft workspace there are two new entries in the table which is one too much. There is a new \"INITIAL PLACEHOLDER\" and a \"First draft version\" record being created in the sys_file_reference table being created. \r\n\r\nDoing just to double check the same scenario with EXT:dce, having an inline FAL field (code as follows) and a simple text field in the flexible content element, it works fine. With the above actions only  a new \"Auto-created for WS #1\" entry in the sys_file_reference table got created. This was just done to prove that not the TYPO3 core is the source of error here with a generel \"fal within flexform\"-issue.\r\n\r\nDCE fal field which works fine:\r\n```xml\r\n<config>\r\n\t<type>inline</type>\r\n\t<foreign_table>sys_file_reference</foreign_table>\r\n\t<foreign_field>uid_foreign</foreign_field>\r\n\t<foreign_sortby>sorting_foreign</foreign_sortby>\r\n\t<foreign_table_field>tablenames</foreign_table_field>\r\n\t<foreign_match_fields>\r\n\t\t<fieldname>image</fieldname> <!-- Name of variable! -->\r\n\t</foreign_match_fields>\r\n\t<foreign_label>uid_local</foreign_label>\r\n\t<foreign_selector>uid_local</foreign_selector>\r\n\t<foreign_selector_fieldTcaOverride>\r\n\t\t<config>\r\n\t\t\t<appearance>\r\n\t\t\t\t<elementBrowserType>file</elementBrowserType>\r\n\t<elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai</elementBrowserAllowed>\r\n\t\t\t</appearance>\r\n\t\t</config>\r\n\t</foreign_selector_fieldTcaOverride>\r\n\t<foreign_types type=\"array\">\r\n\t\t<numIndex index=\"2\">\r\n\t\t\t<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>\r\n\t\t</numIndex>\r\n\t</foreign_types>\r\n\t<minitems>0</minitems>\r\n\t<maxitems>99</maxitems>\r\n\t<appearance>\r\n\t\t<useSortable>1</useSortable>\r\n\t\t<headerThumbnail>\r\n\t\t\t<field>uid_local</field>\r\n\t\t\t<width>45c</width>\r\n\t\t\t<height>45</height>\r\n\t\t</headerThumbnail>\r\n\t\t<showPossibleLocalizationRecords>0</showPossibleLocalizationRecords>\r\n\t\t<showRemovedLocalizationRecords>0</showRemovedLocalizationRecords>\r\n\t\t<showSynchronizationLink>0</showSynchronizationLink>\r\n\t\t<useSortable>1</useSortable>\r\n\t\t<enabledControls>\r\n\t\t\t<info>1</info>\r\n\t\t\t<new>0</new>\r\n\t\t\t<dragdrop>0</dragdrop>\r\n\t\t\t<sort>1</sort>\r\n\t\t\t<hide>1</hide>\r\n\t\t\t<delete>1</delete>\r\n\t\t\t<localize>1</localize>\r\n\t\t</enabledControls>\r\n<createNewRelationLinkTitle>LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>\r\n\t</appearance>\r\n\r\n\t<behaviour>\r\n\t\t<localizationMode>select</localizationMode>\r\n\t\t<localizeChildrenAtParentLocalization>1</localizeChildrenAtParentLocalization>\r\n\t</behaviour>\r\n</config>\r\n```\r\n\r\nTested on TYPO3 CMS 6.2.14 and 7.4.0\r\nEXT:flux 7.2.1\r\nEXT:vhs 2.3.3\r\nEXT:fluidcontent 4.3.1"},"comment":{"url":"https://api.github.com/repos/FluidTYPO3/flux/issues/comments/133347783","html_url":"https://github.com/FluidTYPO3/flux/issues/898#issuecomment-133347783","issue_url":"https://api.github.com/repos/FluidTYPO3/flux/issues/898","id":133347783,"user":{"login":"mkrappitz","id":5528239,"avatar_url":"https://avatars.githubusercontent.com/u/5528239?v=3","gravatar_id":"","url":"https://api.github.com/users/mkrappitz","html_url":"https://github.com/mkrappitz","followers_url":"https://api.github.com/users/mkrappitz/followers","following_url":"https://api.github.com/users/mkrappitz/following{/other_user}","gists_url":"https://api.github.com/users/mkrappitz/gists{/gist_id}","starred_url":"https://api.github.com/users/mkrappitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkrappitz/subscriptions","organizations_url":"https://api.github.com/users/mkrappitz/orgs","repos_url":"https://api.github.com/users/mkrappitz/repos","events_url":"https://api.github.com/users/mkrappitz/events{/privacy}","received_events_url":"https://api.github.com/users/mkrappitz/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T09:26:28Z","updated_at":"2015-08-21T09:26:28Z","body":"See also EXT:vhs #896 which might not be an issue if this here would get fixed. But this is mostly speculation."}}