Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Parse error: syntax error when activating

  • Avatar of mulligankm
    mulligankm
    Participant

    @mulligankm

    Another user posted this error a few months ago. There was no response so I am posting it again in hopes that someone can be of assistance.

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected T_STRING in /nfs/c03/h01/mnt/49292/domains/dev.specialparent.com/html/wp-content/plugins/buddypress-links/bp-links-core.php on line 601

    Here’s the code that begins at line 601 in bp-links-core.php

    if ( $link instanceof BP_Links_Link ) {
    $bp->links->current_link = $link;
    do_action( ‘bp_links_link_details_edited’, $bp->links->current_link->id );
    bp_core_add_message( __( ‘Link details were successfully updated.’, ‘buddypress-links’ ) );

    if ( $_POST == 1 ) {
    bp_core_redirect( bp_get_link_permalink( $bp->links->current_link ) . ‘/admin/link-avatar’ );
    } else {
    bp_core_redirect( bp_get_link_permalink( $bp->links->current_link ) . ‘/admin/edit-details’ );
    }

    } else {
    bp_core_add_message( sprintf( ‘%s %s’, __( ‘There was an error updating link details.’, ‘buddypress-links’ ), __( ‘Please try again.’, ‘buddypress-links’ ) ), ‘error’ );
    }
    }
    }

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of mulligankm
    mulligankm
    Participant

    @mulligankm

    I apologize. In my haste, I forgot to add that any assistance would be greatly appreciated. :) Thanks in advance.

    Avatar of Brandon Allen
    Brandon Allen
    Participant

    @cnorris23

    What version of PHP are you running? BuddyPress Links requires PHP 5.2. I haven’t looked at the code other than what you’ve posted, but not running PHP 5.2 is the likely cause. If you’re running PHP 5.2+, then the parse error is likely occuring before line 601.

    Avatar of mulligankm
    mulligankm
    Participant

    @mulligankm

    Thanks @cnorris23. Good news and bad news. The good news you were correct. MediaTemple, for some reason, sometimes switches sites back to PHP v4.0 I have not been able to find a rhyme or a reason. Anyhow, I switched it back to v5 and the error message went away. Unfortunately, I now have a different message, as follows:

    Fatal error: Call to undefined function is_site_admin() in /nfs/c03/h01/mnt/49292/domains/dev.specialparent.com/html/wp-content/plugins/buddypress-links/bp-links-admin.php on line 20

    Any assistance that you could provide would be greatly appreciated.

    Avatar of Brandon Allen
    Brandon Allen
    Participant

    @cnorris23

    Are you using WP single/standard or WPMU/WP Multisite? What’s the WP version number? Are you using the latest BP?

    Avatar of mulligankm
    mulligankm
    Participant

    @mulligankm

    @cnorris- I am very sorry for wasting your time. I got it to work. Apparently, I must have deactivated Buddypress at some point and never reactivated it. I removed the plugin, activated Buddypress and reinstalled the plugin. It is now error free.

    To answer your questions, I am using WP v3.0 and BuddyPress v1.2.4.1 Thanks again for your help.

    I suppose I should have waited a moment before responding. The plugin is now working error free….sort of. I tried adding a category and I get a message which reads “There were errors when saving the link category. Please try again.”

    I guess I will look at the files and check this forum to see if I can figure out what’s going on…..

    Avatar of study
    study
    Participant

    @study

    Did you ever resolve the

    “There were errors when saving the link category”

    problem?

    I’ve been getting for a long time and end up disabling Buddypress Links, but I’d really like to have the feature.

    I’m running WP release version 3.0 Multi-site with current release of BuddyPress.

    Now — on the main WP installation I have used the plugin No Category Base. I’m afraid to disable it to test if it’s the culprit because I worry that turning it off will mess with all of my permalinks and urls that are not relative.

    But it might be a likely candidate if you are also using it.

    Avatar of study
    study
    Participant

    @study

    If anyone is interested, here is the text from my server error log.

    http://pastebin.com/w5DCE0rr

    Note that it reports tables do not exist. I confirmed manually (via phpadmin) that the tables do in fact exist.
    Note also that the system is complaining the the bb-attachments records don’t exist. (And I made a typo in replacing the real table name/prefix with the labels, so no that’s not the error)

    BB forum Attachments has and continues to work just fine. Not being more than a novice at this I figure there must be some kind of conflict between Links and Attachments so I prefer to keep the bb attachments.

    Frustrating because I’ve seen BP Links working on other sites perfectly and it’s a great feature.

    Avatar of MrMaz
    MrMaz
    Participant

    @mrmaz

    From your log it looks like the constant ‘TBLPREFIX” is not being replaced with a value, but I have not idea where that constant is coming from. As of WP 3.0.1 it does not exist.

    Avatar of Malubaidy
    Malubaidy
    Participant

    @malubaidy

    I’m new to this!
    I have similar problem, I tried to change something in bp-activity/bp-activity-template.php and I end up with a fatal error: Parse error: syntax error, unexpected ‘search’ (T_STRING) in /home/tutorliv/public_html/wp-content/plugins/buddypress/bp-activity/bp-activity-template.php on line 627
    I’m not sure how to login to WP, as all I get is the error message when I use my URL. can anybody help me with this, especially how to login? I tried many things but no luck to get in to deactivate buddypress and re install it.

    Avatar of Malubaidy
    Malubaidy
    Participant

    @malubaidy

    Sorry, problem solved.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.