Hi everyone,
i'm having some issues while browsing my site as anonymous user on the page with a breadcrumb:

here is the errors

Notice: Undefined variable: account in custom_breadcrumbs_token_types() (line 486 of /sites/all/modules/custom_breadcrumbs/custom_breadcrumbs.module).

and

Notice: Undefined variable: _SESSION in _custom_breadcrumbs_taxonomy_set_breadcrumb() (line 44 of /sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc).

on my setup i use this module to display the taxonomy terms as breadcrumb for a node type.
[node:field-section:name]
[node:field-theme:name]

Comments

MGN’s picture

Status: Active » Fixed

Confirmed the first problem, but not the second problem. Unset shouldn't throw an error here, at least not in modern versions of php. What version are you using?

Thanks for testing. This has now been fixed in the latest commit for 7.x-2.x-dev.

tempo22’s picture

Thanks a lot for the work on the first issue.
About the second issue, i'm using PHP 5.2.6-1+lenny9

I don't have much time to look around what is causing this. Could it come from php setup or an other module ?

tempo22’s picture

i have made some investigation about the second error :

Notice: Undefined variable: _SESSION in _custom_breadcrumbs_taxonomy_set_breadcrumb() (line 44 of /sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc).

It seem that when the function "_custom_breadcrumbs_taxonomy_set_breadcrumb" is called, my session doesn't exist. Whenever i use a session_start() before "unset($_SESSION['custom_breadcrumbs_taxonomy_set']);" the error goes away.

I really have no idea on what is causing this but i found that i'm not alone : http://www.google.be/search?&q=_custom_breadcrumbs_taxonomy_set_breadcrumb()%20(line%2044

Cray Flatline’s picture

I can confirm second issue

Notice: Undefined variable: _SESSION in _custom_breadcrumbs_taxonomy_set_breadcrumb() (line 44 of /sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.inc).

justanothermark’s picture

I also had the second issue. An alternative to starting a session is to wrap line 44 in an if that checks if the variable is set like so:

if(isset($_SESSION['custom_breadcrumbs_taxonomy_set'])){
  unset($_SESSION['custom_breadcrumbs_taxonomy_set']);
}

Without looking into the problem further I'm not sure if the variable is used at all so I didn't want to remove the line completely or start an unnecessary session simply to hide an error. This didn't seem worth making a patchfile for so hopefully it can be fixed for the next version.

mikefyfer’s picture

same issue here.

mikefyfer’s picture

Status: Fixed » Active

also putting back to active, as the session issue doesn't appear to be fixed yet.

minneapolisdan’s picture

subscribing

luisasasi’s picture

subscribing

MGN’s picture

Status: Active » Fixed

This has now been fixed in commit 491ce37 on 7.x-2.x.

luisasasi’s picture

Thank you. Today I downloaded Custom Breadcrumbs 7. x-2-dev 22 August. It works well and there are no more error messages.

MGN’s picture

Thanks for the feedback!

Status: Fixed » Closed (fixed)

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