"composer was opened without a draft key"


this came up a few times, but, was unable to get it to do it on purpose. only thing consistent was that i was on mobile. i have the latest update(s).

(Régis Hanol) #2

Does it happen in safe mode on that site?

(David Taylor) #3

I have also had reports of this error on my site sporadically for the last few months. I’ve been unable to track down the cause or any way to reproduce it myself. Apparently it occurs on iOS when clicking the new topic button.

I realise that’s not particularly helpful, but maybe it rules out any specific customisations @8BIT has in place.


i can’t seem to replicate it consistently enough, but, i do not think so…

(Jeff Atwood) #5

This is your alert @sam any diagnostic ideas?

(David Taylor) #6

I’ve managed to reproduce this consistently on mobile

  1. Visit https://meta.discourse.org/categories, refresh the page
  2. Navigate to Latest
  3. Click New Topic
  4. Error occurs

Navigating to another page resolves the issue. Here’s a video of the process:

(Sam Saffron) #7

Marking this as a #bug with a #pr-welcome now that we have a clear repro.

(Joffrey Jaffeux) #9

I will take it as Im currently facing the same kind of bug with the new reply select kit component, and Im digging through this code.

(Joffrey Jaffeux) #10

So this is coming from here:

const style = !this.site.mobileView && this.siteSettings.desktop_category_page_style;

So on mobile we are calling promise = CategoryList.listForParent(this.store, parentCategory); while on desktop we are calling promise = this._loadCategoriesAndLatestTopics(); which is effectively setting the draft_key: discourse/discovery-categories.js.es6 at master · discourse/discourse · GitHub

I went with this easy fix:

As I didn’t want to refactor the whole discovery-categories file, do you think that should be enough @sam ?

(Sam Saffron) #11

Seems fine to me, very safe change.

(Joffrey Jaffeux) #12

This topic was automatically closed after 24 hours. New replies are no longer allowed.