benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.

Home Page:https://www.bootstrap-package.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot cast value of type array to string.Array ( [multiplier] => Array ( [default] => 0.5 [xlarge] => 0.5 [large] => 0.5 [medium] => 0.5 [small] => 0.5 ) [gutters] => Array ( [default] => 16 [xlarge] => 16 [large] => 16 [medium] => 16 [small] => 16 ) [corrections] => Array ( [default] => 2 [xlarge] => 2 [large] => 2 [medium] => 2 [small] => 2 [extrasmall] => 2 ) )

subnoodle opened this issue · comments

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v11.5 LTS
  • Can you reproduce the problem on TYPO3 v12.4 LTS
  • Did you perform a cursory search
    to see if your bug or enhancement is already reported?

Description

The card group item is responsible in that case for the exception.
I disabled all elements and reenabled them one-by-one on the page where it occurs.
It's only on that one.
Maybe as well on other bootstrap-content-elements not used there.

Steps to Reproduce

  1. Use card group content element
  2. empty cache
  3. reload frontend
  4. see exception

Expected behavior

No exception.
Fluid parameter should be passed as string instead of array (array of bootstrap-package breakpoints - in any partial) or object should have a toString method.
Sadly, i was not able to determine in switch fuild partial / template it occured.
I hope, the screenshot may help you (didn't for me).

Actual behavior

Exception pops up, since fluid viewhelper cannot parse an argument passed falsly as array instead of string.

Screenshots

Screenshot 2023-11-03 at 12-55-48 TYPO3 Exception

Versions

Typo3 11.5.32
Bootstrap-Package 14.0.7

Thank you!
Hopfully you can find something here.

Hi Benjamin & others,
I found out something important:
I'm using SVG only as card item images.
That means, the imageinfo-viewhelper of the package would not be able to gain image meta data, like resolution.
That could be related to the bug.

This is reproducable:

  • Using image in card-item in format jpg, png: Works
  • Usiign image in card-item in format svg: breaking

Thank you!
Thomas

Again...
it probalby points to:
EXT:bootstrap_package/Resources/Private/Templates/ContentElements/CardGroup.html:7..8
more line 8, i guess. I assume {imageConfig.multipier} is empty here.

HI, to fix this bug the imageConfig you have to change the line from this

<f:variable name="imageConfig">
{settings.responsiveimages.contentelements.card_group.{data.pi_flexform.columns}}
</f:variable>

to this:

<f:variable name="imageConfig">{settings.responsiveimages.contentelements.card_group.{data.pi_flexform.columns}}</f:variable>

Dear @bureauoberhoff , i checked it and it's anyways already in one line.
Thank you for that hint.
Greets, Th.