'use strict';
const plugins = require('../collections-online/plugins');

module.exports.register = () => {
  plugins.register(require('./motif-tagging'));
  plugins.register(require('./geo-tagging'));
  plugins.register(require('./users'));
  plugins.register(require('./stats-pre-renderer'));
  require('../collections-online-cumulus').registerPlugins();
  require('../collections-online').registerPlugins();
};

'use strict';
const plugins = require('../collections-online/plugins');

module.exports.register = () => {
  plugins.register(require('./users'));
  require('../collections-online').registerPlugins();
  plugins.register(require('./motif-tagging'));
  plugins.register(require('./geo-tagging'));
  plugins.register(require('./stats-pre-renderer'));
  require('../collections-online-cumulus').registerPlugins();
};

Move plugin load order around to ensure required plugins exist at the right time
Move plugin load order around to ensure required plugins exist at the right time

This really is a great illustration of the limitations of the plugin system!
collections-online plugins need a user system to already have been registered.
The newly-inlined motif-tagging and geo-tagging require the cumulus index-controller which requires a document service to have been registered, which happens in collections-online

This issue became apparent when we required the index controller
top-level (as is best practice!!). Hidden dependencies (especially on
ordering of elements) is a really bad idea, man! It makes the codebase
super brittle.
