MySQL error in lanaguage toggle instead of 404 page for URL issue mistypes, but not later in path.
  • Following a recent update to 4.2.1 any mistype of a url before correctly encoding a published issue path, I am receiving the following message. It appears to be in place of my language toggle, which switches between English and French. The toggle works great under normal circumstances, and if<lang_code>/<issue>/ exist then any trailing mistakes redirect to the 404 page ("Sorry, the requested page was not found").

    | SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND Issues.Number = AND Issues.IdLanguage = Languages.Id AND Issues.Published ' at line 1#0 /var/www/newscoop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(633): PDO->query('SELECT Language...') #1 /var/www/newscoop/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(580):

    Template code for my language toggle:

    <ul> | {{ list_languages of_issue="true" }}
    <li {{ if $gimme->language == $gimme->default_language }} class="selected"{{ /if }}><a href="{{ url }}">{{ $gimme->language->name }}</a> |</li>
    {{ /list_languages }}
    Post edited by captain stupy at 2014-03-12 19:49:07