/default added to URL when user clicks same page URL - Forum | JoomShaper
Awaiting an answer SP Page Builder

/default added to URL when user clicks same page URL

Asked by Karen Dunne 2 years ago Last activity 2 years ago

If a user clicks on a SP Page Builder PAGE menu item of the page they are already on, the URL adds /default to the end, which leads to a 404. Here's a demo (15 sec): https://www.loom.com/share/5741cbd285ff4373beba20c5c0928789?sid=67863eec-1e39-4fa5-91a9-9173b32cbb9f

I've have done extensive testing to determine that this happens when there is a module, i.e. Events Booking - Upcoming Events, in a SPPB PAGE.

Importantly, using the module does not cause a conflict when it's within an SPPB ARTICLE, only when it's in an SPPB PAGE.

This URL is an example: https://bobbarrows.com/transition-101 changes to https://bobbarrows.com/transition-101/default
This does not happen on a browser reload, so be sure to click on the menu link which is in the drop down (it's the only drop down menu).

I have been working with the developer of Events Booking, from Joomdonation, but he is unable to determine the cause because the link from menu item is not controlled by Events Booking. He looked at the routing code and thinks it's very likely the added default in URL comes from that block of routing code in the file
/components/com_sppagebuilder/router.php, possibly the block of code from around 84 to 91 which process $query['layout'] variable.

Please advise.

17 replies

Paul Frankowski Senior Staff

Hi Karen,

we don't have solution yet, thanks for short investigation.

I have question, what would happen if that Events Booking module is used in Module position below component area where the Page content is ??

Paul Frankowski Senior Staff

BTW

Today I clicked on submenu items from "Events" menu starting from being on /transition-101 and I couldn't reproduce issue. From which subpage I should start?

Karen Dunne Asked this

Hi Paul,

Yes, thank you, that's what I've done as a work-around for now. Ultimately, I'd like to position it in the middle of the content, and not be limited to say the top of bottom of the SPPB Page.

Paul Frankowski Senior Staff

Oh, I see it now. Weird.

as "Duck tape" solution I would add redirection from /transition-101/default to /transition-101

hopefully only(?) that subpage has that problem.

Karen Dunne Asked this

Oh right, a redirect, yeah, I could do that. But, the pages that are intended to use the module are all of them in the drop down. At the moment, there are nine, and more to come. I guess that would be similar to making a bunch of separate modules, which I've done already as the work-around.

I left the transition-101 active with the /default behavior so there would be a menu item to see what happens.

Karen Dunne Asked this

I'm glad you mentioned the redirect. It's still duck-tape work-around but then I could do what I want with the module placement. Extra modules, assignments, and redirects add to the things to keep track of, but so it goes.

Paul Frankowski Senior Staff

2nd "fix" would be to create hidden menu alias from /transition-101/default to /transition-101.

I know, it's still silver "Duck Tape", but solid and for one link there's no time to waste. And it's better to go ahead.

Paul Frankowski Senior Staff

3th fix - divide content into: page and two modules below, one with easybooking and below SPPB module. But this is already an unnecessary "uphill" combination.

Karen Dunne Asked this

Hi Paul,

Could you tell me an update on this please?

Thanks,

Karen

Log in to reply.