-
-
Notifications
You must be signed in to change notification settings - Fork 818
Description
Missing {{ block.super }} in bottomimports blocks breaks custom overrides
Describe the issue
Several core templates override the bottomimports block without including {{ block.super }}.
This prevents customizations defined in base.html (via custom/templates/base.html) from being loaded consistently.
Examples:
about.html→ works, since it doesn't overridebottomimports.latest-media.html(and others) → overridesbottomimportsbut does not call{{ block.super }}, so any global scripts/styles added inbase.htmlare lost.
Expected behavior
All templates overriding bottomimports should include {{ block.super }} at the beginning of the block, e.g.:
{% block bottomimports %}
{{ block.super }}
<script src="{% static "js/latest.js" %}?v={{ VERSION }}"></script>
{% endblock bottomimports %}This ensures global imports (e.g. custom scripts or styles injected via base.html) are preserved.
Steps to reproduce
- Add
custom/templates/base.htmlwith a<script src=".../custom-sidebar.js">. - Visit
/about→ script is loaded. - Visit
/latest→ script is missing, becausebottomimportswas replaced.
Why this matters
Users rely on the documented override system (custom/templates/) to customize MediaCMS without patching the core.
If some templates drop {{ block.super }}, customizations become unreliable and inconsistent across pages.
Suggested fix
Audit all templates overriding bottomimports and prepend {{ block.super }}.
This makes the override system work consistently across the entire app.
Affected files
❌ /home/mediacms.io/mediacms/templates/base.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/add-media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/categories.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/embed.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/featured-media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/history.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/index.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/latest-media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/liked_media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/manage_comments.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/manage_media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/manage_users.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/members.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/playlist.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/recommended-media.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/search.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/tags.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/user.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/user_about.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/user_playlists.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/user_shared_by_me.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/cms/user_shared_with_me.html (missing block.super)
❌ /home/mediacms.io/mediacms/templates/root.html (missing block.super)