Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Backlink Report not working correctly

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1393 Views
  • tiwoc
    Avatar
    Community Member
    2 Posts

    Backlink Report not working correctly Link to this post

    In /sapphire/core/model/SiteTree.php you can find the following code in function getCMSFields():

    foreach($links as $link) {
       $backlinks[] = "<li><a class=\"cmsEditlink\" href=\"admin/show/$link->ID\">" .
          $link->Breadcrumbs(null,true) . "</a></li>";
    }

    This does not work correctly, as I get something like this:

    The following pages link to this page:<ul><li><a class="cmsEditlink" href="admin/show/7"></a></li></ul>

    As you can see, the link text is empty. If I change "Breadcrumbs(null,true)" to "Breadcrumbs($unlinked = true)", it works.

    Maybe you should change this...

    The PHP version I am using:

    $ php -version
    PHP 5.2.0-8+etch11 (cli) (built: May 10 2008 10:46:24)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
    with Suhosin v0.9.12, (C) Copyright 2006, by Hardened-PHP Project

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Backlink Report not working correctly Link to this post

    Hey tiwoc,

    Thanks for the find! Could you submit this bug (and the fix) On open.silverstripe.com - information about submitting patchs on there as well. Then when someone goes through all the tickets to merge them back into trunk then it will be included.

  • tiwoc
    Avatar
    Community Member
    2 Posts
    1393 Views
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.