8 years ago
1
Topic

Howdy All,

First up to set the scene:

We have several content types and use Joomla standard articles as well. One of our seblod content types is events and we have standard Joomla content types for exams - sod we can have urls in the structure of:

  • /events/xyz (article ID 600 - these are imported from an external system)
  • /exams/xyz (article ID 200)

This works fine in Joomla when using category list view and works fine with defined aliases (so if I create a single article menu item under the list and search type) but where the above structure exists and exams/xyz has a lower article ID than events/xyz, navigating to either page will always display the content for exams/xyz...

I have two workarounds:

  • Adding manual overrides to the importer where collisions happen...this is reactive though and isn't ideal
  • Adding a named alias for each event, or even just for collisions - again reactive and not ideal

I've done some investigating and the seblod router's (components/com_cck/router.php) parse function (line 100 in my current install) matches the correct /events menu item but doesn't actually fufill the routing request - 

The function first checks if the request is for a form - which it isn't so the code fallse through and we set $legacy to 0...

Starting at line 116...

$legacy=0; // check later

if ( !( $menuItem->query['option'] == 'com_cck' && $menuItem->query['view'] == 'list' ) ) { 

$legacy=0; 

}

lines 117 - 119 are redundant as it sets $legacy to 0 and then sets $legacy to 0 if conditions are met - so regardless $legacy will always be 0...

next it checks for !$legacy on line 121 - this will always be true if not a form - which this case isn't so the problem should be in the code block starting at line 121

I can't spend anymore time looking for a hack but I'm certain there is an issue in this block of code - I'm happy using an alias to sort this for the extreme short terms but the router evidently needs looked at as it seems to be defaulting to the lowest ID of a matching alias regardless of the category

Do the experienced seblod folks here have any suggestions on how to continue from here?

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
0
Level 1

Please report this on the github tracker.

Get a VIP membership