[BUG REPORT] Collection Items: "Unpublished" records still accessible via direct URL + SEO Duplicate content - Forum | JoomShaper
Staff replied SP Page Builder Joomla 6 v6.10.0

[BUG REPORT] Collection Items: "Unpublished" records still accessible via direct URL + SEO Duplicate content

Asked by S-D CONSULTING 3 days ago Last activity 2 days ago

Hi,

I'm writing to report two major logic flaws in how SP Page Builder handles routing and publishing states, specifically regarding the new Collections architecture (dynamic view).

Issue 1: Unpublished Collection Items do not return a 404 error
When I set a Collection Item to "Unpublished" (or "Trashed") from the backend, it correctly disappears from the Addon grid. However, if a user or Google visits the direct SEF URL of that item, the page loads perfectly fine instead of returning a 404 Error.
Why this happens: It seems that the dynamic view controller relies on the status of the "Slug Page" (which is always published) but completely forgets to check the published state of the actual record inside the #__sppagebuilder_collection_items table.

Issue 2: SEO Duplicate Content (Orphan URLs)
SP Page Builder routing allows the same collection item (or standard page) to be loaded via multiple URLs.
If the correct URL is domain.com/menu-category/item-alias, a user can simply strip the menu path and visit domain.com/item-alias. Instead of throwing a 404 or doing a 301 redirect to the canonical URL, SPPB uses a fallback to the Homepage Itemid and loads the page anyway. This creates massive Duplicate Content issues for SEO.

Our temporary workaround:
To protect our clients' SEO, we had to write a custom Joomla System Plugin using the onAfterRoute event.
Our plugin intercepts requests where option=com_sppagebuilder, checks if view=dynamic, reads the collection_item_id, and queries the #__sppagebuilder_collection_items table directly. If the state is != 1, it forces a throw new \Exception(..., 404);. We also added logic to prevent the fallback to the default Itemid, forcing a 404 on short/orphan URLs.

Question for the Devs:
Are you aware of these routing/publishing bypass issues? Can we expect a native core fix for the dynamic view controller in the upcoming updates so that unpublished items actually return a 404 natively?

The plugin I created works on any site; I named it sppb404fix.

As I explained, it makes no sense for collection content to remain accessible via its alias (SEF URL) after it has been unpublished.

For now, I have tested the plugin on a couple of websites; let's see if I encounter any issues on others.

Thanks!

2 replies

S-D CONSULTING Asked this

If you want to see the problem, you can test it directly on your demo sites as well (I am referring to the duplicate URLs).

Just go here:
https://demo2.joomshaper.com/2025/mednic/index.php/doctors/doctor-list-classic/dr-david-johnson

You can click here:
https://demo2.joomshaper.com/2025/mednic/index.php/doctors/doctor-list-classic/dr-david-johnson
https://demo2.joomshaper.com/2025/mednic/index.php/doctors/dr-david-johnson
https://demo2.joomshaper.com/2025/mednic/index.php/dr-david-johnson

Even if I remove the SEF parts of the menu that structure the SEO, the page doesn't return a 404 error and opens anyway.

This is very bad for SEO.

Toufiq Senior Staff

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. I will share your issue with our development team. I hope they will fix it soon.

Best regards,

Toufiqur Rahman (Team Lead, Support)

S-D CONSULTING Asked this

Okay, I’ve developed a plugin that solves the problem for me, and I can share it with you if you’re interested. However, it works exactly as I described.
It would be helpful to know when you plan to address this, as it’s causing significant SEO damage; knowing when an update will be released would let us know when to uninstall our workaround.

Thanks.

Toufiq Senior Staff

Sure! You can share.

S-D CONSULTING Asked this

In the hidden content

Toufiq Senior Staff

Thank you :)

Log in to reply.