Skip to content

Component views: look for overrides under the component that owns the… - #1941

Merged
nkissebe merged 1 commit into
hubzero:2.4-mainfrom
qubeshub:component-override-fix
Oct 13, 2026
Merged

nkissebe merged 1 commit into
hubzero:2.4-mainfrom
qubeshub:component-override-fix

Conversation

@mdlama

@mdlama mdlama commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

… view

Drew comment: Component views that were loaded from a group plugin (like the com_wiki pages) weren't overriding correctly in a supergroup. Claude explains it better than I could below.

Claude comment: A group's wiki renders com_wiki's views inside a com_groups request, so template overrides were searched for under html/com_groups/pages/ and html/com_wiki/pages/ overrides (e.g. wikimenu.php, submenu.php) were ignored. When no override_path is given, derive the component from the view's base_path instead of the request's option.

… view

A group's wiki renders com_wiki's views inside a com_groups request, so
template overrides were searched for under html/com_groups/pages/ and
html/com_wiki/pages/ overrides (e.g. wikimenu.php, submenu.php) were
ignored. When no override_path is given, derive the component from the
view's base_path instead of the request's option.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mdlama
mdlama requested a review from nkissebe as a code owner October 7, 2026 20:31
@nkissebe
nkissebe merged commit 67821ff into hubzero:2.4-main Oct 13, 2026
0 of 2 checks passed
nkissebe added a commit that referenced this pull request Oct 13, 2026
…ent directories too

Component::path() looks for components/wiki before components/com_wiki,
so a component directory need not carry the com_ prefix. The helper that
#1941 added found the owning component by scanning the view's base path
for a com_* segment, which returns nothing for such a directory and left
the view falling back to the request's option, the very bug the change
fixed for prefixed ones.

Take the directory after "components" instead, adding the prefix when it
is missing, and keep the com_* scan for paths that are not under a
components directory.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants