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

Sending variable to spark as an array #15

Open
cloudgrayau opened this issue Nov 20, 2024 · 3 comments
Open

Sending variable to spark as an array #15

cloudgrayau opened this issue Nov 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cloudgrayau
Copy link

cloudgrayau commented Nov 20, 2024

Bug Report

Hello,

Sending a variable into a spark component as an array value, kills the request and shows a blank white page. For example:

<main id="structure" data-on-load="{{ spark('_components/article', {
  id: entry.id,
  tags: entry.objTags.ids()
}) }}">

Plugin Version

1.0.0-alpha.5

Craft CMS Version

5.5

PHP Version

No response

@cloudgrayau cloudgrayau added the bug Something isn't working label Nov 20, 2024
@bencroker
Copy link
Contributor

Please check the error logs for an exception message and stack trace.

@cloudgrayau
Copy link
Author

It appears that trying to send any form of array variable, just kills the memory. Even with 2G set, it still dies.

[21-Nov-2024 09:48:19 Australia/Brisbane] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in /var/www/html/vendor/yiisoft/yii2/base/Module.php on line 784
[21-Nov-2024 09:48:19 Australia/Brisbane] PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

Sending a blank array, does the same thing:

<main id="structure" data-on-load="{{ spark('_components/article', {
  id: entry.id,
  tags: []
}) }}">

@bencroker
Copy link
Contributor

Can you show me what’s in the template at _components/article?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants