Component alias lookup fails on multisites (with solution) Private: (?)
No
OpenSEF Version: 2.0.0-RC5_SP2
PROBLEM:
When OpenSEF builds the list of component aliases in sef.php (~ line 30),
it loads aliases for all sites and does not sort them. Because
sefResolver::input() simply returns the first in the array with a matching
alias, you don't necessarily get the one you wanted.
SUGGESTED SOLUTION:
1. Move the code in sef.php that determines the site (~ line 158) to
precede the component alias lookup.
2. Change the query that selects the aliases to:
"SELECT * FROM #__opensef_sef_component WHERE `site_id` = {$sefSite->id} OR
`site_id` IS NULL ORDER BY site_id DESC, ordering ASC"
As an interim fix, I'm including a core extension that replaces the
sefResolver class. Change is that sefResolver::input() does a re-lookup of
the alias list based on the site id, and orders the results so that
site-specific aliases will override global aliases.
To use it, unzip and copy to /administrator/components/com_sef/extensions/
Provided by stzzo on 2007-09-28