craftcms / feed-me

Craft CMS plugin for importing entry data from XML, RSS or ATOM feeds—routine task or on-demand.
Other
288 stars 139 forks source link

Empty column headings in feed cause incorrect pagination url dropdown value. #1375

Closed mikeymeister closed 10 months ago

mikeymeister commented 11 months ago

Description

We have come across a case where the google sheet used for the feed has a column of data with no heading in the first row. When trying to save the pagination url, the select field has multiple options with value="".

Screenshot 2023-10-30 at 20 31 16

This causes the dropdown to show the latest empty value option as the pagination url. I fully accept that the data is poorly formed for a feed and that this is in edge case territory. Perhaps "No Pagination URL" should be an option with a value that specifies there is no pagination url rather than the absence of a value eg <option value="no-pagination">No Pagination URL</option>? Or exclude options from the dropdown that don't have a key? There could even be a lightswitch for pagination url that when enabled, displays valid options for a pagination url from the feed.

Steps to reproduce

  1. Set up a feed from a google sheet where at least one of the table columns has no heading
  2. Try to save the feed with no pagination url set.

Additional info

angrybrad commented 10 months ago

Resolved in https://github.com/craftcms/feed-me/pull/1385 and will be included in the next release.