Skip to content

Commit

Permalink
Don't use cached values when rendering notes.
Browse files Browse the repository at this point in the history
Currently, a cached field with the rendered markdown is used in the
package/read template.

This value is set very early in the process (and also results in
rendering markdown when it is not needed).

Since it is set so early, it bypasses all of the hooks designed to allow
these values to be manipulated, such as `before_view`. This breaks
extension on core fields that depend on being able to modify these
fields, like the multi-lingual support extension ckanext-fluent.
  • Loading branch information
TkTech committed Aug 24, 2015
1 parent 942a824 commit 5cfc6c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/templates/package/read.html
Expand Up @@ -23,9 +23,9 @@ <h1>
{% endblock %}
</h1>
{% block package_notes %}
{% if c.pkg_notes_formatted %}
{% if pkg.notes %}
<div class="notes embedded-content">
{{ c.pkg_notes_formatted }}
{{ h.render_markdown(pkg.notes) }}
</div>
{% endif %}
{% endblock %}
Expand Down

0 comments on commit 5cfc6c6

Please sign in to comment.