GithubHelp home page GithubHelp logo

fluidtypo3 / flux Goto Github PK

View Code? Open in Web Editor NEW
148.0 5.0 213.0 8.81 MB

TYPO3 extension Flux: Dynamic Fluid FlexForms

Home Page: https://fluidtypo3.org

PHP 98.55% HTML 1.00% JavaScript 0.40% CSS 0.05%

flux's Introduction

Flux

Coverage Status Documentation Coverage Status

Flux automates integration of Fluid with TYPO3 and makes Fluid the entry point for developers. The name "Flux" has multiple meanings but in this context, it mainly refers to the gel-like fluid used when soldering components together in electronic hardware, making it easier to create a bond between components and improves the durability of the bond.

Flux has two main purposes:

  1. Allow developers to configure TYPO3's page templates and add custom content types using Fluid templates, without the need for detailed knowledge about how TYPO3 usually requires such setup to be done.
  2. Allow embedding of metadata such as which fields to show when editing a content element, descriptions of the content or page template, and more.

Bonus feature: nested content areas to create content grids.

Documentation

How it works

Flux has two main modes of operation - either you allow Flux to automatically create a site-wide "design" folder to contain your template files, which provides a 100% out of the box experience. Or you prefer to have a more advanced and controlled integration, in which case you disable the automatic creation of site-wide template folders and provide your own (through an extension).

The automatic mode of operation is the default. This means Flux is an ideal starting point if you have zero knowledge about how to set up TYPO3. You can start with the automation and as you learn more about TYPO3, you can refine your integration and continuously improve how it works. Or keep using the automation in case it fits all your needs.

To get started you only need to know how to install a TYPO3 extension either with Composer or for non-Composer sites, using the Extension Manager.

Types of integration

Flux has multiple ways to store your page- and content templates (which are also type definitions):

  1. Fully automated through the site-wide "design" folder in the public root. This integration is easiest to use but forces your templates to render in Flux's context, and does not facilitate complex setups such as extension specific asset storage, and is not as portable as other methods - on the other hand it works immediately out of the box. Ideal for simple single-domain sites and gets you started in just a few minutes.
  2. Extension-specific, meaning you use a TYPO3 extension (written by yourself) to store all page- and content templates and additional resources such as translations, icons, and so on. This method is the most portable, meaning you can package your entire site templating in an extension that you can reuse, and is the only method which allows you to also ship PHP classes (ViewHelpers, for example) along with your site templates.
  3. For content types specifically, you can define new types using root-level database records (one per type). This method is possible to use completely without touching the file system, but has a lesser degree of portability. You can use this method to quickly create prototypes of content types using a more visual approach (through TYPO3 forms). This method also has an exporting feature which allows you to generate the necessary Fluid template that can then be used with either of the other methods.

Methods 1 and 3 are intended to get you started as quickly as possible. Method 2 is intended to serve more custom setups which ship more than just site templates, through use of a custom TYPO3 extension.

All three methods can be combined or used individually.

Composer Install

Recommended!

composer req fluidtypo3/flux
./vendor/bin/typo3 extension:install flux
# alternatively, instead of extension:install, activate in Extension Manager backend module

Non-Composer Install

NOT recommended!

  1. In the Extension Manager backend module, search for flux
  2. Choose to install the result with the extension key flux

Setup

  • There is no required setup to use Flux content types (but you almost certainly need to install fluid_styled_content to be able to render any content at all).
  • To use page templates without a content grid (which assumes you defined a grid with pageTSconfig or other) you only need to select the template to use in Page Layout when editing a page (start with the top page).
  • If your page template additionally contains a grid, you must also select Columns from selected "Page Layout" as the value of the two Backend Layout fields in the Appearance tab.

The remaining setup of labels, form fields, grid composition etc. can all be done from within your Fluid templates.

How does it work?

When Flux is installed and enabled in extension manager, and if automatic creation of site-wide Flux templates is enabled (which it is by default), the following happens automatically:

  • A folder named design is created in the public directory (this directory may differ between TYPO3 versions and can be changed with configuration, but in most recent TYPO3 versions it is public in the project public folder).
  • This folder is filled with a set of skeleton templates containing very basic embedded Flux metadata.
  • The file created in design/Templates/Page can be selected as page template (Flux adds a Page Layout tab to pages' editable properties).
  • The file created in design/Templates/Content becomes a custom content type which can be inserted just like the standard TYPO3 content types that create text, image, etc.

Renaming, removing or adding files in these folders automatically registers the file as either page template or content type, depending on location. Be careful when renaming or removing files: if the page- or content template is already in use this may break your system until you choose another page template and disable/delete removed or renamed content types. There is no warning given about types that are in use!

From that point on, you can create a completely styled site with custom content types to make sliders etc. using your favorite frontend framework (or none) - and you only need to know very basic Fluid (an XML based markup engine which comes with automatically rendered documentation for every tag you can use).

What does it NOT do?

Flux does not remove the need to learn "the TYPO3 way" of doing things - you should still aim to learn more about how TYPO3 works. Flux only makes it quicker to get started and provides a reasonable level of automation; complex sites will almost surely still require you to learn a bit about TYPO3 (such as, how to modify the <meta> section and how to use third party plugins for news etc.)

Flux is also not a replacement for things like fluid_styled_content (although it can work without it) - Flux creates custom content types, it does not replace TYPO3's native content types (although you can hide those and use only your custom types).

Lastly, Flux only has limited abstraction over how you define form fields. To know all the specific details of what each type of field does, you still need to know TYPO3's "TCA" (which is thoroughly documented). Flux tries as far as possible to use the same names of form field attributes as TCA. If you don't understand an attribute or aren't sure which field type to use, always consult the TCA documentation (keeping in mind not all field types will work: Flux fields are based on FlexForm fields. When FlexForm does not support a field type it is noted so in the TCA documentation).

Recommendation of VHS

VHS is another extension in the FluidTYPO3 family, which is highly recommended to use along with Flux. The reason VHS is mentioned here, is that it provides alternatives to TypoScript-based content- and menu-rendering instructions, allowing you to instead use Fluid.

Given that in particular menu rendering setup in TypoScript is notoriously difficult (due to a very old structure which has basically never changed), beginners may prefer to use a special XHTML tag and either a few CSS class properties, or a custom loop to output menu items and their links.

Flux form API

Flux lets you build and modify forms in Fluid, which become form fields in the form that edits content/page properties through the TYPO3 backend:

<flux:form id="myform">
  <flux:field.input name="myField" label="My special field" />
</flux:form>

Flux also lets you build a grid for content elements (nested content areas):

<flux:grid>
  <flux:grid.row>
    <flux:grid.column colPos="0" name="main" label="Main content area" />
  </flux:grid.row>
</flux:form>

Flux is then capable of extracting these embedded structures to read form fields, labels, content grids, backend preview output, and more - in short, your template files embed the instructions on how to both integrate and render templates.

Alternative APIs

As you create more complex projects they usually have more complex requirements - which may still benefit from Flux features such as a way to create Flux forms for custom plugins. Since Flux works by increasingly abstracting the API of TYPO3 core features (with the Fluid "flavor" as the most condensed and abstracted) Flux also declares these increasingly flexible layers of abstraction as public API.

This means Flux also has a good old PHP way to declare forms and so on:

$form = \FluidTYPO3\Flux\Form::create();
$form->setName('myform');
$form->createField('Input', 'myField', 'My special field');

And supports plain arrays (to allow sources like JSON):

$json = '{name: "myform", fields: [{"name": "myField", "type": "Input"}]}';
$asArray = json_decode($json, JSON_OBJECT_AS_ARRAY);
$form = \FluidTYPO3\Flux\Form::create($asArray);

And can use TypoScript:

plugin.tx_flux.providers {
  myextension_myplugin {
    tableName = tt_content
    fieldName = pi_flexform
    listType = myextension_myplugin
    extensionKey = Vendor.MyPlugin
    form {
      name = myform
      fields {
        myField {
          type = Input
          label = My special field
        }
      }
    }
  }
}

All of which create the same form with a single input field called myField with a label value of My special field. The last example shows the form structure nested in a Provider (another Flux concept) which connects the pi_flexform field of the related tt_content plugin record type to the form.

Flux feature highlights

  • Added features for content elements - add content grids (following the backend_layout approach) to any content/plugin.
  • Multiple APIs to access the same features from many different contexts using the same naming and nesting style.
  • Multiple levels of API abstraction - when you need more control, lower API abstraction levels can be used in your code.
  • Flexible ways to replace individual parts: templates, controller actions, etc.
  • Manipulation of properties of existing forms - change field labels, default values, add fields, sheets, etc.
  • Data type transformations - define the desired target type and let the TypeConverters of Extbase handle conversion.
  • Possibility for custom components of your own - with the same API support any other Flux component has.
  • Several Utility-type classes for advanced integrations with Fluid in particular.

Caveats

  • Keep In mind to have your PHP/HTTP configured correctly to accept a fairly large number of input fields. When nesting sections / objects the number of fields submitted, rises drastically. The php.ini configuration setting to think about is max_input_vars. If this number is too small then the TYPO3 Backend (being PHP) will decline the submission of the backend editing form and will exit with an "Invalid CSRF Token" message because of incomplete (truncated) POST data.
  • When working with custom Provider classes: 1) make sure you declare each Provider class as public: true in Service config of your extension. And 2) if the Provider needs to be used for more than one specific page/content/record type, make sure you also declare the Provider as shared: false. You can find an example of such configuration in the Configuration/Services.yaml file in Flux.
  • When working with custom Controller classes, make sure you declare each Controller class as public: true in Service config of your extension.
  • Note that both Providers and Controllers use constructor injection of dependencies. If you use custom Controllers and/or Providers and these override the __construct method, make sure that they take the same arguments as the parent class and that you call parent::__construct() with those arguments from your overridden __construct method.

flux's People

Contributors

amkoroew avatar benjaminbeck avatar bjo3rnf avatar bmack avatar cedricziel avatar coding46 avatar cweiske avatar derhansen avatar dogawaf avatar fabarea avatar franzkugelmann avatar galoppi avatar glucka avatar henningcash avatar higidi avatar jmverges avatar jnugh avatar monosize avatar namelesscoder avatar neufeind avatar pixelbrackets avatar pixelmatseriks avatar pkerling avatar romm avatar ste101 avatar tiggr avatar torvitas avatar tpinne avatar x3ro avatar xf- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flux's Issues

Uncaught exception for removed files

We have some FCEs with <flux:flexform.field.file /> fields. When an existing file has been assigned to such a field and the file is deleted for some reason an exception is thrown:

TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException thrown in file
/Users/foo/www/typo3_src-6.0.4/typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php in line 399.

This exception should be caught or not thrown at all to avoid WTF.

[REQUEST] "This element is a reference" indicator and edit link

EDIT: changed to feature request

Hi Claus,
C&P is a wunderful feature. We tested it today and found some issues:

  • Same page cut & paste doesn't work
  • Same page copy & paste as reference doesn't work
  • But same page copy & paste works fine

Nice to have a "This element is a reference to element ID on page ID (Jump to page)".

Best,
Philipp

[BUG] flexform.grid.column parameter 'style' not renderd

If I add 'style' to a flexform.grid.column I can't see it in the BE.
E.g. <flux:flexform.grid.column colPos="0" name="Main Content" style="width: 60%;" />
'width' is not renderd also but it is deprecated.

All other parameter are working.

[BUGFIX] Add check whether COOKIE is set

I got a server PHP warning in module Page because a COOKIE was assumed to be set but wasn't. This occurred on the master branch. I am not sure if this will be the final solution but the patch below fixed the situation.

diff --git a/Classes/ViewHelpers/IsCollapsedViewHelper.php b/Classes/ViewHelpers/IsCollapsedViewHelper.php
index ebf61e5..e38af45 100644
--- a/Classes/ViewHelpers/IsCollapsedViewHelper.php
+++ b/Classes/ViewHelpers/IsCollapsedViewHelper.php
@@ -41,11 +41,13 @@ class Tx_Flux_ViewHelpers_IsCollapsedViewHelper extends Tx_Fluid_Core_ViewHelper
         * @return string
         */
        public function render($record) {
-               $cookie = $_COOKIE['fluxCollapseStates'];
-               $cookie = urldecode($cookie);
-               $cookie = json_decode($cookie);
-               if (in_array($record['uid'], $cookie)) {
-                       return $this->renderThenChild();
+               if (!empty($_COOKIE['fluxCollapseStates'])) {
+                       $cookie = $_COOKIE['fluxCollapseStates'];
+                       $cookie = urldecode($cookie);
+                       $cookie = json_decode($cookie);
+                       if (in_array($record['uid'], $cookie)) {
+                               return $this->renderThenChild();
+                       }
                }
                return $this->renderElseChild();
        }

Page tree is slow

I don't know whether I am the only one but it seems the page tree is becoming slower when manipulating pages. Having latest master of fedext ecosystem, it gives me the impression speed has also decreased when creating / deleting content. Is it because I checkout while there is work in progress?

About the cause, I was assuming the Cache Manager from Flux was "pretty busy" but it is only a wild guess... I am wondering whether something could be done. Configuration? Optimization? Wait for super-coder(s) finishing the work?

All the best,

Fabien

Problem with cached fluid template

Perhaps related to recent Cache management change, I get some trouble whenever editing the page property (not the only action which raises this error) even after clearing all possible cache. Check out the error message. After investigation, I didn't notice the class was declared twice (what the error message says). I was wondering whether I have to change something on this file. Do you have an idea?

Fatal error: Cannot redeclare class FluidCache_speciality_Flux_action_index_9cf17683e0b74fed7b572d0191174046a1a747bd in /Users/fudriot/Sites/Ecodev/bootstrap.fab/htdocs/typo3temp/Cache/Code/fluid_template/Speciality_Flux_action_index_9cf17683e0b74fed7b572d0191174046a1a747bd.php on line 451
Call Stack
#   Time    Memory  Function    Location
1   0.0004  651376  {main}( )   ../alt_doc.php:0
2   0.5097  26266568    TYPO3\CMS\Backend\Controller\EditDocumentController->main( )    ../alt_doc.php:59
3   0.5473  33136416    TYPO3\CMS\Backend\Controller\EditDocumentController->makeEditForm( )    ../EditDocumentController.php:627
4   0.5740  34970832    TYPO3\CMS\Backend\Form\FormEngine->getMainFields( ) ../EditDocumentController.php:832
5   0.6468  36917848    TYPO3\CMS\Backend\Form\FormEngine->getSingleField( )    ../FormEngine.php:786
6   0.6488  36939488    TYPO3\CMS\Backend\Form\FormEngine->getSingleField_SW( ) ../FormEngine.php:1092
7   0.6488  36939488    TYPO3\CMS\Backend\Form\FormEngine->getSingleField_typeUser( )   ../FormEngine.php:1204
8   0.6489  36940368    TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction( )  ../FormEngine.php:3030
9   0.8842  41723336    call_user_func_array ( )    ../GeneralUtility.php:4022
10  0.8842  41723416    Tx_Fluidpages_Backend_PageLayoutSelector->renderField( )    ../GeneralUtility.php:4022
11  1.0129  45104752    Tx_Flux_Service_FluxService->getStoredVariable( )   ../PageLayoutSelector.php:98
12  1.0147  45113600    Tx_Flux_MVC_View_ExposedTemplateView->getStoredVariable( )  ../FluxService.php:178
13  1.0149  45114008    Tx_Flux_MVC_View_ExposedTemplateView->getParsedTemplate( )  ../ExposedTemplateView.php:81
14  1.0153  45114488    TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler->get( )  ../ExposedTemplateView.php:121
15  1.0153  45114696    TYPO3\CMS\Core\Cache\Frontend\PhpFrontend->requireOnce( )   ../TemplateCompiler.php:56
16  1.0153  45114696    TYPO3\CMS\Core\Cache\Backend\FileBackend->requireOnce( )    ../PhpFrontend.php:82

Empty Fluid Content Container

The problem might be already known but I am opening a ticket anyway. It looks the Content Element are not displayed within a fluid content container (from a fluidcontent_bootstrap in this case). Check out the screenshot.

2013-04-17_2134

For better reproducing the problem, I have issued a new version of the BP that you can get with:

wget http://get.typo3.org/bootstrap -O bootstrappackage.tar.gz

Actually, I am not sure whether this is the appropriate Bug Tracker for this problem.

Lost flux plugin configuration provider after upgrade 4.7 to 6.x

Hi Claus,
after a horrible week upgrading two extensions of mine to namespaces in with TYPO3 6.x there seems to be trouble with register the provider for flux:
registerConfigurationProvider seems not to recognize namespaced instances:

is_object('DMF\Intranet\Provider\Configuration\PluginConfigurationProvider') or is_object('\DMF\Intranet\Provider\Configuration\PluginConfigurationProvider') is FALSE.

Additional I tried to call:
Tx_Flux_Core::registerFluidFlexFormPlugin(
$_EXTKEY,
'dmftravelagent_search',
'EXT:' . $_EXTKEY . '/Resources/Private/Templates/Travel/SearchBox.html',
array(),
'Configuration'
);

But this seems somehow to do nothing at all. If I open my plugins the flexform configuration remains empty.

Any ideas what is wrong here? Or did anything changed in the flux core?
Cheers,
Dominic

[BUG] Fatal error in 4.5

While setting up a testing environment for the different TYPO3 versions I encountered this fatal error in 4.5 when trying to edit a page:

PHP Catchable Fatal Error: Argument 1 passed to Tx_Extbase_MVC_Web_Routing_UriBuilder::setRequest() must be an instance of Tx_Extbase_MVC_Web_Request, instance of Tx_Extbase_MVC_Request given, called in /path/to/ext/flux/Classes/Service/FluxService.php on line 128

This doesn't happen in 4.7 and 6.x and is obviously related to the different extbase versions that are shipped.

SelectViewhelper and Inheritance makes impossible to save as "empty"

Hi Claus.

Since you introduced the great inheritance of page variables it seems to be no longer possible to save a select as empty if there is a parent page with items selected.

We talk about: Tx_Flux_ViewHelpers_Flexform_Field_SelectViewHelper

It seems if you empty a select it is not saved as empty but rather removed from this page, so that a value defined on a parent page defined for this select is inheritad again.

It should be possible to set a argument on the ViewHelper to define if inheritance feature should be enabled on that field, because i think if inheritance is the desired behaviour on a field is depending on the use case.

Something like enableInheritance="FALSE":
https://gist.github.com/benjaminrau/b5c3c2b0154c48be6189

Dear Benjamin

Workspaces breaks page rootline processing

I get a problem in workspaces, when i try to edit page flexforms. I get this message in the page Configuration field:
Please select Fluid Content Element type

No fields to edit though

ANy clue, what might cause this?

.FED_CONTENT not deleted when clearing cache

Clearing the cache does not delete the .FED_CONTENT file in typo3conf

Some more background info:
Operating System: OSX Lion 10.8.2
PHP version: 5.3.15
TYPO3 version: 6.0
Installed extensions:

  • flux
  • fluidpages
  • fluidcontent
  • fluidcontent_bootstrap
  • vhs
  • own custom design package

require failed after 5.20 update

Hi Claus,

updated a project to 5.20 and got this in my logs and 500 errors in the frontend. Updated several times withe same result, Maybe the t3x package is broken? Reverting all back to 5.1.1 and everything works fine.

flux_log

Cheers

Backend Rendering broken in 6.0

Hi Claus,

this is also reported on Forge and also a core issue. Is there maybe a workaround to actually work with 6.0. If I remember correctly than this did not appear in RC2

Fatal error: Declaration of Tx_Flux_Backend_Preview::preProcess() must be compatible with that of TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::preProcess() in /var/www/projekte/it-cube/Website/site/typo3conf/ext/flux/Classes/Backend/Preview.php on line 35

Cheers

[SUPPORT] Context awareness enabled?

From http://fedext.net/news/under-construction.html

Flux will be made extension scope aware. This simply means that if you use Flux from an extension (and this also includes FluidContent and FluidPages), then

I have this file which contains an image to be rendered.

# Current implementation which works
<f:image src="EXT:speciality/Resources/Public/Images/logo.png" alt="Logo"/>

However, if I change to (hoping the context awareness will resolve the path)

<f:image src="Images/logo.png" alt="Logo"/>
-> path is wrongly pointing to "fluidpages" 
-> e.g. typo3conf/ext/fluidpages/Resources/Public/Images/logo.png

As additional information, the Page Controller Action is "speciality->1Column". So EXT:speciality is somehow mentioned as Context.

Do you have a comment?

[BUG] Using flux:flexform.sheet in fluidpages wont work the right way

After updating everything to the latest Git-Masters, my fluidpages flexforms wonยดt work the right way.

As you see iยดm using flux:flexform.sheet to separate some field for better overview.
But now some of them are unter Options and only the flux:flexform.field.file appears under the sheet label="Background Images"

Here is my full code:

<f:section name="Configuration">
    <flux:flexform id="mostpagestandard" label="MOST Page Standard" icon="{v:extension.path.resources(extensionName: 'FluidpagesMost')}screens/moststandard.png">
    {v:var.typoscript(path: 'plugin.tx_fluidpagesmost.settings') -> v:var.set(name: 'overrides')}
        <flux:flexform.field.custom name="void" label="Explanation">
            <h2>MOST Page Template Standard</h2>
        </flux:flexform.field.custom>

        <f:if condition="{overrides.useTypoScript} < 1">
            <f:render section="bgImageOption" arguments="{_all}" />
            <f:render section="fontOption" arguments="{_all}" />
        </f:if>     



        <flux:flexform.grid>
            <flux:flexform.grid.row>
                <flux:flexform.grid.column colPos="5" colspan="4" name="Page Teaser" />
            </flux:flexform.grid.row>
            <flux:flexform.grid.row>
                <flux:flexform.grid.column colPos="3" colspan="1" name="Sidebar Content" />
                <flux:flexform.grid.column colPos="0" colspan="3" name="Main Content" />
            </flux:flexform.grid.row>
            <flux:flexform.grid.row>
                <flux:flexform.grid.column colPos="2" colspan="4" name="Second Content" />
            </flux:flexform.grid.row>
        </flux:flexform.grid>
</flux:flexform>
</f:section>

<f:section name="bgImageOption">
    <flux:flexform.sheet name="style" label="Background Images">
            <!-- BACKGROUND IMAGE FILES -->
            <flux:flexform.field.file 
                name="settings.bgImage1" 
                label="Background Image 1" 
                size="5" 
                multiple="0" 
                showThumbs="1">
            </flux:flexform.field.file>
            <flux:flexform.field.input 
                name="settings.bgImage1posright"
                default="0"
                maximum="1170" 
                eval="int,trim"
                label="Position Right">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage1posrleft"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"
                label="Position Left">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage1postop" 
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"         
                label="Position Top">
            </flux:flexform.field.input>

            <flux:flexform.field.file 
                name="settings.bgImage2" 
                label="Background Image 2" 
                size="5" 
                multiple="0" 
                showThumbs="0">
            </flux:flexform.field.file>         
            <flux:flexform.field.input 
                name="settings.bgImage2posright"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"          
                label="Position Right">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage2posrleft"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"          
                label="Position Left">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage2postop"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"          
                label="Position Top">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage2posbottom"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"          
                label="Position Top">
            </flux:flexform.field.input>

            <flux:flexform.field.file 
                name="settings.bgImage3" 
                label="Background Image 3" 
                size="5" 
                multiple="0" 
                showThumbs="1">
            </flux:flexform.field.file>     
            <flux:flexform.field.input 
                name="settings.bgImage3posright"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"                      
                label="Position Right">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage3posleft"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"                      
                label="Position Left">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage3postop"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"                      
                label="Position Top">
            </flux:flexform.field.input>
            <flux:flexform.field.input 
                name="settings.bgImage3posbottom"
                default="0"
                minimum="0" 
                maximum="1170" 
                eval="int,trim"                      
                label="Position Bottom">
            </flux:flexform.field.input>
    </flux:flexform.sheet>
</f:section>



<f:section name="fontOption">
    <flux:flexform.sheet name="font" label="Font Options">      
            <flux:flexform.field.input 
                name="settings.TextColor" 
                label="Text color" 
                default="#FFFFFF">
                <flux:flexform.field.wizard.colorPicker hideParent="TRUE" />
            </flux:flexform.field.input>



            <flux:flexform.field.input 
                name="settings.headerFontSize" 
                label="Header font size" 
                default="80"
                minimum="0" 
                maximum="200" 
                eval="int,trim">
                <flux:Flexform.field.wizard.slider hideParent="TRUE" width="200" />
            </flux:flexform.field.input>


            <flux:flexform.field.input 
                name="settings.paragraphFontSize" 
                label="Paragraph font size" 
                default="24"
                minimum="0" 
                maximum="200" 
                eval="int,trim">
                <flux:Flexform.field.wizard.slider hideParent="TRUE" width="200" />
            </flux:flexform.field.input>
    </flux:flexform.sheet>
</f:section>

Typo3 (v.6.0.0): Fatal error: Declaration of Tx_Flux_Backend_Preview::preProcess() ...

Hi Claus, Typo3 v.6 and flux throws the following error:

[Sat Jan 19 11:41:29 2013] [error] [client 192.168.185.5] PHP Fatal error: Declaration of Tx_Flux_Backend_Preview::preProcess() must be compatible with that of TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface::preProcess() in /var/www/vhosts/AMP_typo3v6.de/html-trunk/httpdocs/typo3conf/ext/flux/Classes/Backend/Preview.php on line 35, referer: http://typo3v6.de.trunk.hardt.mobile/typo3/backend.php

It seems like a typo3 mapping issue.

My quick'n dirty workaround (only for typo3 v.6):

editing flux : Tx_Flux_Backend_Preview

changing line 88 from:
public function preProcess(tx_cms_layout &$parentObject, &$drawItem, &$head.....
to:
public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$head....

Kind regards
Heiko

SQL error on moving pages in TYPO3 6.0

See http://forge.typo3.org/issues/40216 for background:

exec_UPDATEquery
caller     TYPO3\CMS\Core\Database\DatabaseConnection::exec_UPDATEquery
ERROR     You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid = '399'' at line 1
lastBuiltQuery     UPDATE pages SET WHERE uid = '399'
debug_backtrace     TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction#61 // call_user_func_array#4017 // TYPO3\CMS\Core\ExtDirect\ExtDirectRouter->route# // TYPO3\CMS\Core\ExtDirect\ExtDirectRouter->processRpc#98 // call_user_func_array#149 // TYPO3\CMS\Backend\Tree\Pagetree\ExtdirectTreeCommands->moveNodeAfterDestination# // TYPO3\CMS\Backend\Tree\Pagetree\Commands::moveNode#212 // TYPO3\CMS\Backend\Tree\Pagetree\Commands::processTceCmdAndDataMap#147 // TYPO3\CMS\Core\DataHandling\DataHandler->process_cmdmap#206 // Tx_Flux_Backend_TceMain->processCmdmap_preProcess#2690 // Tx_Flux_Backend_TceMain->executeConfigurationProviderMethod#79 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_UPDATEquery#180 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#172

Flexforms should support EXT:extensionname/ paths as valid path

The following should be nativly supported ;)

<flux:flexform ... icon="EXT:extensionname/ext_icon.gif">

Should be possible by simply adding an condition to EXT:flux/Classes/ViewHelpers/FlexformViewHelper.php

if(substr($this->arguments['icon'],0,4) === 'EXT:') {
    $this->arguments['icon'] = t3lib_extMgm::extRelPath($this->arguments['icon']);
}

New Content Element Wizard Display Problem

Hi Claus

I have a display issue probably due to a parsing problem of the flux:flexform tag. Or maybe theres a better way of nesting apostrophes and "new lines" in my IDE.

On one line everything works as expected:

<flux:flexform wizardTab="Zurb Foundation" id="zurb-button-split" label="Zurb Foundation: Split Button" description="A button which has a main action and creates a dropdown with further actions when you click the dropdown icon" icon="../typo3conf/ext/fluidcontent_zurb/Resources/Public/Icons/button-split-icon.jpg">

Bildschirmfoto 2013-01-14 um 10 47 56

On multiple lines (Using "Reformat Code..." with PHPstorm) the Split Button breaks:

<flux:flexform wizardTab="Zurb Foundation" id="zurb-button-split" label="Zurb Foundation: Split Button"
                       description="A button which has a main action and creates a dropdown with further actions when you click the dropdown icon"
                       icon="../typo3conf/ext/fluidcontent_zurb/Resources/Public/Icons/button-split-icon.jpg">

Bildschirmfoto 2013-01-14 um 10 56 29

On one line with f:translate tag the Split Button breaks:

<flux:flexform wizardTab="Zurb Foundation" id="zurb-button-split" label="Zurb Foundation: Split Button" description="<f:translate key='LLL:EXT:fluidcontent_zurb/Resources/Private/Language/locallang.xlf:zurb.splitbutton.desc' />" icon="../typo3conf/ext/fluidcontent_zurb/Resources/Public/Icons/button-split-icon.jpg">

Bildschirmfoto 2013-01-14 um 11 06 48

Any hints on how I can solve this issue?

You can find the extension here:
https://github.com/beda/fluidcontent_zurb

No Front-End output after editing caused by tx_flux_column

Hi Claus,

we're setting up a new website based on TYPO3 6.0, flux, fed, vhs (not needed but it doesn't work without; I will try to remove ist later). We love to work with flux but there are some little tiny bugs...

After editing a content record (every type from text to news or fed) there is no more frontend output of the containing data (backend ist OK). In tt_content.tx_flux_column there is a value "element-tt_content-54" (yes, the uid of the content element is also 54). After deleting this value the frontend-output is fine again.

I hope you can help us a little bit :-)

Thx, Philipp

Fatal error encountered

I am about releasing a new version of the Bootstrap Package but encountered Fatal Errors along the way. It seems there is an error whenever a bootstrap_content is on a page. I haven't dug enough to spot the problem. Could you have a look at that? Here are the steps to reproduce the bug:

  1. Download the new Package (which contains today master version of "fedext")
    wget http://get.typo3.org/bootstrap bootstrappackage.tar.gz

  2. Create Virtual Host

  3. Go through the Wizard

  4. Login in the BE and check the welcome page in mode "page". Direct access on this page http://bootstrap.test/index.php?id=51 (Notice the page contains a fluidcontent_boostrap element). I get this:

    Catchable fatal error: Argument 1 passed to TYPO3\CMS\Fluid\View\AbstractTemplateView::assignMultiple() must be an array, null given, called in ~/Sites/Ecodev/bootstrappackage.test/typo3conf/ext/flux/Classes/Backend/AbstractPreview.php on line 120 and defined in ~/Sites/Ecodev/bootstrappackage.test/typo3/sysext/fluid/Classes/View/AbstractTemplateView.php on line 154

I also noticed a problem in the module "Access". Try editing whatever permission. In my end, I get some warning output (although the modification is saved):

Warning: filemtime() [function.filemtime]: stat failed for /Page/.html in ~/Sites/Ecodev/bootstrap.fab/htdocs/typo3_src/typo3/sysext/fluid/Classes/View/TemplateView.php on line 468
Call Stack
#   Time    Memory  Function    Location
1   0.0003  661080  {main}( )   ../ajax.php:0
2   0.2315  24338224    TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction( )  ../ajax.php:61
3   0.2335  24514592    call_user_func_array ( )    ../GeneralUtility.php:4022
4   0.2335  24514672    TYPO3\CMS\Perm\Controller\PermissionAjaxController->dispatch( ) ../GeneralUtility.php:4022
5   0.2511  28038480    TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap( ) ../PermissionAjaxController.php:126
6   0.5143  35605272    TYPO3\CMS\Core\DataHandling\DataHandler->updateDB( )    ../DataHandler.php:1057
7   0.5149  35622184    TYPO3\CMS\Core\DataHandling\DataHandler->updateRefIndex( )  ../DataHandler.php:5569
8   0.5178  36101864    TYPO3\CMS\Core\Database\ReferenceIndex->updateRefIndexTable( )  ../DataHandler.php:5726
9   0.5183  36105584    TYPO3\CMS\Core\Database\ReferenceIndex->generateRefIndexData( ) ../ReferenceIndex.php:103
10  0.5186  36122504    Tx_Flux_Override_Core_Database_ReferenceIndex->getRelations( )  ../ReferenceIndex.php:161
11  0.5255  36804888    TYPO3\CMS\Backend\Utility\BackendUtility::getFlexFormDS( )  ../ReferenceIndex.php:77
12  0.5260  36831288    Tx_Flux_Backend_DynamicFlexForm->getFlexFormDS_postProcessDS( ) ../BackendUtility.php:972
13  0.5281  36835568    Tx_Flux_Provider_AbstractConfigurationProvider->postProcessDataStructure( ) ../DynamicFlexForm.php:79
14  0.5281  36844720    Tx_Flux_Provider_AbstractConfigurationProvider->getFlexFormValues( )    ../AbstractConfigurationProvider.php:338
15  0.5282  36844840    Tx_Fluidpages_Provider_PageConfigurationProvider->getTemplateVariables( )   ../AbstractConfigurationProvider.php:379
16  0.5288  36847792    Tx_Flux_Service_FluxService->getStoredVariable( )   ../PageConfigurationProvider.php:175
17  0.5443  38338592    Tx_Flux_MVC_View_ExposedTemplateView->getStoredVariable( )  ../FluxService.php:178
18  0.5450  38356136    Tx_Flux_MVC_View_ExposedTemplateView->getParsedTemplate( )  ../ExposedTemplateView.php:82
19  0.5450  38356136    TYPO3\CMS\Fluid\View\TemplateView->getTemplateIdentifier( ) ../ExposedTemplateView.php:120
20  0.5451  38356216    TYPO3\CMS\Fluid\View\TemplateView->createIdentifierForFile( )   ../TemplateView.php:172
21  0.5451  38356264    filemtime ( )

Flux Content Get with typoscript configuration

In my opinion could be interesting adding the feature of customizing rendering of each content record with typoscript.

What do you think about three possible implementations:

  • Using a fixed typoscript path where put my personal configuration (ex: plugin.tx_fed.fce.xxxx)
  • Adding a new arguments to helper with typoscript path for content
  • Adding a new ViewHelper returning an array of content element object from tt_content table (similar with page.content.render, but with record and no content).

Adding new CE leads to logout (6.0)

Hi Claus,

When I have a extension provbiding FCE's installed (doesn't matter if fluidcontent or my own) I get logged out from the backend. Not every time and no error in the log. So it's really hard to reproduce.

is it also meant to take the 5.0-dev branch for 6.0 development?

Preview of nested elements fails after editing one of the nested elements

Hi Claus,

after editing one of the text elements inside the fluid content elements there is no more preview of the text elements on the page (please take a look at the screenshots):

  • flux_bug1: Before editing one of the text elements
  • flux_bug2: After editing the text elements the preview is broken

flux_bug1
flux_bug2

Thx, Philipp

Copy/Paste broken with Flux 5.3 and TYPO3 4.7.10

It seems that some, but not all, Copy and Paste Operations don't work as soon as flux (latest from github) is installed on TYPO3 4.7.

  • It doesn't matter if the copy/paste is on the same page or from page to another,
  • it also doesn't matter if reference or copy
  • but it seems to be dependent on the icon that is being klicked for pasting:
    "insert after" any content element doesn't work in any case, but clicking on "paste" on top of a table seems to work, but only in LIST module.

So, what does not work is the following:

  • Copy and Paste in PAGE Module
  • Copy and Paste in LIST Module when inserting "after any" element within the table by clicking on the icon in the row (extended view)

The observed behaviour is: JS Dialog appears, i click yes, page reloads, but the Element is not crated / pasted.

Only copy and Paste in LIST Module via click on Extended View icon, Paste via Icon on top of table, works.

The Problem occurs independently from Gridelements (but maybe it is important that it was installed before). Uninstalling flux solves the problem.

Having two extension shipping "fluid pages"

Didn't find the answer at the first look: from the snippet below is the key "fluidpages" mandatory? If yes, it means I can not mix two extension delivering fluid page templates at the same time. The one who has its TS setup.txt loaded at last will "win". Am I right? Can the situation be improved?

plugin.tx_fed {
    page.fluidpages {
        templateRootPath = EXT:fluidpages_bootstrap/Resources/Private/Templates/
        partialRootPath = EXT:fluidpages_bootstrap/Resources/Private/Partials/
        layoutRootPath = EXT:fluidpages_bootstrap/Resources/Private/Layouts/
    }
}

xclassing tceform causes problems with other extensions

I recently stumbled across a problem that might be a bigger one.

Whenever using flux, calendar base ("cal") and news system ("news") together, some hooks of news system don't work correctly. Their hook methods' signatures require an object of type t3lib_TCEforms where Tx_Flux_Override_Backend_Form_FormEngine is given.

I reported a bug (http://forge.typo3.org/issues/47559), but it seems like it's not "their problem". Do you think it's possible to solve this flux-side? If not, then there's a general compatibility problem on one or the other side.

Here's an example for an error:

PHP Catchable Fatal Error: Argument 8 passed to Tx_News_Hooks_Tceforms::getSingleField_preProcess() must be an instance of t3lib_TCEforms, instance of Tx_Flux_Override_Backend_Form_FormEngine given, called in /opt/typo3/typo3_src-6.0.4/typo3/sysext/backend/Classes/Form/FormEngine.php on line 1001 and defined in /var/customers/webs/mycustomer/typo3conf/ext/news/Classes/Hooks/Tceforms.php line 47

Interestingly it happens only in combination with more than one of the extensions. news itself works, cal itself works, but as soon as both are installed, the errors occur.

Copy/paste pages with container elements

Ihttp://www.youtube.com/watch?v=nplFimzbnTo&feature=youtu.be
If you copy a page that has container CEs and paste that page then the elements of the original page appears twice

Translating Container Elements

Hi Claus,

first at all everything seems to work fine on 6.0.

One issue which also appears on 4.7 is that when you have a multi-language installation, setup a page_language_overlay and then press "Copy default content" to copy the contents from the default language to the desired language. Elements inside of a "flux container element" are missing.

I'm not so much into the translation handling and possible hooks to use of TYPO3 but for me it seems that typo3 only copies elements which have their colPos set to this column from which the contents should be copied.

So maybe their is a hook to copy also the elements which parent element is copied and set their 'tx_flux_parent' to the copied one?

Cheers
Matthias

Error in the backend using Templavoila on TYPO3 6.0.2

Now the site is working with templates Templavoila. I wanted to update the site and transfer to fluid templates with fluidpages and flux. But during a Flux get the following error when trying to save flexform with page properties in BE:
#1: PHP Catchable Fatal Error: Argument 4 passed to tx_templavoila_tcemain::processDatamap_preProcessFieldArray() must be an instance of t3lib_TCEmain, instance of Tx_Flux_Override_Core_DataHandling_DataHandler given, called in /var/www/typo3_src-6.0.2/typo3/sysext/core/Classes/DataHandling/DataHandler.php on line 788 and defined in /var/www/typo3/data/www/gep-art.com/typo3conf/ext/templavoila/class.tx_templavoila_tcemain.php line 73

Without the use of Flux, all excellent.

Is EXT:flux 5.0 incompatible with TYPO3 4.7?

hey claus,

i was told that...

--- quote ---
Claus wants to keep compatibility with 4.5.. so it's a bug!
--- /quote ---

so here is my report:

is EXT:flux 5.0 incompatible with TYPO3 4.7? in the news on 16/12/2012 i only read "Flux and FED 5.0 are compatible with 6.0".

I just tryout EXT:fluidcontent which depends on EXT:flux in an 4.7.7 TYPO3 installation and tried to add one of the twitter bootstrap content elements on a page. this results in this error message in the BE:

Fatal error: Class 'TYPO3\CMS\Core\Messaging\FlashMessage' not found in /var/www/hella/typo3conf/ext/flux/Classes/Service/Configuration.php on line 103

line 103 says:

$flashMessage = new \TYPO3\CMS\Core\Messaging\FlashMessage($messageText, 'Fluid configuration missing', t3lib_FlashMessage::WARNING);

kind regards

roland

copy/paste broken in gridelements after install flux

Hi Claus, I got the follwing problem:
Pasting a content element (text, image, ...) in a gridelement will be pasted somewhere on the page. It feels like it lost its col pos.
I have tested this issues on different systems, and always after installing flux i run into this problem.

tested on typo3 V4.7.7
current stable version of flux and gridelements

Thanks

Problem / Suggestion about .FED_CONTENT

Hi Claus,

I run into small troubles with this file, cause it was build as a global tsconfig-file depending on the current used PageTemplate setup.

I often use multiple page-templates (like multidomain-setup or newsletter templates based on table layout, ...), so it is necessary for me using different templates and fce's whithin a global typo3 installation.

I got a small workaround for this, but in the future it would be great if the problem will be solved.

Some small suggestions are:

  • using uid of page-template in .FED_CONTEN file name like .FED_CONTENT_[UID]
  • a configuration flag, which completly disables using (and generating) this file.
  • moving this file to typo3temp

Kind regards
Heiko

Path of FlexForms seems not get resolved correctly

When I add a Fluid element and want to go to the Tab to enter values, this massage appears:

The error code is 1343264270 and the message states: Tried to get a FlexForm configuration from a file which does not exist (/var/www/projekte/it-cube/Website/site/Tabs.html)

Seems like the themplate path does not get recognized.

Lastest master of flux and fed on TYPO3 4.7.7

Grid is visible in sysfolders

In my current setup the grid that is defined in a parent page's layout by fluidpages is visible in sysfolders which shouldn't be the case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.