Problem with Laravel routes

I have problem with routes from laravel - they are running but after that wordpres trigger 404 and loading it and looks like

<html>... laravel code...</html>

<html>...wordpres 404...</html>

If I run it in api - same.
{json}<html>...wordpres 404...</html>
Still didn’t find where can say to stop wp continue after laravel.

Also in documentation it said that is in config(not in routes) but I see in the code that routes is correct place.

Can you provide steps to reproduce your issue? Can you also provide the actual HTML that’s output?

When I visit the route included out of the box, /welcome, I’m not able to reproduce what you’re describing

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 change it to be sure it came from me with

Route::get('/laravel/', function () {
    return view('laravel');
});

Next I copy welcome.blade.php and rename it to laravel.blade.php. Replace @section('content')...
with

@section('content')
    <p>👋 Welcome to Laravel</p>
@endsection

And opened domain/laravel/

Just to see if there is something different created routes/api.php with code from laravel api.php code

<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

Route::get('/user', function (Request $request) {
    return [1=>'user'];
});

Array is returned as json and after that:

I’m not able to reproduce this issue by following the steps you provided:

  1. Rename welcome.blade.php to laravel.blade.php
  2. Replace /welcome/ with /laravel/ in web/routes.php

Can you describe your local development setup? Are you able to reproduce this issue using either Lando or Trellis?

Regarding routes/api.php: I don’t believe that stateless routes have enough support to use at this time

Don’t like to have multiple dev enviroments - already suffer from something like that in the past and also try ti imitate my machine as close to my web server. Right now only difference is PHP version which on my server I still use PHP8.1.

I tried it on my server and there didn’t have this issue. There is something different in last version of PHP which created this issue.

Also find where is happening but not why.

vendor/roots/acorn/src/Roots/Acorn/Bootloader.php
bootHttp is not terminating the process and it continue to boot wordpress
after $kernel->terminate($request, $body); added exit; and now works normally.

I was just curious if you’d be able to reproduce it in one of those environments to confirm that it’s an issue with webserver configuration or not

Valet and DDEV are also known to be working with Radicle without issues

Can you describe your local development setup? I’d really like to be able to reproduce this if possible

I am using macos m1 with last version of homebrew(updated last friday) with apache,mysql, php(8.2.6) installed and running.
Added in httpd-vhosts.conf virtual host with domain and path where it is.
Added in hosts file this domain to points to localhost(127.0.0.1).

Maybe if you use last PHP version this issue should appear. Will test tomorrow to change php version to 8.1 to see if this issue will appear and will write again.

1 Like