Comments

Dave.Ingram’s picture

The module will only display links if there are valid pages at each step is /downloads/ in this screenshot a real page that you can go to?

XerraX’s picture

ok then i dont get the use of this module.

but if go to the imprint page, nothing shows up either.

Dave.Ingram’s picture

OK, I didn't see that the downloads link was being output. What kind of a page is that? The module tries to use the menu title where possible.. could it be that the menu title for the "/downloads" page is blank?

XerraX’s picture

downloads/ <-- view with title set

downloads/combat-command-matrix-edition-patch-104 <- page with title set

XerraX’s picture

Status: Active » Closed (won't fix)

well i think i am doing something wrong, i thought it takes the path and makes a trail out of it, dunno what you mean with menu title.

Dave.Ingram’s picture

Assigned: Unassigned » Dave.Ingram
Status: Closed (won't fix) » Needs review

I've just pushed a new release, alpha4, which I think should address this for you. From everything I can tell, it appears that there should have been a valid title, but with the new release, I've added an additional check to see if the title is blank and it should fall back now to using just the word "Downloads" from the path.

Please let me know if this works for you.

XerraX’s picture

Status: Needs review » Needs work

Getting this error while enabling alpha4:

[25-Apr-2012 17:43:42] PHP Parse error:  syntax error, unexpected '{' in sites\all\modules\breadcrumbs_by_path\breadcrumbs_by_path.module on line 53

You missed a )

i put it in myself, but it still does not show the trail correctly.

Dave.Ingram’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.0-alpha5

Fixed the syntax error. I'm not seeing a clear reason why you wouldn't be getting a title in the breadcrumb trail. I have use this module specifically with views and am getting the trail working properly. Are you comfortable with putting some debug statements into the module to see where the title is ultimately being pulled from? In particular I'd be interested in seeing the results of a dpm($item); following the call to menu_get_item();

XerraX’s picture

      // load the mnu item for the path
      $item = menu_get_item($path);
      
      dpm($item);

$uri is "downloads"
$path is empty.
$item is empty.

Dave.Ingram’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.0-alpha6
Status: Needs work » Needs review

OK, I've bumped the version up to alpha6 and I'm pretty sure I've nailed the problem this time. An earlier change I made introduced a bug where menu items weren't loading properly if it was not an aliased path (such as a view). I've reworked that code and tested it on a local site with a view and it appears to be working properly. Try upgrading to alpha6 and see if that fixes your problem, and thanks for the debugging help on this!

XerraX’s picture

Status: Needs review » Active

I am sorry but nothing has changed with the new version. I double checked that titles were set.

May you should write down what exactly must be done to get a trail.

Do i need to set a menu title to get a trail?
Do i need to set a node title to get a trail?
Do i need to set a view title to get a trail?

If no title is set, should there be a trail anyway?

Dave.Ingram’s picture

Hmm, that's aggravating.

The way it works is it first tries to load a menu item based on a path alias, then if it it's not a direct path alias, it tries to load a menu item from the raw url. In your case, if "Downloads" is a view, then views has hooked into the menu system and it should be pulling that as the menu item and it should display "Downloads" as the menu link, or use a different page title if that has been set in the view.

I'd be happy to debug this directly if it's possible for you to either give me access to your site or send me a file/database dump of your site. From everything you've said so far though, I don't understand why this is not working since this sounds like an identical situation to what this module was developed for and has worked perfectly in the cases where I've used it.

XerraX’s picture

Status: Active » Closed (cannot reproduce)

Sorry but thats not possible. The Drupal 7 version of the mentioned site is not online yet, its in my local development environment. I dont want to give away database dumps. But i will do some debugging myself, as soon as ive got time for this.

XerraX’s picture

While doing some other stuff i noticed the trail is partially build on some parts of the site:

http://imageshack.us/f/16/27415149.jpg/

XerraX’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new759 bytes

I made a workaround that works for me, but it still does not fix the issue itself.

Dave.Ingram’s picture

Hmm.. This actually seems quite viable to me. Does this fix the problem for you in all cases?

XerraX’s picture

indeed

Dave.Ingram’s picture

Great, thanks! I'll review this in a bit more detail when I have a few more minutes and then roll this in to a new release.

XerraX’s picture

Version: 7.x-1.0-alpha6 » 7.x-1.x-dev
Status: Needs review » Closed (won't fix)

Well shit, my fix isnt working for me anymore since one of the latest versions... In fact i think the module doesnt deserve the name "Breadcrumbs by path" it depends too much on wierd menu title stuff.

I will need to code my own module and at the moment i have absolutly no time for this :(

Edit:
For others searching for a quick solution:
http://www.drupalfoo.com/drupal-7-hierarchical-breadcrumbs-based-current...