Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Craft randomly throws a 404 when viewing an entry in multi site setup #4320
I'm having trouble with my multi site setup. The issue can be seen here
As you can see, the page sometimes gives a 404 and sometimes shows the entry. Most of the times it's the 404, but sometimes the correct page. When I enable devMode on the staging it gives me "Template not found: safety-drone".
The general cfg for staging:
My .htaccess in /web:
Does anyone have an idea what could be the cause of this? If you need more information, please ask and I'll provide.
Thanks in advance
Guessing that you are running Craft from 2+ load-balanced servers, and the page is reliably working on one/some server(s) and reliably 404ing on another server(s).
If you are able to force traffic to specific servers you can determine which one(s) it works on vs. which one(s) it 404s, and then look into why it’s not working on the 404 server(s).
The 404 message you are getting (“Template not found: safety-drone”) means that Craft couldn’t find a live element for the URI
Well, I have 3 sites at the moment each with their localisation:
The link that I provided goes to the English site and gives the random 404 or entry page. This does not happen for the default site. It always works there (https://staging.ncentric.com/safety-drone). If the issue would be with the load-balancing, wouldn't the same issue happen for the default site too then?
Anyways, I'm going to make a new Laravel Homestead setup on my local machine to test everything out. Was using Laravel Valet until now and it has proven very difficult to get a multi site up and running on that one. Just to make sure that the problem is not with the Craft 3 cms.