Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEF Enabled & Multiple Templates Breaks Article & Template Display #43776

Closed
cozioscob opened this issue Jul 12, 2024 · 3 comments
Closed

SEF Enabled & Multiple Templates Breaks Article & Template Display #43776

cozioscob opened this issue Jul 12, 2024 · 3 comments

Comments

@cozioscob
Copy link

Steps to reproduce the issue

Using multiple template styles linked to multiple menu items (e.g. Template Style 1 assigned to 20 menu items, Template Style 2 assigned to a different set of menu items, etc) returns a 404 when clicking a menu item once past a certain number of menu items or templates. Some menus work as they should, some don't

Expected result

Page is displayed correctly with assigned menu style

Actual result

404

System information (as much as possible)

Seems to be a permanent bug across all Joomla versions but. Joomla 5.1.2, php 8.3.7

Additional comments

Hi

I've had this issue over multiple versions of Joomla. Just upgrading an older site to J5 and it's flagged it up again.

I have quite a complex menu structure with 4 main menu items all with their own associated extra menus and individual template styles.

When clicking on main menu items this then displays a secondary menu specific to that main menu and with the specific template style for that entire section. In effect a pseudo set of 4 x websites all inside one with 4 templates styles all loading and presenting their own menus depending on the main menu.

This works well with SEF URLS and URL rewriting turned off, however turning this on throws errors..
.....once past a certain amount of menu items or maybe template styles the website no longer displays the article & template, instead throwing a 404 error and the call stack below.
It seems the template isn't being loaded which then breaks the entire page. (Yes the templates are all assigned correctly to relevant menu items!)

Past fixes here viewtopic.php?t=671239 e.g. in J3 adding $this->route(); to getTemplate() function in "root/libraries/cms/application/site.php" worked for some.

I've temporarily managed to get around this by using the 'Direct Alias' plugin which shortens all the url's but I'd like to see if this is fixable without plugins and using native SEF.

Any suggestions?

Function Location

1 () JROOT/libraries/src/Router/Router.php:155
2 Joomla\CMS\Router\Router->parse() JROOT/libraries/src/Application/SiteApplication.php:754
3 Joomla\CMS\Application\SiteApplication->route() JROOT/libraries/src/Application/SiteApplication.php:244
4 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:306
5 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:58
6 require_once() JROOT/index.php:32

@Hackwar
Copy link
Member

Hackwar commented Jul 12, 2024

I don't think this is an issue of the Joomla core... Can you provide a link to the website where we can see this?

@Hackwar
Copy link
Member

Hackwar commented Jul 12, 2024

You are doing something very strange on your site. On the "Brands" page you have URLs which include an index.php even though your site is set to use mod_rewrite. At the same time the /outdoor menu item is broken since the component which is linked to this is not installed.

The error you get is for a broken URL, not something related to a different template style and especially this error is not something you could have gotten in J3 already, since the code didn't exist at that time. To debug this further, at least I would have to have backend and FTP access to your site. If you want me to look into this, send me the credentials to info@joomlager.de and I'll have a look.

@Hackwar
Copy link
Member

Hackwar commented Jul 12, 2024

I took a look at the site and it seems to be a server misconfiguration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants