Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v:asset.script doesn’t work anymore after update to 6.1.3 #1862

Closed
klodeckl opened this issue Jul 5, 2023 · 3 comments
Closed

v:asset.script doesn’t work anymore after update to 6.1.3 #1862

klodeckl opened this issue Jul 5, 2023 · 3 comments

Comments

@klodeckl
Copy link

klodeckl commented Jul 5, 2023

After updating vhs from 6.1.2 to 6.1.3 the viewhelper v:asset.script does not work anymore. Downgrading resolves the problem. TYPO3 10.4.36 (11 not tested). Non composer mode.

@jgreiner
Copy link
Contributor

In typo3 11.5.26 I am getting this error message

`
(1/2) Symfony\Component\PropertyAccess\Exception\InvalidArgumentException

Expected argument of type "array", "string" given at property path "dependencies".

........
........
.......

in /var/www/html/vendor/symfony/property-access/PropertyAccessor.php line 179
at Symfony\Component\PropertyAccess\PropertyAccessor->setValue(object(FluidTYPO3\Vhs\Asset), 'dependencies', 'jquery')

in /var/www/html/public/typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php line 183
at TYPO3\CMS\Extbase\Reflection\ObjectAccess::setProperty(object(FluidTYPO3\Vhs\Asset), 'dependencies', 'jquery')

in /var/www/html/public/typo3conf/ext/vhs/Classes/Asset.php line 106
at FluidTYPO3\Vhs\Asset::createFromSettings(array('path' => 'EXT:greiner_core/Resources/Public/js/frontend/cookies/greinerCore.privacy-hint.js', 'rewrite' => '0', 'external' => '0', 'group' => 'main', 'standalone' => '1', 'dependencies' => 'jquery', 'movable' => '1', 'type' => 'js', 'name' => 'gccookie'))

`

It seems that the property "dependencies" is passed to Symfony's PropertyAccessor as string but should be converted to an array before?

@NamelessCoder
Copy link
Member

@jgreiner Your problem is almost certainly not the same as @klodeckl (yours is about TS-defined assets, his is about ViewHelper-defined assets). Regardless: the linked commit should solve your issue.

@klodeckl Can you elaborate a bit about how the ViewHelper doesn't work?

@NamelessCoder
Copy link
Member

Closing as probably solved and due to lack of feedback on request for specifics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants