Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new or open existing #8

Open
gitradbaron opened this issue Sep 22, 2023 · 9 comments
Open

Adding new or open existing #8

gitradbaron opened this issue Sep 22, 2023 · 9 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@gitradbaron
Copy link

Hi,

Adding new or open existing elements there is an 503 error. typo3 11.5.31 / PHP 8.1.x
Invalid TCA internal_type of field "images" in table tt_content: Must not be set, or set to "folder".

Greetings

@franzholz franzholz added bug Something isn't working good first issue Good for newcomers question Further information is requested and removed bug Something isn't working labels Sep 23, 2023
@franzholz
Copy link
Owner

Can you check the flexform XML files about the "internal_type"?

I do not find anywhere a place where 'internal_type' has been set to 'folder'.

They are all either "db" or "file".

@franzholz
Copy link
Owner

Maybe you have already stored the flexform in an old format.

See this documentation.

https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/FlexForms/Index.html

**Tip

The data structure of a FlexForm may change over time. Also, when switching from one plugin with a FlexForm to another plugin with a FlexForm in an element, the old values are not removed in the FlexForm field. This may cause problems and errors. You can avoid this by calling the CLI command cleanup:flexforms which is provided by the lowlevel system extension. It updates all database records which have a FlexForm field and the XML data does not match the chosen data structure.**

@gitradbaron
Copy link
Author

Thank you for your answers. For the moment I haven't had any success with the suggestions:

  • I searched !all extensions for internal_type in flexform XML Files: without success - all "db" or "file"
  • your tip: I ran CLI - same result
  • for testing: pi_flexform set to NULL in Database (for the extension entries and later for all entries in table tt_content set to NULL): still the same error
  • i deleted all entries from imagecycle - tried to insert a new one - i got the error
    Further analyzes now stopped. I thought I would get the extensions to work again - but not at the moment.

For now: thank you for your help!

@franzholz
Copy link
Owner

See the file 'TYPO3/typo3_src-11.5.31/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaGroup.php' line 151.

throw new \UnexpectedValueException(
    'Invalid TCA internal_type of field "' . $fieldName . '" in table ' . $result['tableName']
    . ': Must not be set, or set to "folder".',
    1438780511
);

Add a debug entry with backtrace there. Try to debug the reason from where this exception is thrown.

@franzholz
Copy link
Owner

Oh, I have found this:

https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ColumnsConfig/Type/Group/Properties/InternalType.html

Deprecated since version 9.5: The internal types file and file_reference have been deprecated with TYPO3 9 and removed with TYPO3 10. Extensions that used group fields with these internal types should switch to use FAL references based on type=inline instead.

@franzholz franzholz added bug Something isn't working and removed question Further information is requested labels Sep 26, 2023
@franzholz
Copy link
Owner

franzholz commented Sep 26, 2023

Todo:
All flexforms parts having

<type>group</type>
<internal_type>file</internal_type>

must be replaced by a similar thing like this:

<config>
    <type>inline</type>
    <foreign_table>sys_file_reference</foreign_table>
    <foreign_field>uid_foreign</foreign_field>
    <foreign_sortby>sorting_foreign</foreign_sortby>
    <foreign_table_field>tablenames</foreign_table_field>
    <foreign_match_fields>
        <fieldname>fal</fieldname>
    </foreign_match_fields>
    <foreign_label>uid_local</foreign_label>
    <foreign_selector>uid_local</foreign_selector>
    <filter>
        <userFunc>TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren</userFunc>
        <parameters type="array">
            <allowedFileExtensions>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai</allowedFileExtensions>
            <disallowedFileExtensions>ai</disallowedFileExtensions>
        </parameters>
    </filter>
    <appearance>
        <useSortable>1</useSortable>
        <headerThumbnail>
            <field>uid_local</field>
            <width>45</width>
            <height>45c</height>
        </headerThumbnail>
        <showPossibleLocalizationRecords>0</showPossibleLocalizationRecords>
        <showSynchronizationLink>0</showSynchronizationLink>
        <showAllLocalizationLink>0</showAllLocalizationLink>
        <enabledControls>
            <info>1</info>
            <new>0</new>
            <dragdrop>1</dragdrop>
            <sort>0</sort>
            <hide>1</hide>
            <delete>1</delete>
            <localize>1</localize>
        </enabledControls>
        <createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
    </appearance>

Could you provide a patch for this?

See https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ColumnsConfig/Type/Inline/Examples.html#tca-example-inline-fal-inline-1 .

@franzholz
Copy link
Owner

@gitradbaron
Copy link
Author

Could you provide a patch for this?

for the moment not really.

If it's not urgent, I can try it in the future but not in the near future…

@franzholz
Copy link
Owner

Maybe TYPO3 12 will provide an Install Tool Migration Tool for this.
See https://forge.typo3.org/issues/102041#change-502278

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants