loadOgDataByType() and loadOgDataByMenu() ignore language on multilingual sites #47
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
loadOgDataByType()(line 324) andloadOgDataByMenu()(line 346) inMokoOG.phpquery#__mokoog_tagswithout a language filter. The mainloadOgData()method correctly filters by(language = $lang OR language = '*'), but these two helper methods do not.Since the unique key is
(content_type, content_id, language), multiple records can exist per content item. Without a language filter,loadObject()returns an arbitrary match.Impact
On multilingual sites, category-level and menu-item-level OG fallback data may come from the wrong language.
Fix
Add the same language filter pattern used in
loadOgData():Files
source/packages/plg_system_mokoog/src/Extension/MokoOG.php:324-337source/packages/plg_system_mokoog/src/Extension/MokoOG.php:346-358Branch created:
feature/47-loadogdatabytype-and-loadogdatabymenu-ig