diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index f9fb3aa58..45b210662 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -72,6 +72,11 @@ class PluginStore(): plugin.id = plugin.name.replace(' ', '_') if not hasattr(plugin, 'preference_section'): plugin.preference_section = 'general' + if plugin.preference_section == 'query': + for plugin_attr in ('query_keywords', 'query_examples'): + if not hasattr(plugin, plugin_attr): + logger.critical('missing attribute "{0}", cannot load plugin: {1}'.format(plugin_attr, plugin)) + exit(3) self.plugins.append(plugin) def call(self, ordered_plugin_list, plugin_type, request, *args, **kwargs): diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index 46b4fdb69..c47675562 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -187,102 +187,6 @@ -
- - -
-+ + +
+