Skip to content

fix(theme): remove ember-this-fallback usage for Discourse 2026.4+ / Ember 6.10#74

Open
rapekas wants to merge 4 commits into
VaperinaDEV:mainfrom
rapekas:main
Open

fix(theme): remove ember-this-fallback usage for Discourse 2026.4+ / Ember 6.10#74
rapekas wants to merge 4 commits into
VaperinaDEV:mainfrom
rapekas:main

Conversation

@rapekas
Copy link
Copy Markdown

@rapekas rapekas commented Apr 29, 2026

Closes #72

Problem

On Discourse 2026.4.0-latest / Ember 6.10.1, the theme bundle fails to load with:

Could not find module 'ember-this-fallback/js-component' imported from (require)

Discourse no longer ships the ember-this-fallback compatibility layer; theme templates that still go through the old this-property-fallback pipeline can emit require() calls for ember-this-fallback/js-component (and related paths like is-component).

Root cause in this theme

  1. Colocated right-sidebar-blocks-below.hbs — standalone .hbs for a theme component is compiled on a path that still depends on ember-this-fallback helpers.
  2. Stray {{yield}} in fkb-panel.gjs — inside the badges {{#each}}, yield is not a real block API for this component; the AST can be treated as an ambiguous path and wrapped with fallback helpers that pull in removed modules.

Changes

  • Replace javascripts/discourse/components/right-sidebar-blocks-below.hbs with right-sidebar-blocks-below.gjs:
    • Use settings.right_sidebar_below_fkb_panel instead of (theme-setting ...).
    • Resolve the Right Sidebar Blocks entry with getOwner(this).resolveRegistration("component:right-sidebar-blocks") and render with <this.rightSidebarBlocks /> (no legacy .hbs; no #let needed).
  • fkb-panel.gjs: remove the erroneous {{yield}} from the badge loop.

Verification

  • Install theme on Discourse ≥ 2026.4 with Right Sidebar Blocks if testing right_sidebar_below_fkb_panel.
  • Hard-refresh / update theme from git; confirm theme-javascripts/*.js hash changes and the orange admin banner is gone.
  • Browser console: no ember-this-fallback/* errors for this theme.

References

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.

[Bug] 主题在 Discourse 2026.4.0-latest 上崩溃 — 无法找到模块 'ember-this-fallback/js-component'

1 participant