coderedcorp / coderedcorp/coderedcms

Admin error loading import_from_csv template

Open
#696 1 comment 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
Python
Stars
765
Forks
154
PR merge metrics
No merged PRs in 30d

Description

#### Describe the bug
Wagtail CRX Admin fails to load page template when clicking 'Import from CSV file'

#### Steps to reproduce
Steps to reproduce the behavior:
Wagtail CRX Admin fails to load template when clicking 'Import from CSV file'

Error:
TemplateDoesNotExist at /admin/codered/import-export/import_from_csv/
wagtailadmin/shared/field_as_li.html

#### Expected behavior
Import page should load

#### Additional context
The Wagtail team removed shared include `field_as_li.html` in release 5.1:
https://github.com/wagtail/wagtail/blob/0506449cbbe85e213a7aaad7092b9c5f36fef8d2/docs/releases/5.1.md?plain=1#L385

It needs to be replaced with "wagtailadmin/shared/field.html" wrapped within `li` tags.

Import from CSV still references it:
https://github.com/coderedcorp/coderedcms/blame/main/coderedcms/templates/wagtailimportexport/import_from_csv.html

{% for field in form %}
{% include "wagtailadmin/shared/field_as_li.html" %}
{% endfor %}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in coderedcms/templates/wagtailimportexport/import_from_csv.html and inspect the reference to the removed shared template. Run the import-from-CSV admin page to reproduce the TemplateDoesNotExist error; done means the page loads successfully on Wagtail 5.1 or later without that missing template.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.