After upgrading to Discourse v3.3.0.beta1-dev, GaurangBlaze reported that their custom plugin’s markdown extensions stopped rendering correctly on posted content, despite working in draft mode. The issue was traced to a recent refactoring that broke server-side support for .js.es6 files used in markdown cooking david. The fix involved removing the .es6 extension from the plugin’s JavaScript files, which restored functionality GaurangBlaze. Although .es6 is not yet deprecated, david recommends using standard .js for better tooling support and notes that any future deprecation will be logged at /logs. Initial confusion arose around whether the issue was plugin-related or core Discourse-related, but warnings in the console were deemed unrelated to the rendering failure GaurangBlaze. The core bug was fixed in commit dea753adavid, and the root commit causing the regression was identified as 1757a68david.
I believe the issue is not related to the plugin, as the plugin is unchanged, and the extension works fine when drafting the post.
Is there anything specific in this latest Discourse upgrade that can cause this issue?
Description: I have a custom plugin that uses markdown extensions (as described here). The plugin works when drafting a post/topic - showing the HTML preview. But, when the post/topic is posted, the plugin simply has no effect. The raw post contents are preserved as it is.
Hi @merefield , thanks for your response. Sorry about the confusing wording of my original topic. The issue is with my custom plugin that uses Discourse’s Markdown extensions. I have now edited my original post to reflect that.
Yup, I am the maintainer Though, I don’t feel these two warnings are related to the current issue. The whiteList method is still available in the latest discourse. And the other deprecation is related to a toolbar entry in the GUI, not the actual markdown extension. At least, that’s my thought.
I will still push an update to handle the deprecations. I will also mention that the plugin was working fine until the previous release.
Thanks for the report @GaurangBlaze. Looks like a recent refactoring broke support for .js.es6 files in the server-side markdown cooking. We’ll get it fixed up in the next few days.
In the meantime, removing the .es6 extension from your JS files should resolve the problem. That’s a good thing to do anyway - there is no longer any need for it, and using the standard .js makes for much better IDE/editor support.
Thanks. I didn’t find the .es6 deprecation in the /logs page of our community. Do you plan to put this deprecation there (and other similar deprecations also)?