TYPO3数据库从流体内容迁移到流量

时间:2018-06-08 07:02:11

标签: typo3 fluid

我想通过去除过时的流体含量来从流体含量切换到流量。 正如此处https://github.com/FluidTYPO3/fluidcontent/issues/424所述,

您必须将tt_content表中所有fluidcontent对象的CType从fluidcontent_content更改为extensionnamewithoutunderscores_templatenamewithoutunderscores。 是否有可用的迁移脚本或SQL语句?

没有Undescores的tablename是文件名。为什么以及在哪里我需要flux:form的ID?

4 个答案:

答案 0 :(得分:7)

一位同事发表了一条SQL语句,它将所有流体内容CType转换为正确的通量值:

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

您只需要更改YourNamespace.YourExtension。您可以在tx_fed_fcefile行中找到YourNamespace.YourExtension的正确措辞。

由于某些原因,我不得不将CType替换为flux_templatenamewithoutunderscores而不是extensionnamewithoutunderscores_templatenamewithoutunderscores

答案 1 :(得分:1)

如链接页面所述:
您将需要一些(您定义的每个CE一个)查询,如

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

您可能需要使用CE的列表(包含计数并忽略已删除和隐藏):

SELECT tx_fed_fcefile,count(*) 
  FROM tt_content
  WHERE CType = 'fluidcontent_content'
  GROUP BY tx_fed_fcefile

答案 2 :(得分:1)

@kimomat的查询实际上非常好。 我只是添加了一些香料,以防您安装/使用了多个提供程序扩展。

UPDATE tt_content 
 SET CType = LOWER(REPLACE(REPLACE(tx_fed_fcefile, 'YourNamespace.YourExtension:', 'extensionnamewithoutunderscores_'), '.html', ''))
 WHERE CType = 'fluidcontent_content' AND `tx_fed_fcefile` LIKE 'YourNamespace.YourExtension%';
  • 运行每个提供程序扩展的查询。
  • YourNamespace.YourExtension使用的内容也可以从提供商扩展的ext_localconf.php文件中获得。
  • 例如,如果我的扩展名/键为 my_provider ,则extensionnamewithoutunderscores_将为myprovider_

可以在此处找到有关如何使流体含量达到助焊剂迁移的完整工作文章。 https://sigalambigha.home.blog/2020/04/29/how-to-migrate-fluidcontent-to-flux/

答案 3 :(得分:0)

这不是一个唯一的答案,但是对于所有人来说,拥有特定的应用程序对于特定的情况可能会有所帮助。在这种情况下,它是使用Flux的网站上fluidbootstraptheme和其他扩展名的升级。

首先检查需要更新的内容。

我在PhpMyAdmin中运行了此SQL

SELECT tx_fed_fcefile,count(*) 
  FROM tt_content
  WHERE CType = 'fluidcontent_content'
  GROUP BY tx_fed_fcefile

对于我的特定网站,这导致...

enter image description here

进行所需的数据库更新

现在在数据库中运行这些SQL语句,以修复每个需要更新的内容...

UPDATE tt_content
    SET CType = 'fluidbootstraptheme_button'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Button.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_carousel'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Carousel.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_embedvideo'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:EmbedVideo.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_imagegallery'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ImageGallery.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_modallight'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ModalLight.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_pageheader'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:PageHeader.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_row'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Row.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_simpleresponsiveimage'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:SimpleResponsiveImage.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_tabs'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Tabs.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_threecolumn'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThreeColumn.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_thumbnailbox'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:ThumbnailBox.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_twocolumn'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:TwoColumn.html'
UPDATE tt_content
    SET CType = 'fluidbootstraptheme_well'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'FluidBT.Fluidbootstraptheme:Well.html'
UPDATE tt_content
    SET CType = 'netchd_mycontentelement'
    WHERE CType = 'fluidcontent_content'
      AND tx_fed_fcefile = 'rapidfyre_netchd:MyContentElement.html'

如果更新为Flux> 6,请不要忘记运行Flux升级脚本

进行上述SQL更新后,某些内容仍未显示在ThreeColumns和其他具有嵌套内容的fluidbootstraptheme内容元素中。因此,我转到了后端的扩展,并以通量方式运行了更新脚本<​​/ strong>,它似乎可以解决此问题……结果是

tt_content:713 on page 1 has new colPos 27502
tt_content:599 on page 1 has new colPos 27502
tt_content:612 on page 1 has new colPos 27502
tt_content:167 on page 38 has new colPos 22001
tt_content:168 on page 38 has new colPos 22002
tt_content:169 on page 38 has new colPos 22002
tt_content:417 on page 1 has new colPos 41500
tt_content:276 on page 1 has new colPos 27503
tt_content:264 on page 1 has new colPos 27502
tt_content:277 on page 166 has new colPos 28501
tt_content:286 on page 166 has new colPos 28502
tt_content:288 on page 166 has new colPos 28502
tt_content:289 on page 166 has new colPos 28502
tt_content:294 on page 173 has new colPos 32701
tt_content:328 on page 173 has new colPos 32701
tt_content:330 on page 1 has new colPos 27501
tt_content:300 on page 166 has new colPos 28502
tt_content:313 on page 17 has new colPos 31201
tt_content:314 on page 17 has new colPos 31202
tt_content:315 on page 17 has new colPos 31203
tt_content:326 on page 1 has new colPos 27501
tt_content:329 on page 173 has new colPos 32702
tt_content:341 on page 1 has new colPos 27503
tt_content:333 on page 173 has new colPos 32702
tt_content:337 on page 186 has new colPos 33602
tt_content:334 on page 186 has new colPos 33601
tt_content:338 on page 186 has new colPos 33602
tt_content:339 on page 186 has new colPos 33602
tt_content:354 on page 1 has new colPos 27502
tt_content:358 on page 1 has new colPos 27503
tt_content:387 on page 1 has new colPos 27503
tt_content:360 on page 1 has new colPos 27503
tt_content:388 on page 1 has new colPos 27503
tt_content:699 on page 1 has new colPos 27503
tt_content:698 on page 1 has new colPos 27503
tt_content:487 on page 1 has new colPos 27502
tt_content:371 on page 1 has new colPos 27502
tt_content:372 on page 1 has new colPos 27502
tt_content:392 on page 1 has new colPos 27503
tt_content:386 on page 1 has new colPos 27503
tt_content:436 on page 1 has new colPos 27503
tt_content:389 on page 1 has new colPos 27503
tt_content:397 on page 1 has new colPos 27503
tt_content:398 on page 1 has new colPos 27503
tt_content:414 on page 1 has new colPos 41500
tt_content:415 on page 1 has new colPos 27503
tt_content:416 on page 1 has new colPos 41500
tt_content:418 on page 1 has new colPos 41500
tt_content:419 on page 1 has new colPos 41500
tt_content:430 on page 1 has new colPos 41500
tt_content:435 on page 1 has new colPos 27502
tt_content:438 on page 1 has new colPos 27503
tt_content:437 on page 1 has new colPos 27503
tt_content:441 on page 1 has new colPos 27502
tt_content:457 on page 1 has new colPos 27503
tt_content:595 on page 1 has new colPos 27503
tt_content:479 on page 1 has new colPos 27503
tt_content:484 on page 1 has new colPos 27502
tt_content:480 on page 1 has new colPos 27502
tt_content:483 on page 1 has new colPos 27502
tt_content:495 on page 1 has new colPos 27503
tt_content:526 on page 230 has new colPos 52802
tt_content:529 on page 230 has new colPos 52801
tt_content:536 on page 1 has new colPos 27502
tt_content:545 on page 1 has new colPos 27502
tt_content:567 on page 1 has new colPos 27502
tt_content:594 on page 1 has new colPos 27503
tt_content:546 on page 1 has new colPos 27502
tt_content:568 on page 1 has new colPos 27502
tt_content:569 on page 1 has new colPos 27502
tt_content:578 on page 1 has new colPos 27502
tt_content:583 on page 1 has new colPos 27502
tt_content:584 on page 1 has new colPos 27502
tt_content:590 on page 1 has new colPos 27502
tt_content:593 on page 1 has new colPos 27502
tt_content:597 on page 1 has new colPos 27503
tt_content:598 on page 1 has new colPos 27502
tt_content:600 on page 1 has new colPos 27503
tt_content:609 on page 1 has new colPos 27503
tt_content:601 on page 250 has new colPos 60401
tt_content:602 on page 250 has new colPos 60401
tt_content:603 on page 250 has new colPos 60402
tt_content:607 on page 250 has new colPos 60402
tt_content:608 on page 250 has new colPos 60402
tt_content:610 on page 1 has new colPos 27502
tt_content:620 on page 1 has new colPos 27503
tt_content:628 on page 252 has new colPos 62701
tt_content:631 on page 252 has new colPos 62702
tt_content:636 on page 252 has new colPos 62702
tt_content:638 on page 1 has new colPos 27503
tt_content:643 on page 253 has new colPos 64102
tt_content:647 on page 253 has new colPos 64601
tt_content:648 on page 253 has new colPos 64602
tt_content:649 on page 253 has new colPos 64101
tt_content:654 on page 139 has new colPos 65301
tt_content:655 on page 139 has new colPos 65302
tt_content:670 on page 1 has new colPos 27503
tt_content:697 on page 1 has new colPos 27503
tt_content:689 on page 240 has new colPos 68802
tt_content:690 on page 240 has new colPos 68801
tt_content:691 on page 240 has new colPos 68803
tt_content:700 on page 1 has new colPos 27503
tt_content:711 on page 1 has new colPos 27502
tt_content:712 on page 1 has new colPos 27502
tt_content:714 on page 1 has new colPos 27502