Closed bedirhandev closed 2 months ago
I investigated it and noticed in the file: vendor\roots\acorn\src\Roots\Acorn\Application.php on line 139 there is something strange happening in my opinion.
$this->{$supportedPaths[$pathType]} = Str::startsWith($path, $this->absoluteCachePathPrefixes)
? $path
: $this->basePath($path);
It seems that it is prepending the basePath with the given path in the function basePath:
public function basePath($path = '')
{
return $this->joinPaths($this->basePath, $path);
}
when the path is e.g. C:\xampp\htdocs\wordpress\wp-content\plugins\laravel-wordpress-plugin/src\storage/framework\cache it prepends it with: C:\xampp\htdocs\wordpress\wp-content\plugins\laravel-wordpress-plugin/src\ which becomes: C:\xampp\htdocs\wordpress\wp-content\plugins\laravel-wordpress-plugin/src\C:\xampp\htdocs\wordpress\wp-content\plugins\laravel-wordpress-plugin/src\storage/framework\cache and that path does not exists and fails.
This is not a bug with Acorn. Please refer to https://github.com/roots/acorn/pull/370 or wait until an official release which will include an upgrade guide.
Update:
Even then it does not work. Can you please test this.
@Log1x Thank you for your suggestion, but it is not working even if I define the paths it is not assigning it as I debug.
E.g.
add_action('plugins_loaded', function () {
Application::configure()
->withProviders([
WordpressPluginTemplate\App\Providers\PluginServiceProvider::class,
])
->withPaths('customAppPath', 'customConfigPath', 'etc')
->withRouting(
web: __DIR__.'\src\routes\web.php',
)
->boot();
});
Version
^5.0.0-beta.0
What did you expect to happen?
I expect that Wordpress would load normally without errors.
What actually happens?
An error is displayed: There has been a critical error on this website.
Steps to reproduce
Upgrade Acorn on an existing project to v^5.0.0-beta.0 and it the website returns an error.
System info
Windows 10 Pro, 22H2
Log output
Please confirm this isn't a support request.
Yes