Hello,

I installed crumbs with Drupal 7.16 + Drupal Commerce 7.x-1.3
I did not change the default settings.
In store, access category (taxonomy menu), item and when I click on the product (node​​) the error occurs.

Notice: Undefined index: link_options em theme_crumbs_breadcrumb_link() (linha 80 de /var/www/mysite/public_html/subfolder/sites/all/modules/crumbs/crumbs.module).
Recoverable fatal error: Argument 3 passed to l() must be an array, null given, called in /var/www/mysite/public_html/subfolder/sites/all/modules/crumbs/crumbs.module on line 80 and defined em l() (linha 2345 de /var/www/mysite/public_html/subfolder/includes/common.inc).

Steps:
1. Home
http://mysite/subfolder/
BC: none
2. Store
http://mysite/subfolder/loja-virtual
BC: Início »
3. Category "Decoração" (Taxonomy Menu)
http://mysite/subfolder/loja/decoracao
BC: Início » Decoração
4. Subcategory "Almofadas" (Taxonomy Menu)
http://mysite/subfolder/loja/almofadas
BC: Início » Decoração » Almofadas
5. Product (node)
http://mysite/subfolder/loja/22/capa-alm-de-seda-50x50-verde
error

Comments

donquixote’s picture

Hi,
thanks for reporting!
I'm sure we can clean that up.

It seems I assume that $item['link_options'] always has a value. Apparently it has not.
Can you tell me what kind of page that is, where you see the error? (the loja/22/capa-alm-de-seda-50x50-verde) I suppose this is a url alias for something?

donquixote’s picture

Can you check if this works for you?

donquixote’s picture

Status: Active » Needs review

(setting status)

coyoterj’s picture

Hi,

I applied the patch and received these notices:

Notice: Undefined index: link_options em theme_crumbs_breadcrumb_link() (linha 81 de /var/www/mysite/public_html/subfolder/sites/all/modules/crumbs/crumbs.module).
Notice: Undefined index: link_options em theme_crumbs_breadcrumb_link() (linha 81 de /var/www/mysite/public_html/subfolder/sites/all/modules/crumbs/crumbs.module).

Yes, this is a url alias to:
http://mysite/subfolder/node/21

Thanks!

donquixote’s picture

Strange, why would it be in line 81 now, instead of line 80 ?

Ok, can you replace the is_array() with isset() ?

bojanz’s picture

This usually happens when a module that is not Crumbs aware tries to alter the breadcrumb (we have an open issue about that).

donquixote’s picture

@bojanz: Yep.
#1800904: Re-evaluate the ways to alter the breadcrumb

I'd say we handle this particular bug with a hotfix (*) as in #2 / #5, and then follow up in the other issue.

(*) We have a 7.x-1.x-hotfix branch, that is specifically made for easy and obvious bug fixes, if these are unlikely to cause regressions. Point releases can be made directly from the hotfix branch. And then we merge this stuff back into 7.x-1.x.

coyoterj’s picture

Hi,

I replaced "is_array" with "isset" and it worked.

Line 81 because I commented (I have not deleted) the old line 80 :)

Thanks!

coyoterj’s picture

Status: Needs review » Closed (fixed)
donquixote’s picture

Status: Closed (fixed) » Fixed

It is fixed when the changes are released - not when there is a patch..
7.x-1.8 is now released, and the change is merged into 7.x-1.x-dev.
So now it is fixed :)

donquixote’s picture

Btw, I will very soon get my hands on the other issue. Might happen on the weekend.

coyoterj’s picture

Hello donquixote,

Sorry, my English is poor and I am a newbie in "issues" ... :)

Thanks and congratulations!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Fix error in the text.