Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Parse error: syntax error, unexpected ';'

    Hello....I'm working on a wordpress site, and changed one small section in the functions page and received the parse error, taking the entire site down.

    so I changed it back. got the same parse error.

    i then recopied the entire fuctions.php file and pasted it in the WP editor, and still...the same error.

    can anyone please please please tell me what the parse error is?

    this is the functions.php file in my paste bin
    http://pastebin.com/fVFdq4fg

    this is the entire errorParse error: syntax error, unexpected ';' in /home/elysseq/public_html/wp-content/themes/monicaburnsv2/functions.php on line 378

    this is line 378
    Code:
    echo get_avatar( $comment, $avatar_size );
    and this is the site www.monicaburns.com

    I'd very much appreciate any assistance...

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,346
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    I think it's inside the function somewhere and as you've not posted that..
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #3
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    this is the entire functions file...

    http://pastebin.com/fVFdq4fg

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,346
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    Maybe so but that is not where get_avatar() is defined.

    As I told you previously, you have not posted the code for that. There is little point trying to point me to the same source that I have already looked at. I've already used 'Find' in Notepad++ and get_avatar is only found once in that code - line 378. It is not found anywhere else which means that get_avatar() is defined elsewhere.

    You did say this was a wordpress site so maybe its in a wordpress file you've tinkered with.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #5
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    Code:
    .avatar {}
    #clearit{clear:both;}
    #small-bc {margin: 0px 20px 0px 0px;float:left; width:150px;font-size:90%;text-align:center; font-weight:bold;}
    #small-bc img {display:block; margin: 0 auto 0 auto; border: 1px solid #000000;}
    #small-bc-text {margin: 0px; padding-left: 150px;}
    .stat {color: #01394C;}
    this is in the stylesheet, along with several other stylings.

    it is here in content-single.php

    Code:
    <div id="author-avatar">
    				<?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'monicaburns_author_bio_avatar_size', 68 ) ); ?>
    			</div><!-- #author-avatar -->
    although that's just an author avatar...

    and I don't see it anywhere else when I do a search on all of the php files.

  • #6
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,346
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    Well in content-single.php that is just another call to it using functions as parameters. It is not the function itself.

    It may well be the case that the fault is in your functions file but I've looked and can't find anything glaringly obvious hence my suspicion about the file that contains this function.

    Usually, unexpected errors usually mean the line above or below. In your functions file those are both ok hence my suspicions.

    You really need to use the undo option on your editor and go all the way back to the start..
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #7
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    Unfortunately, the functions file I've posted IS the start. I'd been searching as to why her gravatars weren't posting, and had been trying to find a solution on the internet. I pasted in a bit of code from the gravatar website. It didn't do anything, so I replaced it with the regular code and then poof. The parse error.
    So I went to the original functions.php file, copied it and pasted it into the wordpress editor.
    same error.
    now the entire site is down and I've got nowhere to turn and no ideas what else to try.

  • #8
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,346
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    You do realise that file is missing a ?> at the end don't you?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #9
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    um...no, I didn't. that should go after this?

    Code:
    add_filter( 'body_class', 'monicaburns_body_classes' );

  • #10
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,346
    Thanks
    60
    Thanked 527 Times in 514 Posts
    Blog Entries
    4
    Yup

    PHP code has a <?php at the beginning of it and a ?> at the end of it.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • Users who have thanked tangoforce for this post:

    intcon (11-17-2012)

  • #11
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    thank you for your extreme patience, I'll give that a shot.

  • #12
    New Coder
    Join Date
    Mar 2009
    Posts
    89
    Thanks
    27
    Thanked 0 Times in 0 Posts
    sigh. no. but thank you for trying.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •