Skip to content

Fix TopMenu compatibility with HumHub v1.19 - #41

Merged
luke- merged 1 commit into
masterfrom
fix/topmenu-addentry-compat
Jun 6, 2026
Merged

Fix TopMenu compatibility with HumHub v1.19#41
luke- merged 1 commit into
masterfrom
fix/topmenu-addentry-compat

Conversation

@luke-

@luke- luke- commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace deprecated addItem() call with addEntry(new MenuLink([...])) in onTopMenuInit
  • addItem() was removed in HumHub v1.19 (deprecated since v1.4), causing an UnknownMethodException on installs running v1.19
  • addEntry() is available since v1.4, so the fix is fully backward-compatible with v1.18

Reviewed for other v1.19 removals: The module's other usages of core APIs (BaseNotification, bootstrap\Button, LayoutAddons, ActiveForm) are all unaffected — none of the removed methods or constants are used.

Test plan

  • Install on HumHub v1.18: module loads without errors, top menu entries appear
  • Install on HumHub v1.19: UnknownMethodException is gone, top menu entries appear
  • Pinned competitions appear correctly in the top navigation
  • Active state highlights the correct competition when viewing it

addItem() was removed in HumHub v1.20 (deprecated since v1.4).
addEntry() with MenuLink is available since v1.4 and works across
v1.18, v1.19, and v1.20.
@luke- luke- changed the title Fix TopMenu compatibility with HumHub v1.20 Fix TopMenu compatibility with HumHub v1.19 Jun 6, 2026
@luke-
luke- merged commit 095d026 into master Jun 6, 2026
18 of 21 checks passed
@luke-
luke- deleted the fix/topmenu-addentry-compat branch June 6, 2026 22:39
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.

1 participant