How to get Discourse forum engine version from a user forum environment (for example from a web browser)

AI-generated summary

The discussion revolves around obtaining the Discourse forum engine version from a user forum environment. alven initially found that some Discourse forums, including Meta, display the version in the browser’s DevTools Console using globalThis.Discourse.application.APP.version, while others do not.

Falco provided an alternative method to retrieve the version by checking the generator tag in the HTML head using the browser’s DevTools or via a curl command. This method is supported and works for all Discourse forums.

Regarding alven’s questions, Falco explained that:

  • Forum engine version is not required in bug reports because it’s easier to ask for links and check the version in the link.
  • The front-end and back-end parts of the Discourse forum engine are always the same and linked together.

The difference in behavior between Meta and other Discourse forums is due to Meta already running Ember CLI builds in production, which will be rolled out to older sites in the future. Falco clarified that all Discourse forums have the generator tag, which is the official method for obtaining the version.

Hi!

I read the Writing an effective bug report post.
I found unusual to report the problems without mentioning the forum engine version which is running on a website.

On this site I found possible way to do it: to open DevTools of a browser, Console tab and to get data from the

globalThis.Discourse.application.APP.version
//'2.8.0.beta8 510219a0daef50056420762f446aac4c88c90ba1'

But the same time opened other websites:
https://forum.manjaro.org/
https://forum.garudalinux.org/
https://discourse.ardour.org/
https://discourse.omnigroup.com/
with Discourse forum engine but I was unable to find the forum version there:

globalThis.Discourse.application
// undefined

The questions are:

  1. why forum engine version is not required in bug reports? Like it is not matter which it is: to process all as the same one, which obviously not true.
  2. why the https://meta.discourse.org resource have the version and (all?) others do not?
  3. how to realize the app version on a Discourse forum website?
  4. does the front-end and the back-end parts of the Discourse forum engine are always the same (equals to each other, strictly “linked” together)?

Thanks!

There is a generator tag in the head of the document with the current version.

You can check it easily with:

curl https://meta.discourse.org -s 2>&1 | grep generator

Or by checking the same tag in the browser dev tools by pressing F12.

It’s easier to ask for links and then we can go and check the version in the link looking the the HTML. There are lots of non-technical users in here.

Yes.

Awesome.
Or via DOM query with JS from console of the page:

document.head.querySelector('meta[name=generator]').content

Almost answered all, the

remains. May be you know and that also?

All the others have the generator tag. That is the official and only supported way to getting the version.

But the difference you see on the Discourse.application.APP.version object is due to New installs will default to Ember CLI builds in Production which Meta is already running but will only be rolled out to older sites in a few weeks.