Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Switch to flux #424

Open
DallyJo opened this issue Mar 7, 2018 · 13 comments
Open

Switch to flux #424

DallyJo opened this issue Mar 7, 2018 · 13 comments

Comments

@DallyJo
Copy link

DallyJo commented Mar 7, 2018

I accidentally build my new Typo3 Page with flux and fluidcontent and unfortunatelly didn't read that fluidcontent is obsolte.
Is there an easy way to remove fluidcontent from my current installation and switch to flux so it can "take over" as it is described in the documentation.
What i've done since now:

  • removed fluidcontent from dependencies in ext_emconf.php
  • disabled fluidcontent in extension manager

All my existing content elements are showing an error like "Value is not allowed: "fluidcontent_content".

@MrMooky
Copy link

MrMooky commented Apr 19, 2018

Same problem here. I was told to "just uninstall fluidcontent", but that caused the same error message you are describing.

@NamelessCoder
Copy link
Member

While it is true that you simply uninstall fluidcontent to make flux do the work, I or whomever told you, may have forgotten to also mention that you will get new CType values if you do not use a custom controller (which most people don't). I suggest either creating a new instance of your content type and checking the CType value, or inspecting the TS tt_content. object, or inferring it based on the extensionnamewithoutunderscores_templatenamewithoutunderscores convention (hope you understand that one; it's a mangled form of extension name plus virtual controller action name, like Extbase plugins will do!).

@iamandrewluca
Copy link

Real Example. Having

my_extension/Resources/Private/Templates/Content/Button.html

In DB table tt_content I have column CType with

myextension_button

To migrate current Content Elements, check column tx_fed_fcefile, you'll have something

Vendor.MyExtension:Button.html

And replace CType column which current is fluidcontent_content with myextension_button

@kimchristiansen
Copy link

We build a SQL statement to convert the CType. You can see the SQL statement in the stackoverflow thread

@mschmitz89
Copy link

mschmitz89 commented Jun 15, 2018

With uninstalling fluidcontent I don't see my elements in BE content wizard anymore.
At TypoScript Object Browser under tt_content I can't see them neither.

Anyone a hint? Could there be further changes at TypoScript/Templates necessary?

PS: I use latest TYPO3 8.7 and latest versions of flux, vhs etc.

Thanks!

@iamandrewluca
Copy link

You need to make a manual database upgrade, see above 2 posts

@mschmitz89
Copy link

mschmitz89 commented Jun 15, 2018

Thank you for your response!

I did this, but nevertheless my elements didn't show up in the backend content wizard.

Additionally the sites with the updated content elements show an error like
"content_icon_providerextension:teaserbox_1" is not a valid cache entry identifier.
"providerextension:teaserbox" is my CType, the "1" is the UID, but don't know where "content_icon_" comes from.

Maybe my extra root path is the problem:
lib.fluidContent.partialRootPaths.100 ={$plugin.tx_providerextension.resPathPrivate}Partials/Content/

@iamandrewluca
Copy link

iamandrewluca commented Jun 20, 2018

@mschmitz89 are you sure that providerextension:teaserbox is correct ?!?
CType should be providerextension_teaserbox

@iamandrewluca
Copy link

Also this is for fluidcontent, not fluid_styled_content or fluidcontent_core

@mschmitz89
Copy link

Next try:
I've removed the fluidcontent extension and after this, my custom content elements are not listed in the content element wizard anymore.

Without the database update it is obvious, that my old custom content elements doesn't work anymore, but that I can't add new elements (because they are not shown in the BE) seems like another problem.

Maybe there must be add something else at ext_localconf.php than this?

<?php
if (!defined('TYPO3_MODE')) {
	die ('Access denied.');
}

\FluidTYPO3\Flux\Core::registerProviderExtensionKey('my_template', 'Content');

Any help would be greatly appreciated!

@MrMooky
Copy link

MrMooky commented Aug 23, 2018

@mschmitz89 Your name somewhat suggests you are ok with german, have a look here: https://www.aemka.de/news/fluid-content-inhaltselemente-ohne-extfluidcontent.html

@NamelessCoder
Copy link
Member

NamelessCoder commented Aug 23, 2018

@MrMooky Flux detects templates like Fluidcontent does - you do not need to register each one. In fact it understands the exact same registration function call you used in Fluidcontent before, so you shouldn't need to change anything except migrate DB and uninstall Fluidcontent.

@mschmitz89 Make sure your templates actually work before you try the migration. There are new requirements to arguments for flux:grid.column for example. Check the Flux migration script if it is available in the EM, it can analyse your templates (if it is not shown, you've removed the legacy Flux fields from DB schema and there is nothing to migrate or analyse).

If the template file can't be parsed, the element can't be used. Whereas Fluidcontent might allow you to see the entry - but cause errors if you try to use it.

@mschmitz89
Copy link

mschmitz89 commented Aug 24, 2018

It's working now!

I've update from latest flux 8.x to newest 9.x version.
After that, my content elements were found! I've done the database updates for my custom content elements @MrMooky mentionend in his link afterwards.
Like @NamelessCoder said, I had to add a colPos to flux:grid.column to get all of my custom content elements work.
Furthermore I had to add an ContentController.php with the following content to my provider extension to get it work in the FE, too.

<?php

namespace MyVendor\MyProviderExtension\Controller;

class ContentController extends \FluidTYPO3\Flux\Controller\ContentController {

}

Thank you very much for your help!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants