TYPO3 Database migration from fluidcontent to flux

2020-03-25 22:43发布

I want to switch from fluidcontent to flux by removing the obsolete fluidcontent. As mentioned in here https://github.com/FluidTYPO3/fluidcontent/issues/424,

you have to change the CType for all fluidcontent objects in the tt_content table from fluidcontent_content to extensionnamewithoutunderscores_templatenamewithoutunderscores. Is there a migration script or a SQL statement available for this?

The tablename without Undescores is the filename. Why and where do i need the id of the flux:form?

标签: typo3 fluid
2条回答
该账号已被封号
2楼-- · 2020-03-25 23:17

As said in the linked page:
You will need some (one for each CE you defined) queries like

UPDATE tt_content
    SET CType = 'myextension_button'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'Vendor.MyExtension:Button.html'

you might need a list of used CEs (with count and ignoring deleted and hidden):

SELECT tx_fed_fcefile,count(*) 
  FROM tt_content
  WHERE CType = 'fluidcontent_content'
  GROUP BY tx_fed_fcefile
查看更多
ら.Afraid
3楼-- · 2020-03-25 23:35

A colleague made a SQL statement, which converts all fluidcontent CTypes to the correct flux value:

UPDATE tt_content 
 SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'flux_'), '.html', ''))
 WHERE CType = 'fluidcontent_content';

You only have to change YourNamespace.YourExtension. You can find the right wording for YourNamespace.YourExtension in the tx_fed_fcefile row.

For some reasons i had to replace the CType to flux_templatenamewithoutunderscores not to extensionnamewithoutunderscores_templatenamewithoutunderscores

查看更多
登录 后发表回答