Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure cloudstorage to work with ontario_theme #223

Open
KatiRG opened this issue Jun 24, 2022 · 1 comment
Open

Configure cloudstorage to work with ontario_theme #223

KatiRG opened this issue Jun 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working upgrade2.9

Comments

@KatiRG
Copy link
Collaborator

KatiRG commented Jun 24, 2022

Cloudstorage installed out of the box works with vanilla ckan but not ontario_theme.

Some issues:

  • SSL error with xloader, both with certificates generated with openssl and with mkcert:
ckanext.xloader.job_exceptions.HTTPError: b"HTTPSConnectionPool(host='localhost', port=443): Max retries exceeded with url: ... (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131)'))) 
  • internal server error after uploading a test file with the UI (various errors in uwsgi.ERR)
@KatiRG KatiRG self-assigned this Jun 24, 2022
@KatiRG
Copy link
Collaborator Author

KatiRG commented Jun 24, 2022

Adjustments to do:

Replacing ResourceUpload library with ResourceCloudStorage in plugin.py throws a few things off:

  • add a check in get_translated() in helpers.py because sometimes the dictionary element is contained in a string for some fields:
def get_translated(data_dict, field):
    language = i18n.get_lang()
    try:
        return eval(data_dict[field + u'_translated'])[language] if isinstance(data_dict[field + u'_translated'], str) else data_dict[field + u'_translated'][language]
    except KeyError:
        val = data_dict.get(field, '')
        return _(val) if val and isinstance(val, string_types) else val
  • get_date_range() in plugin.py() no longer properly handles null dates, so checks need to be added

@KatiRG KatiRG added bug Something isn't working upgrade2.9 labels Jun 24, 2022
KatiRG added a commit that referenced this issue Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upgrade2.9
Projects
None yet
Development

No branches or pull requests

1 participant