Wednesday 11 July 2012 4:54:37 pm - 3 replies
After fresh eZ Publish installed with eZ flow ,
While browsing blogs by t ags At : http://myurl.com/Blogs/(tag)/Berlin
I get error :
Fatal error: mysql_query(): Query error: Unknown COLUMN 'ezcontentobject_name.content_version' IN 'on clause'. Query: SELECT DISTINCT ezcontentobject_tree.node_id, ezkeyword.keyword, a0.sort_key_int FROM ezkeyword INNER JOIN ezkeyword_attribute_link ON (ezkeyword_attribute_link.keyword_id = ezkeyword.id) INNER JOIN ezcontentobject_attribute ON (ezcontentobject_attribute.id = ezkeyword_attribute_link.objectattribute_id) INNER JOIN ezcontentobject ON (ezcontentobject_attribute.version = ezcontentobject.current_version AND ezcontentobject_attribute.contentobject_id = ezcontentobject.id) INNER JOIN ezcontentobject_tree ON (ezcontentobject_tree.contentobject_id = ezcontentobject.id) INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id) INNER JOIN ezcontentobject_attribute a0 ON ( a0.contentobject_id = ezconten IN /srv/qtdn/ez/lib/ezdb/classes/ezmysqldb.php ON line <em>426</em>
xdebug : http://i.imgur.com/5aswL.png
Modified on Wednesday 11 July 2012 6:47:07 pm by Gurudutt Verma
Wednesday 11 July 2012 5:43:05 pm
Full query :
<span>SELECT DISTINCT ezcontentobject_tree.node_id, ezkeyword.keyword, a0.sort_key_int<span id="line2"> </span> FROM ezkeyword<span id="line3"> </span> INNER JOIN ezkeyword_attribute_link ON (ezkeyword_attribute_link.keyword_id = ezkeyword.id)<span id="line4"></span> INNER JOIN ezcontentobject_attribute ON (ezcontentobject_attribute.id = ezkeyword_attribute_link.objectattribute_id)<span id="line5"></span> INNER JOIN ezcontentobject ON (ezcontentobject_attribute.version = ezcontentobject.current_version AND ezcontentobject_attribute.contentobject_id = ezcontentobject.id)<span id="line6"></span> INNER JOIN ezcontentobject_tree ON (ezcontentobject_tree.contentobject_id = ezcontentobject.id)<span id="line7"></span> INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id)<span id="line8"></span> INNER JOIN ezcontentobject_attribute a0 ON (<span id="line9"></span> a0.contentobject_id = ezcontentobject.id AND<span id="line10"></span> a0.contentclassattribute_id = 216 AND<span id="line11"></span> a0.version = ezcontentobject_name.content_version AND<span id="line12"></span> ( a0.language_id <span><span>&</span></span> ezcontentobject.language_mask > 0 AND<span id="line13"></span> ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask <span><span>&</span></span> a0.language_id ) ) <span><span>&</span></span> 1 )<span id="line14"></span> + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask <span><span>&</span></span> a0.language_id ) ) <span><span>&</span></span> 8 ) >> 2 )<span id="line15"></span> + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask <span><span>&</span></span> a0.language_id ) ) <span><span>&</span></span> 4 ) )<span id="line16"></span> + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask <span><span>&</span></span> a0.language_id ) ) <span><span>&</span></span> 2 ) </span><span class="error" title="Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”."><<</span><span></span><span class="error" title="Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”."> </span><span>2 )<span id="line17"></span> </span><span class="error" title="Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”."><<span id="line18"></span></span><span> ( a0.language_id <span><span>&</span></span> 1 )<span id="line19"></span> + ( ( a0.language_id <span><span>&</span></span> 8 ) >> 2 )<span id="line20"></span> + ( ( a0.language_id <span><span>&</span></span> 4 ) )<span id="line21"></span> + ( ( a0.language_id <span><span>&</span></span> 2 ) </span><span class="error" title="Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”."><<</span><span></span><span class="error" title="Bad character after “<”. Probable cause: Unescaped “<”. Try escaping it as “<”."> </span><span>2 )<span id="line22"></span> ) <span id="line23"></span>) INNER JOIN ezcontentobject_name ON (ezcontentobject_name.contentobject_id = ezcontentobject.id)<span id="line24"></span> <span id="line25"></span> WHERE<span id="line26"></span> ezkeyword.keyword LIKE 'Berlin%'<span id="line27"></span> AND ezcontentobject_tree.is_invisible = 0<span id="line28"></span> AND ((ezcontentobject.section_id in (1)) OR (ezcontentobject.contentclass_id in (29, 33, 35, 36, 37, 45) AND ezcontentobject.section_id in (3))) <span id="line29"></span> <span id="line30"></span> <span id="line31"></span> AND ezcontentobject_tree.parent_node_id = '109'<span id="line32"></span> AND ezcontentclass.version = 0<span id="line33"></span> AND ezcontentobject.status = 1<span id="line34"></span> AND ezcontentobject_tree.main_node_id = ezcontentobject_tree.node_id<span id="line35"></span> ORDER BY a0.sort_key_int DESC</span><span></span>
Wednesday 11 July 2012 6:43:29 pm
Patch to fix this issue.
--- kernel/content/ezcontentfunctioncollection.php 2012-07-11 18:39:38.257454474 +0200 +++ kernel/content/ezcontentfunctioncollection.php.orig 2012-05-31 18:34:19.000000000 +0200 @@ -947,7 +947,7 @@ if ( $sortBy[0] == 'attribute' ) { // if sort_by is 'attribute' we should add ezcontentobject_name to "FromSQL" and link to ezcontentobject - $sortingInfo['attributeFromSQL'] = ' INNER JOIN ezcontentobject_name ON (ezcontentobject_name.contentobject_id = ezcontentobject.id) ' . $sortingInfo['attributeFromSQL']; + $sortingInfo['attributeFromSQL'] .= ' INNER JOIN ezcontentobject_name ON (ezcontentobject_name.contentobject_id = ezcontentobject.id)'; $sqlTarget = 'DISTINCT ezcontentobject_tree.node_id, '.$sqlKeyword; } else // for unique declaration
In issue tracker this issue was already reported and was closed as invalid .... not sure why but to fix this I have applied above patch.
Modified on Wednesday 11 July 2012 6:45:32 pm by Gurudutt Verma
Wednesday 18 July 2012 10:53:11 pm
Quote from Gurudutt Verma :Patch to fix this issue.
--- kernel/content/ezcontentfunctioncollection.php 2012-07-11 18:39:38.257454474 +0200 +++ kernel/content/ezcontentfunctioncollection.php.orig 2012-05-31 18:34:19.000000000 +0200 @@ -947,7 +947,7 @@ if ( $sortBy[0] == 'attribute' ) { // if sort_by is 'attribute' we should add ezcontentobject_name to "FromSQL" and link to ezcontentobject - $sortingInfo['attributeFromSQL'] = ' INNER JOIN ezcontentobject_name ON (ezcontentobject_name.contentobject_id = ezcontentobject.id) ' . $sortingInfo['attributeFromSQL']; + $sortingInfo['attributeFromSQL'] .= ' INNER JOIN ezcontentobject_name ON (ezcontentobject_name.contentobject_id = ezcontentobject.id)'; $sqlTarget = 'DISTINCT ezcontentobject_tree.node_id, '.$sqlKeyword; } else // for unique declarationIn issue tracker this issue was already reported and was closed as invalid .... not sure why but to fix this I have applied above patch.
Oopps little mistake in generating this patch ![]()
consider + as -
and - as +
and all works as expected
You must be logged in to post messages in this topic!