Hi,

I'm trying to set a custom breadcrumb for node edit pages (node/*/edit) with PHP code snippet (it seems to happen even without PHP code snippet).

All node tokens are returning as a string.
For example :

return array('[title]');

returns [title] as plain text.

Does this module know about node tokens on node edit page?
Im not sure this is a Custom breadcrumbs bug, or if the module doesnt have any access to these tokens there.

Any idea?

Comments

MGN’s picture

Status: Active » Fixed

I am marking this as fixed because I think it was alrady fixed in 6.x-2.x-dev. But I've also just committed a change to 6.x-2.x-dev that should provide objects for token substitution when the breadcrumb is provided through hook_preprocess_page. If the $variables array contains useful objects (like node and user, for example), the custom breadcrumbs will now use those objects for token substitution.

Can you try the latest code (in cvs now, wait for the packaging script to make a new tar file) and verify that this problem has been fixed?

Ludo.R’s picture

I've tried with the dev version just now, but all my custom breadcrumbs based on path are not working anymore.
I just replaced the custom_breadcrumbs folder with the new version, is there anything else i should do?

By the way, [title] doesnt work, but [current-page-title] does.

MGN’s picture

There have been some recent changes regarding which theme hooks are implemented. This will affect some cb paths breadcrumbs. Can you try clearing the cache? Go to Administer > Site configuration > Performance" page, and click on the "Clear cached data" button. That should do it.

Ludo.R’s picture

Clear cache : i didnt think about that.

I just tried again : it looks good, everything works fine!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.