If we configure the Homepage Settings (Appearance > Customize > Homepage Settings), this content will be added at the end of any Routes (ex.: /welcome/).
Any idea why it is appearing there?
It seems to me that the action template_redirect
is not called properly in public/wp/wp-includes/template-loader.php
.
ben
May 31, 2023, 3:18am
2
I’m not able to reproduce this
Can you try running wp acorn optimize:clear
?
Are you able to reproduce this issue using either Lando or Trellis from the Radicle-included configs/setup?
Yes I already tried the command.
Sorry I don’t have Lando or Trellis installed.
I usually use the PHP built-in server.
Never had any problem with any WordPress site or even Sage v9.
It’s the first time using the Acorn Routing.
I see you have same issue as me.
See my topic for current solution I found:
I am using new clean installation of redicle cloned from the repo on mac(homebrew PHP 8.2.6). With .zip file there wasn’t .env.example(which I see that there was constans that was different than normal laravel .env) and also hade issue with bud not building with exit code 1 that didn’t find solution so try another approach which was clone the repo from main branch.
On the problem:
To distinct what I am outputting in routes/web.php created replaced /welcome (didn’t sound how it was and to chang…
Thank you @sijobo !
It solves the problem by adding exit;
at line #237 of the Bootloader.php file:
/** @var \Illuminate\Http\Response */
$response = $kernel->handle($request);
if (! $response->isServerError() && $response->status() >= 400) {
return;
}
$body = $response->send();
$kernel->terminate($request, $body);
});
}
/**
* Boot the Application for WordPress requests.
*
* @param ApplicationContract $app
* @return void
*/
protected function bootWordPress(ApplicationContract $app)
{
There is no bug when using a webserver like Apache or Nginx.
Only when using the PHP built-in server:
https://www.php.net/manual/en/features.commandline.webserver.php
@ben to reproduce the bug:
Install Radicle:
composer install
cp .env.example .env
yarn && yarn build
Run the PHP built-in server:
cd public && php -S localhost:8000
or
wp server --host=localhost --port=8000
Go to http://localhost:8000/welcome/
It will show:
Welcome to Radicle
and the default content of the homepage.
I’m on PHP 8.1.
2 Likes