Skip to content

Instantly share code, notes, and snippets.

@dacostafilipe
Created January 31, 2019 14:35
Show Gist options
  • Save dacostafilipe/a958750e4e4c4c5ac058cf62e63667d5 to your computer and use it in GitHub Desktop.
Save dacostafilipe/a958750e4e4c4c5ac058cf62e63667d5 to your computer and use it in GitHub Desktop.

Because fluidcontent is not supported anymore, we need to migrate to flux only usage for our content elements. We will also update flux to version 9.1.0 at the same time to improve performance.

Prepare Database

Before starting the migration process, we need to make changes to the database because some fields will be removed latter on.

When using fluidcontent the CType field of CEs is always fluidcontent_content and the right module is chosen via the tx_fed_fcefile field. With flux, tx_fed_fcefile is not used anymore but instead every CE has it's own CType.

flux expects following syntax for CType:

extensionnamewithoutunderscores_templatenamewithoutunderscores

This SQL query will automatically update all your content elements. Just remember to replace Vendor.extensionnamewithoutunderscores: and extensionnamewithoutunderscores_ to match your actual project.

UPDATE tt_content 
 SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'Vendor.extensionnamewithoutunderscores:', 'extensionnamewithoutunderscores_'), '.html', ''))
 WHERE CType = 'fluidcontent_content';

Source: https://stackoverflow.com/questions/50755107/typo3-database-migration-from-fluidcontent-to-flux

Update composer settings

Remove fluidcontent and set minimal version of flux to ^9.1.0 in your composer.json file then run:

composer update

Code changes

You will need to make some changes to your code to support the flux only CEs.

Update ContentController to use \FluidTYPO3\Flux\Controller\ContentController instead of \FluidTYPO3\Fluidcontent\Controller\ContentController.

Still in ContentController, you will need to replace every $this->settings to $this->data

If you have the workaround to support richtextConfiguration you will need to remove it from your ext_localconf.

Cache clear

Remember to clear all your caches via the install tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment