Log1x / acf-editor-palette

A Gutenberg-like editor palette color picker field for Advanced Custom Fields.
https://github.com/Log1x/acf-editor-palette
MIT License
95 stars 14 forks source link

Fatal Error: Class "Log1x\AcfEditorPalette\Field" not found #49

Closed responsemktg closed 1 year ago

responsemktg commented 1 year ago

I'm getting a fatal error when installing this (both with composer and as a download):

2022/11/16 15:12:04 [error] 84649#84649: *199 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "Log1x\AcfEditorPalette\Field" not found in [...]mu-plugins/acf-editor-palette-1.1.6/plugin.php:82

Bedrock/Trellis latest version Sage10 PHP 8.1 ACF Pro 6.0.3 AcfEditorPalette 1.1.6

Full Trace:

2022/11/16 15:12:04 [error] 84649#84649: *199 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class "Log1x\AcfEditorPalette\Field" not found in /www/mysite/public/releases/20221116150920/web/app/mu-plugins/acf-editor-palette-1.1.6/plugin.php:82
Stack trace:
#0 /www/mysite/public/releases/20221116150920/web/wp/wp-includes/class-wp-hook.php(307): class@anonymous->Log1x\AcfEditorPalette\{closure}(5)
#1 /www/mysite/public/releases/20221116150920/web/wp/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#2 /www/mysite/public/releases/20221116150920/web/wp/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#3 /www/mysite/public/releases/20221116150920/web/app/mu-plugins/advanced-custom-fields-pro/acf.php(297): do_action('acf/include_fie...', 5)
#4 /www/mysite/public/releases/20221116150920/web/wp/wp-includes/class-wp-hook.php(307): ACF->init('')
#5 /www/mysite/public/releases/20221116150920/web/wp/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)

Let me know how I can help!

Log1x commented 1 year ago

I'm not sure how you'd be getting this error installing through Composer. I'm using this plugin in 6 sites without any problems. :(

I can't reproduce this no matter what I do.

responsemktg commented 1 year ago

I think, i just answered my own question. I had installed through composer, but in the composer json I must have had a bit of brain fog:

I put the path in the mu plugins like so:

"installer-paths": {
      "../../mu-plugins/{$name}/": [
        "type:wordpress-muplugin",
        "log1x/acf-editor-palette"
     ]
}

That must have freaked it out. Sorry for the false alarm.