simonk
(Simon King)
October 26, 2023, 9:27am
5
Hi @tgxworld , thank you for the reply.
Yes, I’m running the v3.2.0.beta2 tag (be04154838 ):
The plugin API version supported by this release is 1.14.0:
} from "discourse-common/lib/icon-library";
import I18n from "I18n";
import { CUSTOM_USER_SEARCH_OPTIONS } from "select-kit/components/user-chooser";
import { modifySelectKit } from "select-kit/mixins/plugin-api";
// If you add any methods to the API ensure you bump up the version number
// based on Semantic Versioning 2.0.0. Please update the changelog at
// docs/CHANGELOG-JAVASCRIPT-PLUGIN-API.md whenever you change the version
// using the format described at https://keepachangelog.com/en/1.0.0/.
export const PLUGIN_API_VERSION = "1.14.0";
// This helper prevents us from applying the same `modifyClass` over and over in test mode.
function canModify(klass, type, resolverName, changes) {
if (!changes.pluginId) {
// eslint-disable-next-line no-console
console.warn(
consolePrefix(),
"To prevent errors in tests, add a `pluginId` key to your `modifyClass` call. This will ensure the modification is only applied once."
);
return true;
Revision 1398eeeff550c1da186a47b6d3878d3230f62340 of discourse-category-banners requires API version 1.15.0, which is not available in v3.2.0.beta2
import { apiInitializer } from "discourse/lib/api";
import CategoryBanner from "../components/category-banner";
export default apiInitializer("1.15.0", (api) => {
api.renderInOutlet(settings.plugin_outlet, CategoryBanner);
});
API version 1.15.0 was added in this commit:
https://github.com/discourse/discourse/commit/9ef3a18ce4dacb81746dd129a9f5b04fe3074fef#diff-ee6ac7b12e2cbef3b5cc8551e036f5badd0577b3d832b4252d7a680c4b8abae6
…which has not been released as a beta yet.
To resolve this, I think that the theme component could just require API version 1.13.0 instead (the one that introduced api.renderInOutlet), which is part of v3.2.0.beta2.
https://github.com/discourse/discourse/commit/c00fd3e17d84e074a190da40744d02b944814eda#diff-ee6ac7b12e2cbef3b5cc8551e036f5badd0577b3d832b4252d7a680c4b8abae6R140
4 Likes