When I enable the theme, I get this error.

Parse error: syntax error, unexpected '<' in .../sites/all/themes/blueprint/page.tpl.php on line 3

This is caused from the PHP tag that is open at the beginning of the page.tpl.php template file (and other template files) but it's not closed. The first character found after the PHP tag is interpreted as PHP code, but it's HTML markup.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

audisport created an issue. See original summary.

yash_khandelwal’s picture

Status: Active » Needs review
FileSize
447 bytes

Patch has been created. Please check.

audisport’s picture

Status: Needs review » Active

There is no line <?php if ($title): ?><h3><?php print $title; ?></h3><? endif; ?> in the file /sites/all/themes/blueprint/comment.tpl.php

audisport’s picture

FileSize
49.87 KB
yash_khandelwal’s picture

Status: Active » Needs review
FileSize
6.7 KB

I apologize for the previous patch which was for branch 'master'. A new patch has been created for branch 7.x-2.x. Please check.

apaderno’s picture

Assigned: audisport » Unassigned
Status: Needs review » Needs work

The error reported in the IS is the following.

Parse error: syntax error, unexpected '<' in .../sites/all/themes/blueprint/page.tpl.php on line 3

None of the provided patches fixes that.

The first four lines in page.tpl.php for the 7.x-2.x branch are the following.

<?php

<div class="container">
  <div id="header">

The issue it's the <?php tag that should not be there. With that opening tag, what follow is interpreted as PHP code when it's HTML markup. PHP code cannot start with <, and that's what the error message is saying.

apaderno’s picture

Title: syntax error, unexpected '<' in page.tpl.php » Template files start with a opening PHP tag that isn't closed and that causes syntax errors
Issue summary: View changes
Status: Needs work » Needs review
FileSize
13.97 KB

There is more than a template file with an opening PHP tag that isn't closed.
I added the default comments Drupal core adds at the beginning of the template files, when the template file is one implemented by a Drupal core module; otherwise, I simply removed the <?php part.

apaderno’s picture

Title: Template files start with a opening PHP tag that isn't closed and that causes syntax errors » Template files starts with an opening PHP tag that isn't closed and that causes syntax errors