nystudio107 / craft-imageoptimize

Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.
https://nystudio107.com/plugins/imageoptimize
Other
235 stars 37 forks source link

Missing field type #18

Closed E2design closed 6 years ago

E2design commented 6 years ago

Installed version 1.3.2

Trying to add a ImageOptimize field. Can select it from the field type dropdown but after saving the field it responds with: "The field type “nystudio107\imageoptimize\fields\OptimizedImages” could not be found."

https://d.pr/free/i/ndVNxZ

khalwat commented 6 years ago

Is the plugin installed? Does that file actually exist on disk at nystudio107.com/imageoptimize/src/fields/OptimizedImages.php?

I'd suggest trying to re-install it, something isn't right.

khalwat commented 6 years ago

It's there in the repo:

https://github.com/nystudio107/craft3-imageoptimize/blob/master/src/fields/OptimizedImages.php

E2design commented 6 years ago

Plugin installed and file is there https://d.pr/free/i/XggnIn However I do notice that the directory differs: (/craft3-imageoptimize/ vs. /imageoptimize/) nystudio107.com/craft3-imageoptimize/src/fields/OptimizedImages.php? Its installed using composer: composer require nystudio107/craft3-imageoptimize

khalwat commented 6 years ago

yeah that's okay, Composer takes care of mapping it.

Is there anything interesting/useful in your storage/logs/?

khalwat commented 6 years ago

What version of Craft 3 are you running?

Did you create the Field with an older version of ImageOptimize, and then update it to a newer version?

Try deleting the field, and re-adding it (you can use the same name).

E2design commented 6 years ago

Nothing worth mentioning in the storage logs.

Uninstalled the plugin and removed all files manually. Reinstalled the files with composer and activated the plugin. The issue remains. I'm working locally using MAMP pro.

khalwat commented 6 years ago

Did you delete the Field when you uninstalled and re-installed the plugin though?

khalwat commented 6 years ago

Can you also try re-running composer dump-autoload to make sure the Composer class map, etc. is correct?

khalwat commented 6 years ago

If that doesn't work, you can try deleting vendor/ and composer.lock and running composer install from scratch to make sure it isn't some weird Composer issue.

E2design commented 6 years ago

I'm on Craft beta 34. I created the field using the latest version of imageoptimize. Removing the field didn't help either. Adding a completely new field with a different name creating the same issue. composer dump-autoload no positive results reinstalling composer no results

khalwat commented 6 years ago

Are you able to use any plugin-provided Fields in your Craft 3 setup? Try:

https://github.com/craftcms/store-hours

-or-

https://github.com/nystudio107/craft3-recipe

E2design commented 6 years ago

The redirect plugin from Dolphiq was causing the issue. All of the third-party plugin fields ended up with the same error.

Uninstalling the redirect plugin solved the issue.