flarum / flarum/framework

Enabling/Disabling extensions should clear the cache

Open
#3,758 2 comments 2 reactions 0 assignees View on GitHub
type/bug
Dominant language
PHP
Stars
6.7k
Forks
883
Avg merge
15h 16m
Merged PRs (30d)
73

Description

### Current Behavior

If you toggle an extension, the cache is not cleared. Cache clearing is necessary for situations where an extension being toggled requires for example, the formatter cache to be rebuilt so that it correctly renders content. This example situation occurs when an extension adds custom fomatter tags that optionally rely on another extension.

Such as the mentions extension adding support for tag mentions.

### Steps to Reproduce

Toggle an extension that requires cache clearing.

### Expected Behavior

Cache should be cleared.

### Screenshots

_No response_

### Environment

- Flarum version: x.y.z
- Website URL: http://example.com
- Webserver: [e.g. apache, nginx]
- Hosting environment: [e.g. shared, vps]
- PHP version: x.y.z
- Browser: [e.g. chrome 67, safari 11]

### Output of `php flarum info`

```
Output of "php flarum info", run this in terminal in your Flarum directory.
```

### Possible Solution

_No response_

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the extension toggle handling and the cache-clearing paths in the framework, then reproduce the issue by enabling or disabling an extension that affects formatter tags. Done means the relevant cache is cleared after either toggle and the formatter renders correctly afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.