Add a CSV template feature to download a sample CSV file

Created on 3 December 2020, over 4 years ago
Updated 30 October 2023, over 1 year ago

Where are the sample csv files?

Hello there! I have been looking high and low and have been completely stomped by the following:

I cannot seem to find a feature that was common in the D7 version where I could download a "Sample CSV" file that would contain the correct headers to use for a given mapping.

Is this feature currently missing in the D8 version or am I just not looking in the right places?

Thanks in advance!

✨ Feature request
Status

Needs work

Version

3.0

Component

Feeds Import (feature)

Created by

πŸ‡¨πŸ‡΄Colombia oneliner

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom malcomio

    @ikeigenwijs the patch adds the following path to feeds.routing.yml:

    /feed/add/{feeds_feed_type}/template

  • πŸ‡ΊπŸ‡¦Ukraine stomusic Ukraine

    Looks like the patch works, tnx. I've added an additional check before help creation to avoid pre-defined values in the template(for example mapped fields)

  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Patch Failed to Apply
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.2.x + Environment: PHP 8.2 & pgsql-14.1
    last update about 1 year ago
    Patch Failed to Apply
  • πŸ‡ΊπŸ‡ΈUnited States kappaluppa

    Did this patch ever get finished? Is there a way to Download a template yet?
    Thanks

  • πŸ‡³πŸ‡±Netherlands megachriz

    @kappaluppa
    No, this is not finished yet. The latest patch did not apply and the one before that was failing tests. This one is still planned to be done, but it is currently competing with other issues that also look important to get done, such as media support, file target issues and additional multilingual support. See 🌱 [meta] Feeds 8.x roadmap Active what else is planned to be picked up.

  • @megachriz opened merge request.
  • πŸ‡³πŸ‡±Netherlands megachriz

    Tests are passing!

    One thing I'd like to see added is a method for returning the raw template contents - as a string. This can then be used by Feeds Textarea Fetcher β†’ . With that module you can put in the source data in a textarea. It would be nice that in case of the CSV parser, it would already display the CSV columns. And that is only possible if Feeds Textarea Fetcher can load the raw template contents.

    For now I set this to "needs review" because it is ready to be tested.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Whaaaaaaao @megachriz - impressive work once again! This works great, thank you so much!
    Agree that #38 would make sense!

  • πŸ‡³πŸ‡±Netherlands megachriz

    @anybody
    Thank you for testing and for your compliments! 😊
    Now that I'm mostly done porting my projects to Drupal 11 (I decided to take a break on that for the remaining) and all Feeds stable release blockers have been resolved, I can finally pick some issues that I had put on the wait list. So I sort of randomly picked up this as it looked like it could be resolved in a relative small amount of work hours.

  • πŸ‡³πŸ‡±Netherlands megachriz

    I'm testing this myself. One thing that I think is not correct is that if you have the permission to import your own feeds, but not feeds you do not own, you can still access the CSV template of other feeds. Also, I think it makes sense that you should also be able to access if you can create or update feeds, even if you cannot import them.

    What I'd like to change as well is the path for the feed specific template. Currently this is /feed/template/{feeds_feed_type}/{feeds_feed}, but I think it makes more sense if it was /feed/{feeds_feed}/template instead. This requires also additional access control and tests.

    The feed type specific template can stay to be /feed/template/{feeds_feed_type}

    So, work to be done!

  • πŸ‡³πŸ‡±Netherlands megachriz
  • πŸ‡³πŸ‡±Netherlands megachriz

    I've opened ✨ Display CSV headers in textarea when creating a new feed Active , so this feature can be tested in combination with the Feeds Textarea Fetcher β†’ module.

    I think that I completed all of the listed remaining tasks, but to be sure it would be good to check that.

    • megachriz β†’ committed a6797307 on 8.x-3.x
      Issue #3186281 by megachriz, damienmckenna, thalles, star-szr, stomusic...
  • πŸ‡³πŸ‡±Netherlands megachriz

    I merged the changes. Thanks all!

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thank you so much @megachriz! Sorry I couldn't help this time, very busy currently, I saw your progress. Wonderful enhancement! :)

  • πŸ‡³πŸ‡±Netherlands megachriz

    @anybody
    Thanks for your compliments! 😊
    I'm pleased as well that I could get this one finished. Up to the next thing!

  • Status changed to Fixed 4 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024