Ticket #2623 (new defect)

Opened 3 months ago

Last modified 3 months ago

Backlink Report not working correctly Link to this post

Reported by: tiwoc Assigned to: sminnee
Type: defect Priority: medium
Milestone: Component: Sapphire Framework
Version: 2.2.2 Severity: medium effort / impact
Keywords: Cc:
Due date: Hours:

Description

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

Attachments

silverstripe-2.2.2-breadcrumbs.diff (0.9 kB) - added by tiwoc 2 months ago.
bugfix

Change History

Changed 3 months ago by tiwoc

Please ignore the "Link to this post" in the title of this ticket; this was added accidentally when I copied the text from the forum...

Changed 2 months ago by tiwoc

bugfix

Note: See TracTickets for help on using tickets.