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

Theme infos error #823

Closed
qmarlats opened this issue May 7, 2016 · 4 comments
Closed

Theme infos error #823

qmarlats opened this issue May 7, 2016 · 4 comments

Comments

@qmarlats
Copy link

qmarlats commented May 7, 2016

When clicking on a theme, an error is shown:
An exception has been thrown during the rendering of a template ("Array to string conversion") in "partials/themes-details.html.twig" at line 72.
As error say, it's because Grav try to show an array of keywords as a string. You should replace:
{{ theme.keywords }}
By something like:
{% for keyword in theme.keywords %}{{ keyword }}{% if not loop.last %}, {% endif %}{% endfor %}

Edit: I think this issue should be moved to the admin plugin. Excuse me I discovered Grav few minutes ago. ^^

@rhukster
Copy link
Member

rhukster commented May 7, 2016

Keywords are generally a string, which theme did you find this in?

@qmarlats
Copy link
Author

qmarlats commented May 8, 2016

I think it was this theme but not sure, I just tested Grav so I don't have access to it anymore.

@rhukster
Copy link
Member

rhukster commented May 8, 2016

Thanks i'll put a check in to handle both strings and array.

@rhukster
Copy link
Member

rhukster commented May 9, 2016

Fixed in repo.

@rhukster rhukster closed this as completed May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants