1

I've installed CKAN from package on Ubuntu 16.04.5, following the documentation
https://docs.ckan.org/en/2.8/maintaining/installing/install-from-package.html

I've installed the scheming extension
https://github.com/ckan/ckanext-scheming

I've then tried installing the hierarchy extension
https://github.com/datagovuk/ckanext-hierarchy

Now the main page, the My Datasets Dashboard, and the My Organization Dashboard all display Internal server error. Everything else in CKAN appears to work: creating organization, and datasets, etc. If I disable the hierarchy extension, the error goes away. I believe it to be cause by not correctly configuring the scheming extension to work with the hierarchy extension.

In the documentation for the hierarchy extension, it states

In order to make hierarchy works with ckanext-scheming you need to enable just hierarchy_display and then use corresponding form_snippet in your org_schema

So I have tried to do that

Plugin settings

in /etc/ckan/default/production.ini

## Plugins Settings

# Note: Add ``datastore`` to enable the CKAN DataStore
#       Add ``datapusher`` to enable DataPusher
#               Add ``resource_proxy`` to enable resorce proxying and get around the
#               same origin policy
ckan.plugins = stats text_view image_view recline_view scheming_datasets scheming_organizations hierarchy_display

# Scheming
scheming.dataset_schemas = ckanext.scheming:my_dataset.json
scheming.organization_schemas = ckanext.scheming:my_org.json
scheming.presets = ckanext.scheming:my_presets.json
scheming.dataset_fallback = false

Org Schema

I have a schema defined for organizations
in /usr/lib/ckan/default/src/ckanext-scheming/ckanext/scheming/my_org.json

This is based on the org_with_dept_id.json example provided with the scheming extension, except I've added the following field for the hierarchy extension. For both my org schema and dataset schema, I can see the additional fields, so the scheming extension appears to be working. For orgs, I can see the parent org field, so the hierarchy extension appears to be working, except for the broken pages mentioned above.

{
  "field_name": "not_used",
  "label": "Parent organization",
  "display_snippet": null,
  "form_snippet": "org_hierarchy.html",
  "validators": "ignore_missing"
}

Logs

I can't see anything useful in the logs

in /var/log/apache2/ckan_default.error.log

After a restart, and hitting the main page of the application, this is what the logs show:

[Fri Jan 25 22:36:28.606575 2019] [wsgi:error] [pid 23931:tid 139651816699648] 2019-01-25 22:36:28,606 INFO  [ckan.config.environment] Loading static files from public
[Fri Jan 25 22:36:28.661878 2019] [wsgi:error] [pid 23931:tid 139651816699648] 2019-01-25 22:36:28,661 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Fri Jan 25 22:36:28.883789 2019] [wsgi:error] [pid 23931:tid 139651816699648] 2019-01-25 22:36:28,883 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Fri Jan 25 22:36:30.789607 2019] [wsgi:error] [pid 23930:tid 139651841902336] 2019-01-25 22:36:30,789 INFO  [ckan.config.environment] Loading static files from public
[Fri Jan 25 22:36:30.841870 2019] [wsgi:error] [pid 23930:tid 139651841902336] 2019-01-25 22:36:30,841 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Fri Jan 25 22:36:31.055650 2019] [wsgi:error] [pid 23930:tid 139651841902336] 2019-01-25 22:36:31,055 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates

Has anyone got both of these extensions to work together? Are there other logs I should be looking at? Did I miss something in the documentation? I'm at a loss, please help.

1 Answer 1

1

The problem is that the CKAN Hierarchy Extension does not work with CKAN 2.8 and higher. It has nothing to do with the installed Scheming Extension, nor the way it was configured.

The issue is detailed here:
https://github.com/datagovuk/ckanext-hierarchy/issues/25

There is a pull request with a fix, but it hasn't been accepted yet:
https://github.com/datagovuk/ckanext-hierarchy/pull/26

After installing a version of the extension with the pull request applied, everything works correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.