ExpressionEngine® 3 User Guide

Legacy Documentation

You are using the documentation for version 3.5.17. Go here for the latest version or check here for your available upgrades to the latest version.

Error On View Template

Loading a template results in Parse error: syntax error, unexpected T_STRING in path/to/system/core/core.functions.php(626) : eval()’d code on line 1

Troubleshoot Template

This indicates an error in the template being loaded, at the line indicated at the error.

One common cause is whitespace in Javascript code that is causing the Javascript to be parsed as a conditional.

<script>
function foo(){if(cond...) ...code... };
</script>

Add whitespace around the curly bracket to fix the error:

<script>
function foo() { if (cond...) ...code... };
</script>