HI there,
I've been using importX to pull in a bunch of resources form a csv file.
All good apart from the latest hiccup.
The Alias is created from the pagetitle (as per when you create a new resource from the tree).
But, if the page title is the same on more than one resource, it falls over.
Instead of adding a 1 to the alias, it just stops the import.
I know I can add another field of 'alias' in the csv file, but the problem with this is that I'm running out of names to use - is there any way for the resource to generate a random alias for each resource I import?
To give context, it's s bunch of testimonials, where the date is the title, therefore I have a lot of testimonials which have the same date.
Thanks
Andy
This might work (untested):
Add this between lines 61 and 62 of the core/components/importx/processors/prepare/csv.php file:
$lines[$line]['alias'] = $lines[$line['pagetitle']] . uniqid();
It goes just below this line:
$lines[$line] = array_combine($headings,$curline);)
That should add a unique number to the end of the alias (which will still begin with the pagetitle).