Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

MigrateSiteTreeLinkingTask.php


Go to End


2 Posts   1381 Views

Avatar
MarijnKampf

Community Member, 176 Posts

10 May 2010 at 9:03pm

Running the task 'Migrate SiteTree Linking Task' gives an error if there are no linked pages.

Fatal error: Call to a member function removeDuplicates() on a non-object in G:\localhost\largeherbivore.org\sapphire\tasks\MigrateSiteTreeLinkingTask.php on line 27

Update Line 27 to:

		// Databases like MSSQL will give duplicate results - remove them
		// This would normally be fixed by using SELECT DISTINCT, but DataObject::get() doesn't support it
		if ($linkedPages) $linkedPages->removeDuplicates();

avoids the error.

Avatar
Ingo

Forum Moderator, 801 Posts

11 May 2010 at 8:56pm

Fixed in r104594 - please report these kinds of issues (and patch suggestions) on open.silverstripe.org - thanks!