I have a content type called Match Report, and have enabled the 6.x-1.1 version of Contemplate module.
This Content Type displays normally, until I tick the "Affect body output" check box and save the changes. I have made no changes to the Body Template.
The error message displayed is:
Parse error: syntax error, unexpected '&' in mysite.com/sites/all/modules/contemplate/contemplate.module(834) : eval()'d code on line 4
The body template which is created automatically is:
<div class="field field-type-date field-field-fixture-date">
<h3 class="field-label">Date</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_fixture_date[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-nodereference field-field-opponents">
<h3 class="field-label">Opponents</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_opponents[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-text field-field-home-away">
<h3 class="field-label">Played at</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_home_away[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-text field-field-result">
<h3 class="field-label">Result</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_result[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-text field-field-match-report">
<h3 class="field-label">Match Report</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_match_report[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-number-integer field-field-scored-by-wells">
<h3 class="field-label">Wells Scored</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_scored_by_wells[0]['view'] ?></div>
</div>
</div>
<div class="field field-type-number-integer field-field-scored-by-opponents">
<h3 class="field-label">Opponents Scored</h3>
<div class="field-items">
<div class="field-item"><?php print $node->field_scored_by_opponents[0]['view'] ?></div>
</div>
</div>
Let me know what else you need to debug this. Thanks
Comments
Comment #1
jrglasgow commentedhmmm.....
on line 4, this line:
should be
Comment #2
maxweld commentedThanks
I changed the
>on line 4 and on all other lines and this solves the parsing error, although I am not sure why the generated code should contain the>instead of the ">".The page now displays, but instead of the values expected it shows the php code:
for example, for line 4
<?php print $node->field_fixture_date[0]['view'] ?>although this is formatted
Comment #3
maxweld commentedAfter a bit of fiddling I noticed that there was a
<on similar lines, but not on line 4.I have corrected this and the fields now display as expected.
So I think it now only remains to understand how the
< and >got there in the first place.Comment #4
maxweld commentedI believe that the error was caused by my use of the FCKeditor. Its use with this field seems to introduce the conversion from
< or >to< or >I think you we can close the issue.
Thanks for your help