silverstripe / silverstripe-redirectedurls

Silverstripe module to let users to configure arbitrary redirections in the CMS
BSD 3-Clause "New" or "Revised" License
32 stars 48 forks source link

CSV imports "Undefined Index FromBase" #72

Open albanyacademy opened 5 years ago

albanyacademy commented 5 years ago

image

This occurs when attempting to import a CSV via the specifications provided.

File used:

FromBase,FromQuerystring,To
/terms.php,,/terms
/ipfind.aspx,,/IPFind.php
/managed-services/managed-backup-recovery,,/managed-security-services/
/managed-services/rogue-wireless,,/managed-security-services/
/managed-services/managed-endpoint-security,,/managed-security-services/endpoint-security/

Importing throws this error. Adding quotes doesn't seem to change anything. This is on 4.3.3 of framework.

I've replicated this by also exporting a CSV of manually-added redirects, removing the model columns (leaving only FromBase, FromQuerystring, To), and importing that again.

I'm also replicating this on a CSV with only one record.

albanyacademy commented 5 years ago

This works:

ID,ClassName,LastEdited,Created,FromBase,FromQuerystring,To
,,,,/managed-services/managed-backup-recovery,,/managed-security-services/

It looks like the importer stumbles when FromBase is the first column. It wants to see the other columns.