Jump to:

1160 Posts in 2621 Topics by 409 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » MigrateSiteTreeLinkingTask.php

Ask questions about upgrading SilverStripe to the latest version.

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

Page: 1
Go to End
Author Topic: 667 Views
  • MarijnKampf
    Community Member
    164 Posts

    MigrateSiteTreeLinkingTask.php Link to this post

    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.

  • Ingo
    Forum Moderator
    801 Posts

    Re: MigrateSiteTreeLinkingTask.php Link to this post

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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.