Subject: Bug With Empty URL Returning HTTP 200 (SPPB Routing Issue) - Question | JoomShaper

Subject: Bug With Empty URL Returning HTTP 200 (SPPB Routing Issue)

AM

Anton Majoroff

SP Page Builder 2 months ago

Hello, I would like to report a routing bug in SP Page Builder Pro.

Steps to reproduce: Environment: Joomla 5 or 6 (the issue exists on both).

Steps:

  1. Install Joomla 5.4.5 with the Shaper Helix Ultimate template.
  2. Set the homepage to a page built with SP Page Builder Pro (Page type).
  3. Create a menu item of type "Category Blog" and add several articles to that category.

Open the site and navigate to that blog category menu item. For example: https://test5.my-joomla.ru/tests/test1 Where: tests = category alias test1 = article alias → Everything works as expected.

The issue: Now change the URL to remove the category part: https://test5.my-joomla.ru/test1

Expected result: HTTP 404 (Not Found).

Actual result: The SPPB routing intercepts the request, searches the database for an article with alias test1, and tries to display it. It fails, but instead of a 404, the page returns HTTP 200 OK and shows this message:

"You don't have permission to access this. Please contact a website administrator if this is incorrect."

Problem: The page returns HTTP 200, so it gets indexed by search engines. There is no redirect. This creates an unwanted duplicate page for every article.

Temporary workaround I found: In the file: /components/com_sppagebuilder/router.php

Right after the method:

private static function getCollectionItemIdFromSlug($slug)
{

I added:

return null;

This prevents SPPB routing from intercepting these URLs, and the pages no longer exist.

Request: Could you please look into this issue? A proper fix is needed so that SPPB does not handle these "empty" URLs and return HTTP 200. Currently, it creates unnecessary indexable pages.

Thank you.

0
13 Answers
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 months ago #223925

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. Okay, I unbderstand your point of view. Did you check same thing default Joomla Template Cassiopeia? If not, Please check and let me know.

Best regards,

Toufiqur Rahman (Team Lead, Support)

0
AM
Anton Majoroff
Accepted Answer
2 months ago #223936

In the Cassiopea template, a 500 error occurs on such duplicate pages. 0 A key is required And the message is: "You don't have permission to access this. Please contact a website administrator if this is incorrect"

I've observed this issue on several of my websites that use SSPB and the Helix Ultimate template, and I've created a test website to demonstrate the problem.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 months ago #223941

If you are not using Helix Framework or SP Page Builder, does this issue still occur? Please confirm this for me.

0
AM
Anton Majoroff
Accepted Answer
2 months ago #223969

I tried disabling the System - Helix Ultimate Framework plugin, but the problem persists.

On the Helix Ultimate template, we get a 200 status code and blank pages.

On the Cassiopeia template, we get a 500 status code and an error in SPPB: "0 A key is required."

SPPB routing intercepts and finds these articles by alias, in this case it should not intercept them and create these duplicates.

Working test pages

https://test5.my-joomla.ru/tests/test1

https://test5.my-joomla.ru/tests/test2

https://test5.my-joomla.ru/tests/test3

Problematic Duplicates (They shouldn't exist.)

https://test5.my-joomla.ru/test1

https://test5.my-joomla.ru/test2

https://test5.my-joomla.ru/test3

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #224063

Could you kindly grant me access to your Joomla administrator area so that I can investigate the issue you're experiencing? Prior to providing access, please ensure that you have backed up your site. Additionally, it's important to note that providing login credentials is entirely voluntary on your part; we respect your decision either way. However, if you do choose to share the login details, it would greatly expedite the resolution process. Thank you for your cooperation.

0
AM
Anton Majoroff
Accepted Answer
1 month ago #224104

Hello. All accesses are provided at the top in the block Hidden Content

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #224107

Please check the URL now. The same behavior also occurs on the default Joomla setup, so this is the normal behavior of Joomla.

Note: Helix & Page Builder is disabled.

0
AM
Anton Majoroff
Accepted Answer
1 month ago #224110

This is a small test site to demonstrate the problem.

My sites use the Helix Ultimate template. The homepage is made with SP Page Builder.

Yes this solves the problem, but I can't just disable the template and SP Page Builder.

I need it to work as you did with the SP Page Builder and the Helix Ultimate template, returning a 404.

The temporary solution from the first post solves this problem, but it may not be entirely correct.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #224116

Hit this URL

0
AM
Anton Majoroff
Accepted Answer
1 month ago #224117

It works. And it should also work on existing pages. test1, test2, test3.

This is a test site, and there are 3 articles. On my production sites, I have hundreds of articles, and they create hundreds of duplicates with white pages and a 200 code. They are indexed. They should be 404.

We need to do something with SPPB's routing so that it doesn't intercept these URLs.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #224195

I think the issue is happening on the subdomain. When I checked it locally, everything worked fine. However, after testing it on the subdomain, the problem still persists.

Local

https://prnt.sc/1LZm1nexZOGh

Sub domain

https://prnt.sc/pDAkw4P3RKn0

0
AM
Anton Majoroff
Accepted Answer
1 month ago #224200

I have freshly deployed a clean Joomla 5.4.5 on my main domain my-joomla.ru and repeated all steps:

  1. Installed the Helix Ultimate template.

  2. Created a category "News" and added 3 news articles to it.

  3. Set the site homepage using SPPB.

  4. Created a menu item "News" (Category Blog).

When I go to https://my-joomla.ru/news – I see 3 news items as a category blog. That works as expected.

If I open one of the news articles (the first one), I get its detailed version: https://my-joomla.ru/news/news-1 – this works.

However, if I remove /news from the URL, I get the same problem: https://my-joomla.ru/news-1 – this is not resolved. The subdomain is not the issue.

I have many production sites. The same problem exists there. Here is an example of a production site: https://1c-antares.ru/services/erp - works https://1c-antares.ru/erp - not 404

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 1 month ago #224212

Okay, I will share your issue to our developer team. Thanks

0