30/07 2012
Flux 4.7.0 and FED 4.7.1 released

Major update for Flux, smaller update for FED.

Dear developers,

I'm very happy to report the release of Flux 4.7.0 which is a major update and FED 4.7.1 which is a minor update. The FED updates contains no critical changes, just minor bugfixes and improvements performance on 4.5 by implementing the new Autoloader from Flux. More about this feature later; it is available to use in your extensions on 4.5 if you don't want to repeatedly reconstruct your ext_autoload.php files.

Now to describe the changes in Flux, in the order of importance:

Migrated to StructureProvider pattern (internal importance)

Everything inside the core of the FlexForm logic in Flux has been redone from scratch, except for the ViewHelpers which - naturally - have not had their arguments changed in any other way than added arguments. What does this mean for you? If you only use the high level features of Flux this will make no difference to you as a developer. If you have previously created ViewHelpers which add fields in a FlexForm or if your extension or site setup previously depended on the XML templates that contained FlexForm field definitions, you must update your code and setup to match the new structure. For the most part this only means slight changes to your ViewHelpers and/or templates that use the ViewHelpers depending on your integration approach.

As you can deduce from the above, the new logic no longer uses XML template files for the FlexForm fields. Instead raw Provider classes are used to convert the Flux configuration directly into TCA. It is safe to upgrade unless your situation matches the one described above.

Content copying, moving, localization; Page copying and localization

Flux content elements now support full localization, copying and moving of content elements with nested content elements and copying of pages that contain said content element types. To achieve this result two new fields and TCA definitions have been added which now contain the relationships between parent and child content elements. This also means that the reference index gets updated and because the 1:n relationship uses an "inline" TCA type, all nested content elements are now processed without the need for special considerations (such as is necessary in TemplaVoila). The result: faster operations, better standards compliance. And possibly a problem or two for you as content editor. Be careful before you start using localization and relying on content element copy operations; in order to ensure that your content gets treated correctly you should save each content element once. This is most easily done by changing to list view, selecting a single-table view of "Content Elements" then clicking the edit icon in the top of one of the displayed columns. This will give you a combined list of content element editing forms. Save this and each content element will have its relationship updated to support the new format. The FE ViewHelpers should fully support both formats in a long transition period but the BE processing now relies on the new format.

Another way to perform this necessary update is to write a small script which reads all tt_content records and sets the value of tt_content.tx_flux_parent to array_pop(explode(':', $row['tx_flux_column'])) - or an equivalent SQL function. This will not update the reference index but will ensure correct copying, moving and localization.

FlexForm Sections now possible inside SectionObjects

Not much to say about this one. If you so desire, you can now place flux:flexform.section with flux:flexform.object entries inside other flux:flexform.objects. There is no limit to how deep you can nest these (that is, except for the internal DB field size). An example situation is if you have a Section containing lists of FoodContainers of various types, each of these FoodContainers can now contain lists of FoodItems which can in turn contain lists of Ingredients etc.

Built-in FlexForm Objects and open Widget-based Object template support

A number of built-in, ready-to-use FlexForm Objects have been created. These can be used inside flux:flexform.section and allow you to quickly include different Object types in a minimum of space. The built-in Object types are: content, file, image, pages and video. All are located in the flux:flexform.object scope, i.e. flux:flexform.object.image. 

This new Widget-based SectionObject pattern also allows you to create your own libraries of Flux SectionObjects and provide them from your own extension. You can do this simply by creating your own implementation based on Tx_Flux_ViewHelpers_Flexform_Object_AbstractObjectViewHelper and using Tx_Flux_ViewHelpers_Object_Controller_StandardObjectController as Widget controller. Have a look at the included ViewHelpers and templates located in EXT:flux/Resources/Private/Partials/FlexForm/Object/ - extending the mentioned classes and following the template format allows you to create these SectionObjects with your own namespaces.

Custom FlexForm field with Fluid support

A new FlexForm field type, flux:flexform.field.custom, has been added to the collection. This field allows you to define the field as inline HTML directly in the FlexForm configuration. Variables containing a proper input field name and the current value are available. Example usage:

<flux:flexform.field.custom name="custom" label="Custom HTML field">
<input type="text" name="{parameters.itemFormElName}" value="{parameters.itemFormElValue}" /> <f:format.html>{myHelpText}</f:format.html>
</flux:flexform.field.custom> 

This is just a very basic example. There is no limit to what you can use as field HTML including Fluid ViewHelpers - except of course for ViewHelpers which only work in an FE context.

Single-sheet FlexForms compacted

If your FlexForm only contains a single sheet this sheet will now be compacted and removed, meaning that the fields will be displayed as a regular, non-sheet "ROOT"-type FlexForm. This does not affect how variables are treated or how fields are defined, it only changes the presentation of these variables and fields when editing the content element or page. If you used the sheet title to communicate important information, which is unlikely, please move this to for example a flux:flexform.field.html which simply outputs what you place inside it.

Easy to use Dynamic Autoloader for 4.5

A light, easy-to-use Autoloader has been added. It caches the collected class names, the cached file is cleared on regular cache clearing. You can use this Autoloader from your own extensions if developing for 4.5 - when development finishes you can of course replace it with a hardcoded autoload registry.

The way to use the Autoloader is to put this in ext_autoload.php (these two lines are all you need):

<?php
require_once t3lib_extMgm::extPath('flux', 'Classes/Utility/Autoload.php');
return Tx_Flux_Utility_Autoload::getAutoloadRegistryForExtension('myextensionkey');
?>

6.0 supported

As a bonus TYPO3 6.0 (currently alpha3) support has been added.

 

And that's about it. A lot of improvements in all areas, as promised with a focus on stability, localization and performance in that order. Also please note that the online documentation and XSD files have not yet been updated to reflect these new changes and ViewHelpers. If you have questions about using the new features that you can't figure out yourself you are welcome to contact me - as it may take a while for the documentation to be updated.

Any and all bugs you may encounter should be reported as quickly as possible. I will be able to focus on solving these bugs in the next week, after that fixes may come a bit slower. Keep an eye especially on your existing Flux FlexForms and fields which may act differently after this large change.

I hope you enjoy!

Cheers,
Claus

 

Archive

09/01 2017
09/11 2016
09/06 2016
21/12 2015
07/12 2015
25/11 2015
25/09 2015
22/09 2015
01/08 2015
10/03 2015
03/03 2015
12/02 2015
25/11 2014
01/11 2014
16/10 2014
02/10 2014
02/10 2014
19/09 2014
18/09 2014
05/09 2014
22/08 2014
02/08 2014
27/06 2014
06/06 2014
13/04 2014
27/03 2014
12/03 2014
11/03 2014
05/02 2014
25/01 2014
17/12 2013
08/12 2013
03/12 2013
04/11 2013
Flux 7.0 Teaser
06/08 2013
21/07 2013
10/06 2013
04/06 2013
01/06 2013
27/05 2013
19/05 2013
19/05 2013
11/05 2013
26/04 2013
30/03 2013
19/03 2013
17/03 2013
13/03 2013
10/03 2013
10/03 2013
05/03 2013
04/03 2013
03/03 2013
02/03 2013
01/03 2013
28/02 2013
27/02 2013
25/02 2013
24/02 2013
24/02 2013
23/02 2013
10/02 2013
03/02 2013
03/02 2013
27/01 2013
Asset management in Fluid
20/01 2013
16/01 2013
13/01 2013
08/01 2013
16/12 2012
25/11 2012
18/11 2012
08/11 2012
07/11 2012
05/11 2012
04/11 2012
28/10 2012
22/10 2012
14/10 2012
13/08 2012
08/08 2012
31/07 2012
30/07 2012
25/07 2012
29/04 2012
29/04 2012
22/04 2012
16/04 2012
21/03 2012
Flux 1.4.0 released
08/03 2012
Flux 1.3.0 released
04/03 2012
03/03 2012
28/02 2012
19/02 2012
A Sneaky Sneak Preview of the next version of Flux
13/02 2012
12/02 2012
06/02 2012
30/01 2012
27/01 2012
15/01 2012
26/12 2011
24/12 2011
11/12 2011
11/12 2011
10/12 2011
04/12 2011
04/12 2011
30/11 2011
26/11 2011
25/11 2011