In ConcreteCMS 9.4.8 (Japanese version), a blank page is displayed instead of an error message for non-existent URLs

Thank you for your continued support.
In ConcreteCMS 9.4.8 (Japanese version), a blank page is displayed instead of an error message for non-existent URLs.
Clearing the cache did not resolve the issue.
If the URL ends in a number, a blank page is displayed; if it ends in an English letter, a correct 404 error occurs.
Upon further investigation, “demo.com/blog/1-9999” displays a blank page, while “demo.com/blog/10000-” correctly results in a 404 error.

Have you encountered this phenomenon before?

We are using canonical URLs.

Thank you for your assistance.

When I checked the “Settings” → “Location” on the blank page “demo.com/blog/50”, I found that the parent page “demo.com/blog” was displayed.

The strange thing is that the “demo.com/blog” page displayed from “demo.com/blog/50” has a blank space below the header, whereas accessing “demo.com/blog” directly has content below the header.

Both “Location” is “demo.com/blog”, yet one page is blank and the other has content.

Is it possible for the same URL to display differently?

Thank you for your help.

There are a lot of bugs…
It’s easy to use, but does that mean the system is unstable?
Please tell me!

Do you have any error in the logs when you see the blank page?
Check the Concrete dashboard page Reports > Logs, as well as the error log of your web server

I checked the logs from the report when I opened a blank page, but there were no errors.

Currently, the symptoms are different. When I access “demo.com/blog/1”, the “demo.com/blog/” page is displayed.

When I access “demo.com/1”, “demo.com” is displayed, and when I access “demo.com/a”, it displays “404 Error: Page Not Found. The page you are looking for may not exist or may have been deleted,” which is normal behavior.

Thank you for your assistance.

Go to dashboard > system & settings > seo > Excluded URL Word List
You will find that ‘a’ is not allowed as a url.

“a” is an example.
If you access a non-existent URL like “company” under “demo.com”, you will get a correct 404 error, but if it’s a number, the homepage will be displayed.
The theme is Replica Pro.
I also tested it with the Modena theme, and it correctly returned a 404 error for non-existent URLs, regardless of whether they were letters or numbers.

Replica Pro is treating numeric paths as “page IDs” and internally routing them to the homepage instead of letting ConcreteCMS generate a 404.**

This is not ConcreteCMS core behaviour — it’s theme‑level routing logic.

Why “/company” gives 404 but “/123” shows the homepage

ConcreteCMS normally handles routing like this:

Non‑existent text slug → 404
Non‑existent numeric slug → also 404 (normal behaviour)

But Replica Pro is doing something like:

if (is_numeric($path)) {
// treat as page ID
$page = Page::getByID($path);
if ($page->isError()) {
// fallback to home page
}
}

This is a common pattern in older Concrete5 themes that expected URLs like:

/123 to load page ID 123 directly.

So when you visit: demo.com/1

Replica Pro thinks:

  • “1” must be a page ID
  • It tries to load page 1
  • Page 1 = homepage
  • So it displays the homepage instead of a 404

Modena doesn’t do this, which is why Modena behaves correctly.

Thank you.
So it varies depending on the theme?
I didn’t know that.
If it’s due to the theme’s specifications, then there’s nothing I can do, so I’ll accept it.
Sorry for the trouble.

It should be possible to force a 404 for urls with numeric slugs.
The application/bootstrap/app.php would be an ideal candidate for this.
Let me know if you would like to try forcing a 404 for these numeric slugs and I will put a patch together for you to try.

Thank you as always for your guidance.

If possible, I think a 404 error would be preferable for non-existent URLs, as it looks bad if people bookmark them.

I would appreciate it if you could patch it for me.

Try this…
Your application/bootstrap/app.php file starts with this

/* @var Concrete\Core\Application\Application $app */
/* @var Concrete\Core\Console\Application $console only set in CLI environment */

Replace those two line of code with this

/* @var Concrete\Core\Application\Application $app */
/* @var Concrete\Core\Console\Application $console only set in CLI environment */

use Concrete\Core\Page\Page;
use Concrete\Core\Support\Facade\Events;

Events::addListener('on_page_not_found', function($event) {
    $path = trim($_SERVER['REQUEST_URI'], '/');

    if (is_numeric($path)) {
        // Force 404 for numeric slugs
        $event->setPage(Page::getByPath('/page_not_found'));
    }
});

Save the file and give it a try.

Is this alright?

I rewrote the code and uploaded the file, but there was no change.
The home page still displays when I access “demo.ocm/1”.

Did you clear your cache?
If that does not work it might be necessary to edit the theme files.
Unfortunately I do not have a copy of the theme to test this for you.
So for now, clear the concrete cache and your browser cache.
If you want me to send you a modified app.php file, send a request to my email address - david@deepsea.co.uk

I tried clearing the cache, but the problem persists.

Please provide the file.

It seems the email could not be sent.

Please check into this.

Mail Delivery Subsystem mailer-daemon@googlemail.com

| エラーアイコン |
|----|

Email delivery error

An issue occurred while delivering emails to david@deepsea.co.uk. Please refer to the detailed technical information below.
Response from the remote server:

550 High probability of spam

Try my other email
davidmeerkat@gmail.com

The file has been sent now.

Thank you.

I’ll try it now.

I thought the Replica Pro theme was well-made, but it seems to have a lot of bugs or problems.

I always have to ask questions about this theme.

I’ve canceled my subscription.

I replaced the file you sent, but I encountered the error shown in the image, and the login screen remained blank.

I have now reverted to the original file.