Skip to content

TYPO3 13: Invalid JavaScript generation for FlexSlider options (nested js object overwrites defaults) #55

@stdaube

Description

@stdaube

In TYPO3 13, the generated inline JavaScript for the FlexSlider configuration is broken. The extension outputs the user settings twice: once as flat properties (where changes like directionNav: false are ignored and default to true) and a second time nested inside a js: { ... } object at the end of the configuration.

Because FlexSlider only evaluates first-level properties, the custom backend settings inside the js block are completely ignored by the slider. Furthermore, empty backend fields (which default to 0 in TYPO3 13) are passed into this nested block, causing configuration mismatches.

Example of the broken output:

jQuery('#slider_28215').flexslider({
selector: ".slides > li",
animation: "fade",
directionNav: true, // <-- Wrong flat default, ignores backend setting
// ... other defaults ...
js: {
animation: "slide",
directionNav: false, // <-- Correct backend setting trapped here and ignored
minItems: 0 // <-- FlexForm empty value bug
}
});

Expected behavior:
The extension should merge the js array into the main options array on the PHP side before generating the JavaScript string, filtering out empty/zero values that would break the slider's default configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions