Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example CSV import only fills in FromBase field, others are left blank. SS4.1 #60

Open
markhagemann opened this issue Jul 10, 2018 · 6 comments

Comments

@markhagemann
Copy link

When following the example format and using the example CSV file I am unable to populate the FromQuerystring and To fields.

Please let me know if you need any more information.

@markhagemann
Copy link
Author

markhagemann commented Jul 10, 2018

The example should be in this format:

"FromBase", "FromQuerystring", "To"
"/about-us/index.html", "item=1", "/about/item/1"
"/example/no-querystring.html","" ,"/example/no-querystring/"
"/example/two-queryparams.html","foo=1&bar=2", "/example/foo/1/bar/2"
"/about/*","" ,"/about-us"

This resolves the issue.

Thanks.

@dhensby
Copy link
Contributor

dhensby commented Jul 10, 2018

hmm, I'm surprised the CSVs shouldn't need to be quoted as quotes are optional. What version of SS are you using?

@markhagemann
Copy link
Author

This is on 4.1.1

@dhensby
Copy link
Contributor

dhensby commented Jul 11, 2018

OK, we upgraded the CSV library in 4.2, I'd wonder if that makes a difference, would you be able to test in 4.2 to see if it's still a problem?

@806software
Copy link

This has just solved the issue for me, using SilverStripe 4.3
It was slightly different, however, only the To field was imported and the FromBase field was ignored. Ensuring all fields are quoted solved it.

Strangely stepping through the code - the data was assigned to the object, but just didn't appear in the database.

@RoyalPulp
Copy link

Hello!
I'm not sure, if I'm doing - or expecting something wrong - but after importing, the "To" Field is filled out with the string, but the associated internal pages /Page IDs aren't , All "LinkToID" Fields stay empty - so redirects aren't working,

Example:


"FromBase","FromQuerystring","To","RedirectionType"
"anfahrt",,"kontakt/wegbeschreibung","Internal"
"produkte/ecoterra",,"https://ecoterra-technology.de","External"

Thanks for any advise! Hendrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants