You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
Trying to use the Tags extension while not having Flags installed causes a boot error that prevents access to the forum.
Steps to Reproduce
Install fresh Flarum, or just enable any extensions including Tags
composer remove flarum/approval flarum/flags (Approval must be removed as well because it requires Flags)
Try to access forum. Observe boot error
Flarum encountered a boot error (Exception)
Model Flarum\Flags\Flag cannot be visibility scoped as it does not use Flarum\Database\ScopeVisibilityTrait.
thrown in /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extend/ModelVisibility.php on line 48
Exception: Model Flarum\Flags\Flag cannot be visibility scoped as it does not use Flarum\Database\ScopeVisibilityTrait. in /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extend/ModelVisibility.php:48
Stack trace:
#0 /home/clark/Projects/flarum-beta15/vendor/flarum/tags/extend.php(86): Flarum\Extend\ModelVisibility->__construct('Flarum\\Flags\\Fl...')
#1 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extension/Extension.php(307): require('/home/clark/Pro...')
#2 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extension/Extension.php(129): Flarum\Extension\Extension->getExtenders()
#3 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extension/ExtensionManager.php(334): Flarum\Extension\Extension->extend(Object(Illuminate\Container\Container))
#4 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Extension/ExtensionServiceProvider.php(30): Flarum\Extension\ExtensionManager->extend(Object(Illuminate\Container\Container))
#5 [internal function]: Flarum\Extension\ExtensionServiceProvider->Flarum\Extension\{closure}(Object(Flarum\Foundation\Application))
#6 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Foundation/Application.php(322): call_user_func(Object(Closure), Object(Flarum\Foundation\Application))
#7 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Foundation/Application.php(263): Flarum\Foundation\Application->fireAppCallbacks(Array)
#8 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Foundation/InstalledSite.php(148): Flarum\Foundation\Application->boot()
#9 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Foundation/InstalledSite.php(81): Flarum\Foundation\InstalledSite->bootLaravel()
#10 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Http/Server.php(56): Flarum\Foundation\InstalledSite->bootApp()
#11 /home/clark/Projects/flarum-beta15/vendor/flarum/core/src/Http/Server.php(33): Flarum\Http\Server->safelyBootAndGetHandler()
#12 /home/clark/Projects/flarum-beta15/public/index.php(26): Flarum\Http\Server->listen()
#13 {main}
Expected Behavior
Two things could be done. Either:
Flags needs to be a required dependency of Tags
The Extend\ModelVisibility extender must somehow accept and skip missing classes
If we go with the first, then removing Flags with composer simply wouldn't remove the package and not cause any error.
If we go with the second, then we expect no boot error.
Environment
Flarum version: beta 15
Possible Solution
See above
Additional Context
Found while running unit tests that load Tags only. But this could reasonably happen on a forum where the admin decides to completely remove Flags.
The text was updated successfully, but these errors were encountered:
Bug Report
Current Behavior
Trying to use the Tags extension while not having Flags installed causes a boot error that prevents access to the forum.
Steps to Reproduce
composer remove flarum/approval flarum/flags
(Approval must be removed as well because it requires Flags)Expected Behavior
Two things could be done. Either:
Extend\ModelVisibility
extender must somehow accept and skip missing classesIf we go with the first, then removing Flags with composer simply wouldn't remove the package and not cause any error.
If we go with the second, then we expect no boot error.
Environment
Possible Solution
See above
Additional Context
Found while running unit tests that load Tags only. But this could reasonably happen on a forum where the admin decides to completely remove Flags.
The text was updated successfully, but these errors were encountered: