Support » Plugins » [Plugin: Breadcrumb NavXT] v3 doesn’t work – parse error

  • After upgrading to v3 I get this error when visiting the admin interface:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home2/cablech/public_html/wp-content/plugins/breadcrumb-navxt/breadcrumb_navxt_admin.php on line 37

Viewing 12 replies - 1 through 12 (of 12 total)
  • ghosttie,

    What version of PHP are you using? I’m willing to bet it is either PHP4 or a very old version of PHP5. To make it PHP4 compatible you could try replacing the private qualifier with var. Either way you really should be running PHP5 by now.

    -John Havlik

    Yes it’s PHP4 – I have no way of making my hosting company upgrade

    If I change private to var I just get another parse error:

    Parse error: parse error, unexpected T_OBJECT_OPERATOR in /wordpress/wp-content/plugins/breadcrumb-navxt/breadcrumb_navxt_admin.php on line 969

    That line of code is return add_blog_option(get_current_site()->id, $key, $value);

    I’m guessing PHP4 is not linking the get_current_site()->id you could replace line 969 with:

    $current_site = get_current_site();
    return add_blog_option($current_site->id, $key, $value);

    Now note a similar thing will need to be done to lines 990 and 1012.

    I really would bug your host if I were you about getting PHP5 support, most offer concurrent PHP4/PHP5 deployments now. It may be worth the effort inquiring about it with your host as more and more projects dump PHP4 support.

    -John Havlik

    Thanks, it works now

    I sent them a support ticket on PHP5 today, we’ll see

    One other thing you could try to get PHP5 support is to add the following to your .htaccess:

    AddType x-mapp-php5 .php

    That works on some hosts, otherwise if your host provides cPanel, it may have a user controlled PHP version switcher (I’ve seen PHP4/5/6 concurrently available).

    I’m kinda surprised those two things were the only things that are PHP5 only.

    -John Havlik

    My hosting company has agreed to move my site to a virtual server that has PHP5 installed

    I’m having this error when I try to activate – it started happening after upgrading to v3…

    Fatal error: Cannot redeclare class bcn_breadcrumb in /home/p32528/public_html/wp-content/plugins/breadcrumb-navxt/breadcrumb_navxt_class.php on line 28

    With the redeclare errors PHP should tell your where it was previously declared, what does it say there?

    One way to make this message show up is to activate the administrative interface and then try to activate the core plugin. When using the administrative interface it is the only plug-in of the set that needs to be activated.

    -John Havlik

    yeah, this error only shows up when I load first the admin interface and later the core. only way I could run my blog again was removing completely the tag from the layout.

    but no, that’s the only error that shows up, it won’t tell where it was previously declared… thanks for the reply tough

    Don’t have both the administrative interface and core plugin activated at the same time (has been the rule since 2.0). If you want to use the administrative interface only activate the administrative interface plugin.

    If something else is causing it then you probably should enable the wp_debug setting in your wp-config then you’ll get full warning and error reporting.

    I don’t get why there are two versions of the plugin – why would you not want the admin interface?

    The administrative interface adds 2 entries to the wp_options table (one for the version (of the options array) and one holding the options array). On every page there will be one DB query just for getting the options, some people try to optimize as much as they can which one DB query less is important for them. When directly accessing the bcn_breadcrumb_trail (usually only used with the core plugin) the user is able to do things that can not be done through the administrative interface.

    Additionally, it is two plugins for historical reasons. Originally, there was only the core. I added the administrative interface to Breadcrumb Navigation XT 1.9 to make it easier for users to add and customize breadcrumb trails to their blogs. Very few people that have read the installation instructions on the project page on my blog have had the issue joaociocca had (it explicitly states: “Note: Do not enable both plug-ins at the same time.”). I’ve changed the wording to “Do not have both plug-ins enabled at the same time.” to make the intent more clear (the old message was a little ambiguous).

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] v3 doesn’t work – parse error’ is closed to new replies.