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

[generate:plugin:imageformatter] Cache bug #1691

Closed
itsdarrylnorris opened this issue Jan 10, 2016 · 0 comments · Fixed by #1692
Closed

[generate:plugin:imageformatter] Cache bug #1691

itsdarrylnorris opened this issue Jan 10, 2016 · 0 comments · Fixed by #1692
Milestone

Comments

@itsdarrylnorris
Copy link
Contributor

Problem / Motivation

I was running DrupalConsole from master, and I notice and when I run generate:plugin:imageformatter and use the image formatter with the views module. I got the following error.

Fatal error: Class 'Drupal\bestmoduleever\Plugin\Field\FieldFormatter\Cache' not found in /Users/darrylnorris/Drupal/drupal-8.0.1/modules/custom/bestmoduleever/src/Plugin/Field/FieldFormatter/CasperImageFormatter.php on line 196

Steps to Reproduce this bug....

  • Generate a module generate:module
  • Generate a image formatter generate:plugin:imageformatter
  • Create view that contain an image field.
  • In the view field configuration, Change the image formatter to the module formatter. Like this...

screen shot 2016-01-10 at 12 42 44 am

Solution

We need to add this as part of the generator - use Drupal\Core\Cache\Cache;

itsdarrylnorris added a commit that referenced this issue Jan 10, 2016
This fixes #1691 by adding the cache namespace.
@jmolivas jmolivas added this to the 0.10.3 milestone Jan 11, 2016
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

Successfully merging a pull request may close this issue.

2 participants