Inconsistent column order in CSV template

Created on 20 April 2025, 3 days ago

Problem/Motivation

When generating a CSV template in the feeds module, the columns appear in a random order. This creates confusion for the user, especially when trying to fill in the template based on instructions or documentation. The structure of the template does not match the expected or documented order.

Steps to reproduce

download multiple .csv feeds template from different countertypes alternating and some clear cache in the mix

Proposed resolution

Expected Behavior:
The columns in the CSV template should appear in a consistent and logical order, for example order of fields on contenttype form
Optionally allow manual configuration of column order per feed type, weights system.

User interface changes

none, for fixed order basesd on contenttype form weights
Optionally: extra tab for defining template field order.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium ikeigenwijs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ikeigenwijs
  • 🇳🇱Netherlands megachriz

    Thanks for creating the issue. At first I could not reproduce it. I created several feed types and for each one the CSV template matched the order of the mappings.

    But then I decided to edit the mappings of a feed type and created a new CSV source for the first mapping.

    First the mappings where this:

    And that resulted into the following CSV template:

    title,url,status
    

    Then I mapping a source called "title2" to "Title (title)", and I got the following CSV template:

    title,url,status,title2
    

    I see the issues here are:

    • title2 appears at last, even though it is used on the first mapping row.
    • title still appears in the template, even if it is no longer used in the mappings.

    Expected CSV template should have been:

    title2,url,status
    

    Am I correct that this is what the issue is about?

    I also sense a request here to be able to change the order of mappings. That should be handled in a different issue. Or is it the order of custom sources?

Production build 0.71.5 2024