# Discourse Suggested Edits

**URL:** https://meta.discourse.org/t/discourse-suggested-edits/398691
**Category:** Plugin
**Tags:** experimental
**Created:** [March 18, 2026, 3:54am UTC](https://meta.discourse.org/t/discourse-suggested-edits/398691 "2026-03-18T03:54:25Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 31, 2026, 1:53pm UTC](https://meta.discourse.org/t/discourse-suggested-edits/398691/6 "2026-05-31T13:53:57Z")

</div>

FYI this plugin is throwing an error:

```plaintext
plugin-api.gjs:234 [PLUGIN discourse-suggested-edits] Attempted to modify "service:composer", but it was already initialized earlier in the boot process (e.g. via a lookup()). Remove that lookup, or move the modifyClass call earlier in the boot process for changes to take effect. https://meta.discourse.org/t/262064
_resolveClass @ plugin-api.gjs:234

```

 ![Screenshot 2026-05-31 at 6.53.00 AM](https://global.discourse-cdn.com/meta/original/4X/3/8/d/38d2826fc70b5136eabc224d76ec1eeab7da6d2a.png)

looks like the initializer is calling `api.customizeComposerText()` right before `api.modifyClass("service:composer", {...})` resulting in a race condition. i think the code needs to be reordered so that `api.modifyClass` runs before `api.customizeComposerText`:

> <https://github.com/discourse/discourse-suggested-edits/blob/46dab23654f7e0cddf1b96c11bf48cba6d2d665d/assets/javascripts/discourse/initializers/suggested-edits-init.gjs#L49-L63>

i opened a PR here:

> <https://github.com/discourse/discourse-suggested-edits/pull/8>
>
> Switches the order of \`api.modifyClass("service:composer")\` and \`api.customizeCo…mposerText()\` to avoid a race condition - see the console error:
> 
> \`\`\`
> plugin-api.gjs:234 \[PLUGIN discourse-suggested-edits\] Attempted to modify "service:composer", but it was already initialized earlier in the boot process (e.g. via a lookup()). Remove that lookup, or move the modifyClass call earlier in the boot process for changes to take effect. https://meta.discourse.org/t/262064
> \_resolveClass @ plugin-api.gjs:234
> \`\`\`
> 
> \`api.customizeComposerText()\` performs a lookup of the composer service \`(container.lookup("service:composer"))\` in order to register the text customizations.
> 
> Thus, \`api.customizeComposerText()\` should follow \`api.modifyClass("service:composer")\`

---

_[View the full topic](https://meta.discourse.org/t/discourse-suggested-edits/398691)._
