| | #1 |
| Joshua Leavitt War Room Member Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
|
Hi there, This morning I noticed one of my websites, advancedthermalinc.com started showing an error and will not load. I can still log into wordpress, but the main website will not load. The error that is showing is below: Parse error: syntax error, unexpected '<' in /home/jleavitt/public_html/advancedthermalinc.com/wp-content/themes/u-design/header.php on line 232 The weird part is that in the header file there is not a line 232, it ends at 229. I have not made any edits to this website for several months. So I am not sure what happened. Thank you so much for your time. |
| |
| | #2 |
| HyperActive Warrior Join Date: 2010
Posts: 100
Thanks: 9
Thanked 17 Times in 14 Posts
|
Take a look at your plugins and start by disabling all of them. See if the site comes back up. Then try to activate one plugin at a time to see which plugin is causing the error. 9 times out of 10 it's related to the plugins. |
|
Buy or Sell Links Based on Authorship Status at AuthorLinks.net | |
| |
| | #3 |
| Joshua Leavitt War Room Member Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
|
I have tried disabling all plugins and the error still occurs. I did try switching themes and that did fix it. But the theme I am using is customized, so doing a fresh install of theme would require a bunch of work. So i am hoping to just find the one error spot and fix it. Thank you! |
| |
| | #4 | |
| Advanced Warrior War Room Member Join Date: 2006 Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
|
Why don't you post the last 20 or so lines of that page's source code, and we'll see if there are any syntax errors there. | |
| | ||
| |
| | #5 |
| Joshua Leavitt War Room Member Join Date: 2011
Posts: 155
Thanks: 22
Thanked 6 Times in 5 Posts
|
Lines 170 through 229 <div id="page-content-title"> <div id="page-content-header" class="container_24"> <div id="page-title"> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. if (is_page()) : ?> <h1><?php the_title(); ?></h1> <?php elseif ( is_single() ) : ?> <h1><?php the_title(); ?></h1> <?php elseif (is_tax()) : /* If this is a taxonomy archive */ $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?> <h1 class="pagetitle"><?php echo ucwords( $term->taxonomy ) . ': ' . $term->name; ?></h1> <?php elseif (is_category()) : /* If this is a category archive */ ?> <?php if ($udesign_options['show_archive_for_string'] == 'yes') : ?> <h1 class="pagetitle"><?php single_cat_title("", true); ?></h1> <?php else : ?> <h1 class="pagetitle"><?php printf( __('Archive for the ‘%s’ Category', 'udesign' ), single_cat_title("", false) ); ?></h1> <?php endif; ?> <?php elseif (is_search()) : /* If this is a search results page */ ?> <h1 class="pagetitle"><?php printf( __('Search Results for ‘<em>%s</em>’', 'udesign' ), get_search_query() ); ?></h1> <?php elseif (is_404()) : /* If this is a 404 page */ ?> <h1 class="pagetitle"><?php esc_html_e('Page Not Found (Error 404)', 'udesign'); ?></h1> <?php elseif( is_tag() ) : /* If this is a tag archive */ ?> <h1 class="pagetitle"><?php printf( __('Posts Tagged ‘%s’', 'udesign' ), single_tag_title("", false) ); ?></h1> <?php elseif (is_day()) : /* If this is a daily archive */ ?> <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_date() ); ?></h1> <?php elseif (is_month()) : /* If this is a monthly archive */ ?> <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('F Y') ); ?></h1> <?php elseif (is_year()) : /* If this is a yearly archive */ ?> <h1 class="pagetitle"><?php printf( __('Archive for %s', 'udesign' ), get_the_time('Y') ); ?></h1> <?php elseif (is_author()) : /* If this is an author archive */ ?> <h1 class="pagetitle"><?php esc_html_e('Author Archive', 'udesign'); ?></h1> <?php elseif (isset($_GET['paged']) && !empty($_GET['paged'])) : /* If this is a paged archive */ ?> <h1 class="pagetitle"><?php esc_html_e('Blog Archives', 'udesign'); ?></h1> <?php else : // the case when a Title is NOT present the height should be maintained ?> <div class="no-title-present"></div> <?php endif; ?> </div> <!-- end page-title --> </div> <!-- end page-content-header --> </div> <!-- end page-content-title --> <div class="clear"></div> <div id="page-content"> <img src="http://atc.jleavittdesigns.com/wp-content/uploads/2012/11/gg-bttn-over.png" style="display:none;"> <?php // Breadcrumbs if ( ($udesign_options['show_breadcrumbs'] == 'yes') && class_exists('simple_breadcrumb') ) : ?> <div class="container_24"> <?php $breadcrumbs_go = new simple_breadcrumb; ?> </div> <?php else : ?> <div class="no-breadcrumbs-padding"></div> <?php endif; ?> <?php endif; ?> |
| |
| | #6 |
| Advanced Warrior War Room Member Join Date: 2006 Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
|
I don't see any obvious syntax errors in that code. Normally, whenever it says syntax error, unexpected '<' that means that the previous statement is missing a closing semi-colon. But that doesn't seem to be the case in your code (unless I just overlooked something). If you haven't changed any code and this just started happening all of a sudden, then it's likely due to either a theme/plugin update, or a PHP version update (either scenario has the potential to break existing code). WordPress is not really my thing though, so it would probably be best to contact the developer of the theme about this. |
| | |
| |
| | #7 |
| Active Warrior Join Date: 2012 Location: Albania
Posts: 73
Thanks: 25
Thanked 13 Times in 12 Posts
|
Most probably it is a "extra space" issue. Open /home/jleavitt/public_html/advancedthermalinc.com/wp-content/themes/u-design/functions.php and editi it; remove any extra empty space before and after the code. It happens very often in Wordpress that just an extra empty space at the end or beginning of functions.php file, can mess up your site. Because the extra space might be in functions.php (which loads first), the error might show as in "in header.php" which loads after. Let me know if that helps.
|
| | |
| |
| | #8 |
| ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ War Room Member Join Date: 2008 Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3 |
It might be the lack of a couple of semicolons <?php // Breadcrumbs if ( ($udesign_options['show_breadcrumbs'] == 'yes') && class_exists('simple_breadcrumb') ) : ?> <div class="container_24"> <?php $breadcrumbs_go = new simple_breadcrumb; ?> </div> <?php else : ?> <?php else ; ?> |
|
Robin | |
| |
| | #9 |
| Advanced Warrior War Room Member Join Date: 2006 Location: USA
Posts: 1,907
Thanks: 236
Thanked 1,377 Times in 676 Posts
|
@ Robin - the colons are just an alternate syntax for opening curly brackets, so it's valid code. http://php.net/manual/en/control-str...ive-syntax.php |
| | |
| |
| The Following User Says Thank You to Brandon Tanner For This Useful Post: |
| | #10 |
| ɹoıɹɹɐʍ ǝʌıʇɔɐɹǝdʎɥ War Room Member Join Date: 2008 Location: Texas
Posts: 2,138
Thanks: 243
Thanked 453 Times in 382 Posts
Blog Entries: 3 |
Learn something new every day. How about if you change this line <?php else : // the case when a Title is NOT present the height should be maintained ?> to <?php else : /* the case when a Title is NOT present the height should be maintained*/ ?> |
|
Robin | |
| |
|
| Bookmarks |
| Tags |
| error, syntax, website |
| |