ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Unexpected T_STRING core.functions.php(634) : eval()'d code on line 26

October 06, 2009 5:05pm

Subscribe [5]
  • #1 / Oct 06, 2009 5:05pm

    zebake

    19 posts

    I am using custom profile fields to display a makeshift address book.  It appears to list the results fine, however I am now getting the following error, right above my last listing.

    Parse error: syntax error, unexpected T_STRING in (my server)/core/core.functions.php(634) : eval()'d code on line 26

    And this is what my template looks like, that is displaying this error.

    {assign_variable:my_template_group="parents"}
    {embed="embeds/html_header" html_title="Student Directory"}
    
    <body id="address_book">
    
        {embed="embeds/main_navigation" my_location="parents"}
    
        <div class="container_16">
            
            <div class="grid_10 prefix_1">
                
                <h1>Student Directory</h1>
                
                {exp:query limit="10" sql="
    
                    SELECT member_id FROM `exp_members` NATURAL JOIN `exp_member_data`
                    WHERE group_id = '5'
                    ORDER BY m_field_id_4 ASC 
    
                    "}
                    
                    {embed="embeds/profiles" query_member_id="{member_id}"}
    
                    {paginate}
                    Page {current_page} of {total_pages} pages {pagination_links}
                    {/paginate}
                
                {/exp:query} 
            
            </div>
            
            <div class="grid_4 suffix_1">
                {embed="embeds/profiles_menu" my_location="{segment_3}"}
            </div>
        
            <div class="clear"></div>
            
            {embed="embeds/bottom_navigation"}
        
        </div>
        
        {copyright}
        
    </body>
    </html>

    Any ideas on why I’m seeing this error now?

  • #2 / Oct 06, 2009 5:49pm

    Mark Bowen

    12637 posts

    Hi Zebake,

    That error usually means that you have some error in some PHP code in one of your templates somewhere. As you don’t have any PHP code in that code you have shown above then do you have any in any of the embedded templates perhaps? You might want to take out any embeds where you can just to start breaking things down a bit to test.

    There is also a KB article that might help on this too - http://expressionengine.com/knowledge_base/article/evald_code_error_in_corefunctionsphp/.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Oct 06, 2009 6:00pm

    Ingmar

    29245 posts

    Thanks for the assist, Mark. Let us know if that helps, zebake, please 😊

  • #4 / Oct 06, 2009 6:25pm

    zebake

    19 posts

    Thank you Mark, I had read that as well but I don’t have php in any of the embeded templates, either.  To begin troubleshooting, I removed all embeds out of my template, except for embeds/profiles, and I am still seeing the same error, stating the error is in the same line, even though deleting some lines from the top of the template should have changed the line the error is on.  (I would assume)

    Here is my embeds/profiles template:

    {exp:member:custom_profile_data member_id="{embed:query_member_id}"}
    
    <div class="address_entry">
        {!-- PHONE --}
        <div class="ab_right_side">
            {if phone}<div class="ab_phone">{phone}</div>{/if}
        </div>
        
        <div class="ab_left_side">
            {!-- CHILD #1 --}
            <div class="ab_child">{if child1_last_name}{child1_last_name}{if:else}{last_name}{/if}, {child1_first_name}</div>
            
            {!-- CHILD #2 --}
            {if child2_first_name}<div class="ab_child">{if child2_last_name}{child2_last_name}{if:else}{last_name}{/if}, {child2_first_name}</div>{/if}
            
            {!-- CHILD #3 --}
            {if child3_first_name}<div class="ab_child">{if child3_last_name}{child3_last_name}{if:else}{last_name}{/if}, {child3_first_name}</div>{/if}
            
            {!-- IF NO SPOUSE --}
            {if spouse_first_name ==""}<div class="ab_parents">{first_name} {last_name}</div>{/if}
            
            {!-- IF SPOUSE HAS SAME LAST NAME --}
            {if spouse_first_name AND spouse_last_name ==""}<div class="ab_parents">{first_name} & {spouse_first_name} {last_name}</div>{/if}
            
            {!-- IF SPOUSE HAS DIFFERENT LAST NAME --}
            {if spouse_last_name !={last_name}}<div class="ab_parents">{first_name} {last_name} & {spouse_first_name} {spouse_last_name}</div>{/if}
            
            {!-- ADDRESS --}
            {if address}<div class="ab_address">{address}</div>{/if}
            
            {!-- IF SPOUSE HAS AN EMAIL ACCOUNT --}
            {if email AND spouse_email}<div class="ab_email">{first_name}'s Email: {email}
    
            {spouse_first_name}'s Email: {spouse_email}</div>{/if}
            
            {!-- IF SPOUSE DOES NOT HAVE AN EMAIL ACCOUNT --}
            {if email AND spouse_email ==""}<div class="ab_email">Email: {email}</div>{/if}
        </div>
    </div>
    
    {/exp:member:custom_profile_data} 
            {if address}<div class="ab_address">{address}</div>{/if}

    I will begin troubleshooting this to see if I can find the problem, as soon as I get home from work. 

    Thanks again for your assistance!

  • #5 / Oct 06, 2009 7:20pm

    Sue Crocker

    26054 posts

    Reduce the complexity, and hard code settings instead of passing them through an embed. See if that helps.

  • #6 / Nov 25, 2009 4:22am

    aimelise

    31 posts

    I was having the same issue, but with my search “simple_form.”  I actually posted my issue here.  I then realized I didn’t have the “result_page” parameter defined.  I took out all the embeds in my “result_page” template and that seemed to solve it.

  • #7 / Nov 25, 2009 5:07am

    Ingmar

    29245 posts

    Thanks for your feedback. Closing this old thread. Please don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases