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

Error Call to undefined method Stringy #8

Closed
ghost opened this issue Sep 5, 2019 · 5 comments
Closed

Error Call to undefined method Stringy #8

ghost opened this issue Sep 5, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 5, 2019

Hey there,

On Craft 3.3.0.1

I am getting an error within the Craft Control Panel when trying to view /admin/cache-flag

Call to undefined method Stringy\Stringy::snakeize()
@mmikkel
Copy link
Owner

mmikkel commented Sep 5, 2019

Hi @mjatharvest, thanks for reporting.

I think Craft swapped out the Stringy library for something else in Craft 3.3.

I'll get a fix out shortly, in the meantime you could try to composer require the Stringy library yourself (i.e. composer require danielstjules/stringy from your project's root folder), as a hotfix.

@mmikkel
Copy link
Owner

mmikkel commented Sep 6, 2019

Hi @mjatharvest – I'm not able to reproduce this issue, and CacheFlag doesn't appear to actually use the Stringy library. I suspect the problem is elsewhere...

Any chance you can turn on devMode and share a full stack trace?

@ghost
Copy link
Author

ghost commented Sep 6, 2019

Thanks for the quick reply @mmikkel

I'm on Craft 3.3.0.1
Using CacheFlag 1.0.3

A full stack trace is attached.

For me, the issue is related to the |snake twig filter on line 35 of index.twig at vendor/mmikkel/cache-flag/src/templates/index.twig

PDF of stack trace here:
Error.pdf

@ghost
Copy link
Author

ghost commented Sep 6, 2019

Screen Shot 2019-09-06 at 8 32 03 AM

Let me know if there is anything other info that would be helpful for you to have.

@mmikkel
Copy link
Owner

mmikkel commented Sep 6, 2019

Thanks a lot for the extra info, @mjatharvest!

I don't think this is a problem with CacheFlag – snake is actually a core filter (I'm pretty sure you'd see the same exception if you used snake in a frontend template), and the error occurs inside Craft's StringHelper class. I know there's been some issues with Stringy on PHP 7.3, and Craft actually swapped out the Stringy package for a different distribution, in Craft 3.3.0.

You'll need to get in touch with [email protected] (or file an issue to the Craft repo).

@mmikkel mmikkel closed this as completed Sep 6, 2019
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

1 participant