Closed
Description
Bug Report
Current Behavior
Whenever I try to extend content behavior using (new Extend\Frontend('forum'))->content(MyDispatcher::class)
, my callback is added before Flarum\Forum\Content\Discussion
. So I can't override settings like $canonicalUrl
, because they always get overwritten by the core component.
Steps to Reproduce
- Create an extension and add a callback to
(new Extend\Frontend('forum'))->content(MyDispatcher::class)
- On the
__invoke
function, try to set$flarumDocument->canonicalUrl
value - Discussion pages load with a different canonical url
Expected Behavior
It would be very cool if we could prioritize the order of how extensions are executed. But for this specific issue, MyComponent@__invoke
should be called after Flarum\Forum\Content\Discussion@__invoke
in order to proper extend the desired functionality.
Environment
- Flarum version: Flarum 0.1.0-beta.13
- Webserver: php built-in server
- Hosting environment: localhost
- PHP version: 7.4.3
- Browser: Chrome 84 on Windows 10
Metadata
Metadata
Assignees
Labels
No labels