Closed minemindmedia closed 2 years ago
Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
do your other wp-cli commands work that interact with the database? this looks to be an environment problem
are you on Acorn 2.0.0 or 2.0.1?
Nope, wp-cli db search
returns the same error.
I am running "roots/acorn": "^2.0",
via composer.
You will have to fix your issue with WP-CLI first.
https://github.com/Log1x/navi/issues/51 seemed to of had the same issue (possibly a similar dev environment)?
Hmm, thanks! Not sure here. I use the same dev environments for all my projects (Trellis, Bedrock, Sage) and everything works with previous versions of Sage until this latest v10 release from the 1st of March. I'll keep trying!
At there @minemindmedia, not sure if this helps but the command wp acorn optimize:clear
didn't work for me this morning on a brand new install but I found this command wp acorn clear-compiled
that fixed the problem for me.
I found the idea here.
Hi, thanks! Unfortunately, I have still having issues. The original issue was that this latest project defaulted to PHP 8.1 and was resolved by switching to 8.0. Now I can run the wp-cli commands.
I have copied the examples files to my project:
Composers/Navigation.php
partials/navigation.blade.php
and have included the file in my sections/header.blade.php
file:
@include('partials.navigation')
and I receive this error:
Illuminate\View\ViewException: Target class [navi] does not exist. (View: /srv/www/sage10test.com/current/web/app/themes/sage10test/resources/views/sections/header.blade.php) (View: /srv/www/sage10test.com/current/web/app/themes/sage10test/resources/views/sections/header.blade.php) (View: /srv/www/sage10test.com/current/web/app/themes/sage10test/resources/views/sections/header.blade.php)
Running the commands as suggested complete successfully:
vagrant@trellis:/srv/www/sage10test.com/current$ wp acorn optimize:clear
Compiled views cleared! Configuration cache cleared! Compiled services and packages files removed! Caches cleared successfully! vagrant@trellis:/srv/www/sage10test.com/current$
vagrant@trellis:/srv/www/sage10test.com/current$ wp acorn clear-compiled
Compiled services and packages files removed! vagrant@trellis:/srv/www/sage10test.com/current$
I'm running under the same issue in a fresh installation (trellis, bedrock and sage 10).
Will investigate so I can share you more insights.
Thanks!!
I'm experiencing the issue as well with various packages. It seems there is a bug in Acorn when it comes to package discovery, but I'm having trouble replicating it consistently. Sometimes it works, sometimes it doesn't.
Thanks for that quick reply @Log1x . Do you think I can help you in replicating this error?
Not 100% sure at the moment. It seems some people are having the issue while others are not. I think it's more likely to see the issue with multiple packages installed though. I've raised the issue internally & will try to get an issue raised on the Acorn tracker tonight.
In the mean time, the best you could do is publish the configs for Acorn and add Navi and any other package manually to Providers in config/app.php
Ok, thanks! That worked. Leaving further instructions if anyone else is interested:
Publish config for Acorn
wp acorn vendor:publish
Choose Roots\Acorn\Providers\AcornServiceProvider
Include Navi inside providers (config/app.php
)
Log1x\Navi\Providers\NaviServiceProvider::class,
@jdebuchy -- Thank you so much for the manual work around! Works as expected.
@minemindmedia , all the credit goes to @Log1x. I simply put his instructions into a list :).
Of course! Thanks you Brandon @Log1x
This should hopefully be fixed now with Acorn 2.0.3
Alas, I had same issue (same fix) with Acorn 2.0.3.
Did not work with 2.0.3 for me too. Using @jdebuchy's workaround.
With the latest release of sage 10 (yesterday), I am attempting to load this and am getting this same error. I copied the example for sage 10 exactly and then found this thread and attempted
wp acorn optimize:clear
on my local and receive the following error via terminal:/current$ wp acorn optimize:clear
Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Not sure what is happening here?