Troubleshooting¶
Examples from existing plugins, plus solutions to common problems.
Examples from existing plugins¶
Before diving into problems, these three plugins serve as reference implementations at different complexity levels:
Simple — Dishes¶
- Adds one menu link
- No event tiles, no filters
- Minimal
Kernel.phpwith all methods returning empty/null - See:
plugins/dishes/src/Kernel.php
Intermediate — Film Club¶
- Multiple menu links with priorities
- Event tiles (voting box on event detail page)
loadPostExtendFixturesto create votes for recurring events- Cron tasks to close expired votes
AdminNavigationInterfacefor admin sidebar- See:
plugins/filmclub/src/Kernel.php
Advanced — MultiSite¶
EventFilterInterface— group-based event visibilityMenuFilterInterface— domain-context menu filteringActionAuthorizationInterface— membership-gated RSVPAdminNavigationInterface— multi-section admin sidebarEntityActionInterface— reacts to member and event lifecycle events- See:
plugins/multisite/src/— the reference for all plugin integration points
Common problems¶
Plugin not showing up¶
- Check
config/plugins.php— is the plugin key listed? - Run
just plugin-enable your-pluginto add it. - Clear the cache:
just app cache:clear
Services not autowired¶
- Check the namespace: must be
Plugin\YourPlugin\* - Verify
config/services.yamlhas the correctresourcepath (../src/) - Ensure the class is not in the
excludelist - Clear the container:
just app cache:clear
Templates not found¶
- Use the Twig namespace:
@YourPlugin/template.html.twig - Verify the template is in
plugins/your-plugin/templates/ - Check the subdirectory path matches:
@YourPlugin/sub/dir/file.html.twig - Clear the template cache:
just app cache:clear
Fixtures not loading¶
- Ensure fixture classes extend
App\DataFixtures\AbstractFixture - Check the class is in
plugins/your-plugin/src/DataFixtures/ - Re-run:
just devModeFixtures
Filter interface not applied¶
Symptom: Events / menu links / members are not filtered even though your filter class exists.
Cause: Missing #[AutoconfigureTag] attribute.
Fix: Add the correct tag to your class:
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
#[AutoconfigureTag('app.event_filter')] // For EventFilterInterface
#[AutoconfigureTag('app.menu_filter')] // For MenuFilterInterface
#[AutoconfigureTag('app.cms_filter')] // For CmsFilterInterface
#[AutoconfigureTag('app.member_filter')] // For MemberFilterInterface
readonly class YourFilter implements EventFilterInterface
{
// ...
}
Then clear cache: just app cache:clear
EntityAction handler not firing¶
Symptom: Your EntityActionInterface implementation is never called.
Cause: Missing #[AutoconfigureTag('app.entity_action')].
Fix:
#[AutoconfigureTag('app.entity_action')]
readonly class YourHandler implements EntityActionInterface
{
// ...
}
Admin section not appearing¶
- Check that your controller implements
AdminNavigationInterface - Verify
getAdminNavigationConfig()returns a non-nullAdminNavigationConfig - If
sectionRoleis set, confirm the current user has that role - Individual
AdminLinkentries with arolewill be hidden if the user lacks that role
Migrations not running¶
- Migration files must be in
plugins/your-plugin/migrations/ - The plugin's
config/packages/doctrine_migrations.yamlmust point to that directory - Run:
just app doctrine:migrations:migrate - For dev reset:
just devModeFixturesruns migrations automatically
Cache issues after config changes¶
After changing service configuration, routes, or Twig templates:
After enabling or disabling a plugin: