benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

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 ) ) #1440

Open subnoodle opened 1 year ago

subnoodle commented 1 year ago

Bug Report

Prerequisites

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.

subnoodle commented 1 year ago

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:

Thank you! Thomas

subnoodle commented 1 year ago

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.

bureauoberhoff commented 8 months ago

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

{settings.responsiveimages.contentelements.card_group.{data.pi_flexform.columns}} to this: {settings.responsiveimages.contentelements.card_group.{data.pi_flexform.columns}}
subnoodle commented 8 months ago

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