-
Notifications
You must be signed in to change notification settings - Fork 2k
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
markdown_extract only expects strings #2578
Comments
I haven't checked that overriding helpers is possible, but perhaps it might be better to override |
@rossjones well monkey patching could work yes. I'll check if this is possible. But maybe it would be good to have a "proper" way of doing this. |
I don't think you need to monkey-patch, you could use ITemplateHelpers - https://github.com/ckan/ckan/blob/master/ckan/plugins/interfaces.py#L888-L910 but it appears that it does stop you overwriting helpers at ckan/ckan/config/environment.py Line 70 in 9bf61b4
|
You can use an IPackageController before_show method to replace the any core fluent fields with a single-language version. I'm planning to add one of these to ckanext-fluent when I can make it work well enough to handle fluent with core dataset fields like title and notes. @metaodi I've tried to pitch the idea of core ckan adopting the ckanext-fluent behaviour for dicts in place of text but haven't been able to sell it to the others yet :-) Maybe move this issue to ckanext-fluent for now. |
@wardi Okay I'll look into that to replace the dict with a single language version. For now, I'll try to implement that in my own extension, if I can make it work, I'll try to integrate that in fluent as well. |
closing in favour of #2678 |
When using ckanext-fluent to define a multilingual markdown field, the output currently fails with the following error:
I could trace this error back to the following line of code:
PR follows to make sure the site doesn't break because of this.
The text was updated successfully, but these errors were encountered: