Jump to:

1851 Posts in 1606 Topics by 561 members

Blog Module

SilverStripe Forums » Blog Module » Missing author in LatestPagesWidget

Discuss the Blog Module.

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

Page: 1
Go to End
Author Topic: 646 Views
  • Henk Poley
    30 Posts

    Missing author in LatestPagesWidget Link to this post

    My latest pages widget doesn't display the author anymore (the hover text now ends in 'By ').

    The code of the widget is:

       function LatestPages() {
          $pages = DataObject::get('SiteTree', '', '`LastEdited` DESC', '', 5);
          $return = new DataObjectSet();
          foreach($pages as $page) {
             $versioned = Versioned::get_version("SiteTree", $page->ID, $page->Version);
             $author = Member::get_one("Member", "ID = " . (int)$versioned->AuthorID);
             $return->push(new ArrayData(array('Page' => $versioned, 'Author' => $author)));
          return $return;

    var_dump($versioned); returns all items with AuthorID = 0. So I suspect something is broken there.

    Anybody knows a fix so the author is again mentioned in the tooltip?

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.