ckan / ckanext-pages

A simple builtin CMS for CKAN sites
GNU General Public License v3.0
51 stars 99 forks source link

InvalidRequestError: Entity '<class 'ckanext.pages.db._Page'>' has no property 'group_id' #106

Closed fishbone1 closed 3 years ago

fishbone1 commented 3 years ago

CKAN version 2.8.4 ckanext-pages commit 06d8ef5

Each single request to our CKAN instance causes lots of entries in the error log. The exception is caused when creating the navigation bar:

  (...)
  File "(...)", line 16, in block "header_site_navigation_tabs"
    {{ h.build_nav_main(
  File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/plugin.py", line 43, in build_pages_nav_main
    pages_list = toolkit.get_action('ckanext_pages_list')(None, {'order': True, 'private': False})
  File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 466, in wrapped
    result = _action(context, data_dict, **kw)
  File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/actions.py", line 233, in pages_list
    return _pages_list(context, data_dict)
  File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/actions.py", line 109, in _pages_list
    out = db.Page.pages(**search)
  File "/usr/lib/ckan/default/src/ckanext-pages/ckanext/pages/db.py", line 36, in pages
    query = query.filter_by(**kw)
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 1562, in filter_by
    for key, value in kwargs.items()]
  File "/usr/lib/ckan/default/lib/python2.7/site-packages/sqlalchemy/orm/base.py", line 383, in _entity_descriptor
        (description, key)
InvalidRequestError: Entity '<class 'ckanext.pages.db._Page'>' has no property 'group_id'

The version is from 2018, but the responsible code hasn't been changed, as far as I can see.

Zharktas commented 3 years ago

We've been seeing this too, there might be some race condition somewhere in the database initialization as usually this is fixed for us by restarting everything.

lhuanluz commented 3 years ago

Same problem, had to disable the plugin

ccancellieri commented 3 years ago

+1 we've this plugin in production, thanks to work over it.