stadt-karlsruhe / ckanext-discovery

A CKAN extension to help people discover your data
GNU Affero General Public License v3.0
10 stars 6 forks source link

Probably ckanext-discovery does not works for CKAN 2.8.0 #1

Open isabelruiz opened 6 years ago

isabelruiz commented 6 years ago

Hi all, Some weeks ago, I installed ckanext-discovery (and others plugins) on my CKAN 2.7.2 and it works fine.

But last week I upgraded CKAN to 2.8.0 version and my opendata web works fine, but I can see this message in my log [1].

If I remove these plugins from .ini file, logs error dissapear.

Maybe ckanext-discovery does not work for CKAN 2.8.0 ??

Best Regards....

[1]:
[Fri Jun 29 12:59:06.303900 2018] [wsgi:error] [pid 21234:tid 140356470253312] 2018-06-29 12:59:06,302 ERROR [ckanext.discovery.plugins.search_suggestions] An exception occurred while storing a search query
[Fri Jun 29 12:59:06.304234 2018] [wsgi:error] [pid 21234:tid 140356470253312] Traceback (most recent call last):
[Fri Jun 29 12:59:06.304433 2018] [wsgi:error] [pid 21234:tid 140356470253312]   File "/home/ckan/ckan/lib/default/src/ckanext-discovery/ckanext/discovery/plugins/search_suggestions/__init__.py", line 191, in after_search
[Fri Jun 29 12:59:06.304642 2018] [wsgi:error] [pid 21234:tid 140356470253312]     if not _is_user_text_search(toolkit.c, q):
[Fri Jun 29 12:59:06.304838 2018] [wsgi:error] [pid 21234:tid 140356470253312]   File "/home/ckan/ckan/lib/default/src/ckanext-discovery/ckanext/discovery/plugins/search_suggestions/__init__.py", line 154, in _is_user_text_search
[Fri Jun 29 12:59:06.305060 2018] [wsgi:error] [pid 21234:tid 140356470253312]     context.controller != 'package'
[Fri Jun 29 12:59:06.305279 2018] [wsgi:error] [pid 21234:tid 140356470253312]   File "/home/ckan/ckan/lib/default/lib/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
[Fri Jun 29 12:59:06.305482 2018] [wsgi:error] [pid 21234:tid 140356470253312]     return getattr(self._get_current_object(), name)
[Fri Jun 29 12:59:06.305693 2018] [wsgi:error] [pid 21234:tid 140356470253312]   File "/home/ckan/ckan/lib/default/lib/python2.7/site-packages/werkzeug/local.py", line 347, in __getattr__
[Fri Jun 29 12:59:06.305874 2018] [wsgi:error] [pid 21234:tid 140356470253312]     return getattr(self._get_current_object(), name)
[Fri Jun 29 12:59:06.306039 2018] [wsgi:error] [pid 21234:tid 140356470253312]   File "/home/ckan/ckan/lib/default/src/ckan/ckan/config/middleware/flask_app.py", line 334, in __getattr__
[Fri Jun 29 12:59:06.306348 2018] [wsgi:error] [pid 21234:tid 140356470253312]     return getattr(app_globals.app_globals, name)
[Fri Jun 29 12:59:06.306519 2018] [wsgi:error] [pid 21234:tid 140356470253312] AttributeError: '_Globals' object has no attribute 'controller'
torfsen commented 6 years ago

Thanks for your report, @isabelruiz! We haven't had time yet to test this extension with CKAN 2.8.0, so it could very well be that there are some problems.

The issue you're describing looks similar to one we've encountered before, and which is caused by changes in CKAN core (see ckan/ckan#4310). At the moment it is not clear whether this is an intentional change in CKAN (in which case we would need to update ckanext-discovery) or a bug that needs to be fixed in CKAN itself.

jqnatividad commented 5 years ago

Hi @torfsen! Now that the required changes in CKAN core have been added, any plans to update ckanext-discovery so it can work with 2.8+? :)

torfsen commented 5 years ago

Hi @jqnatividad! After changing jobs I currently don't have much time to maintain ckanext-discovery. I'd probably be able to review pull requests, though :wink:

bhavin2897 commented 2 years ago

Hello,

Do you have any plans to change this plugin to the latest CKAN version (2.9+). This would be of great help.

If not, any suggestions on changing older version to the newest?

Thank you