HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[v5.0.3] Catalogue search error

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#64534 (In Topic #13904)
Avatar

Well-settled

Searching catalogue entries results in error:

Unfortunately a query has failed [SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,t1.text_original AS b_cv_value,t1.text_original AS f0_actual_value,t2.text_original AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t3.text_original AS f7_actual_value,t4.text_original AS f8_actual_value,t5.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short_trans f0 ON (f0.ce_id=r.id AND f0.cf_id=42) LEFT JOIN ocp4_catalogue_efv_short_trans f1 ON (f1.ce_id=r.id AND f1.cf_id=44) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type='catalogue_entry' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST ('scott') AND r.ce_add_date>1284550411 AND t1.text_original LIKE '%scott%' AND r.c_name='Rennrad'] [Unknown column 't1.text_original' in 'field list'].


Hier ist der Stack-Trace:

Below is a stack trace revealing the state the software was in when the error occurred. If this represents a bug in the unmodified software, you may want to check ocPortal website for a fix, and if there isn't one, report this as a bug. Please note that merely posting a stack trace is not sufficient for us to solve your problem; the stack trace is just an aid that presents us with additional information. We still need to know the error message, what you tried to do, how you tried to do it, version numbers, and any other appropriate information.
We apologise for this problem and if it's a bug we hope you will work with us so that we can fix it for you promptly.

File'/opt/lampp/htdocs/mtbrrmag/sources/failure.php'
Line'604'
Function'get_html_trace'
Args

File'/opt/lampp/htdocs/mtbrrmag/sources/global2.php'
Line'920'
Function'_fatal_exit'
Argsobject


File'/opt/lampp/htdocs/mtbrrmag/sources/database/mysql.php'
Line'238'
Function'fatal_exit'
Argsobject


File'/opt/lampp/htdocs/mtbrrmag/sources/database.php'
Line'1,060'
Function'db_query'
Class'Database_Static_mysql'
Type'->'
ObjectDatabase_Static_mysql::__set_state(array( ))
Args'SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,t1.text_original AS b_cv_value,t1.text_original AS f0_actual_value,t2.text_original AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t3.text_original AS f7_actual_value,t4.text_original AS f8_actual_value,t5.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short_trans f0 ON (f0.ce_id=r.id AND f0.cf_id=42) LEFT JOIN ocp4_catalogue_efv_short_trans f1 ON (f1.ce_id=r.id AND f1.cf_id=44) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type=\'catalogue_entry\' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST (\'r\') AND r.ce_add_date>1284550519 AND t1.text_original LIKE \'%r%\' AND r.c_name=\'Rennrad\' ORDER BY ce_add_date DESC'

array ( 0 => NULL, 1 => 'mtbrrmag', )

NULL

NULL

false

false

false

false


File'/opt/lampp/htdocs/mtbrrmag/sources/database.php'
Line'934'
Function'_query'
Class'database_driver'
Type'->'
Objectdatabase_driver::__set_state(array( 'table_prefix' => 'ocp4_', 'connection_read' => array ( 0 => NULL, 1 => 'mtbrrmag', ), 'connection_write' => array ( 0 => NULL, 1 => 'mtbrrmag', ), 'text_lookup_original_cache' => array ( 78 => '', 79 => '', 36 => 'Administratoren', 38 => 'Senior Moderator', 37 => '', 39 => 'Site staff', 9 => '', 4 => 'Mountainbike u. Rennrad Magazin - Technik, Markt, Tests, GPS, Community, MTB', 7338 => 'Bezeichnung', 7345 => 'Hersteller', 7348 => 'Internet', 7350 => 'Vertrieb', 7352 => 'Saison', 7356 => 'Preis', 7358 => 'Gewicht', 7380 => 'Beschreibung', 7383 => 'Informationen', 7507 => 'Links', 7335 => 'Rennräder', 16 => 'About me', 18 => 'AIM ID', 20 => 'MSN Messenger ID', 22 => 'Yahoo messenger ID', 24 => 'Skype ID', 26 => 'Interests', 28 => 'Location', 30 => 'Occupation', 4543 => 'Bikes', 4545 => 'Bikerevier', 4547 => 'Bikekategorien', 17 => 'Some personally written information.', 19 => 'AIM username.', 21 => 'E-mail address of MSN Messenger account.', 23 => 'Log in name of a Yahoo messenger account.', 25 => 'Skype username.', 27 => 'A summary of your interests.', 29 => 'Your geographical location.', 31 => 'This member\'s occupation.', 4544 => 'Welche Bikes fahren Sie?', 4546 => 'Wo ist oder sind Ihr(e) Bikerevier(e)? Wo biken Sie am liebsten?', 4548 => 'Was fahren Sie am liebsten? XC, Marathon, Tour, Trail, All Mountain, Freeride, Downhill, Dirt, oder ganz etwas anderes?', ), 'text_lookup_cache' => array ( 78 => 'return unserialize("a:6:{i:0;a:0:{}i:1;a:0:{}i:2;s:10:\":container\";i:3;N;i:4;N;i:5;s:0:\"\";}"); ', 79 => 'return unserialize("a:6:{i:0;a:0:{}i:1;a:0:{}i:2;s:10:\":container\";i:3;N;i:4;N;i:5;s:0:\"\";}"); ', 36 => '', 38 => '', 37 => '', 39 => '', 9 => '', 4 => '', 7338 => '', 7345 => '', 7348 => '', 7350 => '', 7352 => '', 7356 => '', 7358 => '', 7380 => '', 7383 => '', 7507 => '', 7335 => '', 16 => '', 18 => '', 20 => '', 22 => '', 24 => '', 26 => '', 28 => '', 30 => '', 4543 => '', 4545 => '', 4547 => '', 17 => '', 19 => '', 21 => '', 23 => '', 25 => '', 27 => '', 29 => '', 31 => '', 4544 => '', 4546 => '', 4548 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))
Args'SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,t1.text_original AS b_cv_value,t1.text_original AS f0_actual_value,t2.text_original AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t3.text_original AS f7_actual_value,t4.text_original AS f8_actual_value,t5.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short_trans f0 ON (f0.ce_id=r.id AND f0.cf_id=42) LEFT JOIN ocp4_catalogue_efv_short_trans f1 ON (f1.ce_id=r.id AND f1.cf_id=44) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type=\'catalogue_entry\' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST (\'r\') AND r.ce_add_date>1284550519 AND t1.text_original LIKE \'%r%\' AND r.c_name=\'Rennrad\' ORDER BY ce_add_date DESC'

NULL

NULL

false

false

NULL

''


File'/opt/lampp/htdocs/mtbrrmag/sources/database_search.php'
Line'413'
Function'query'
Class'database_driver'
Type'->'
Objectdatabase_driver::__set_state(array( 'table_prefix' => 'ocp4_', 'connection_read' => array ( 0 => NULL, 1 => 'mtbrrmag', ), 'connection_write' => array ( 0 => NULL, 1 => 'mtbrrmag', ), 'text_lookup_original_cache' => array ( 78 => '', 79 => '', 36 => 'Administratoren', 38 => 'Senior Moderator', 37 => '', 39 => 'Site staff', 9 => '', 4 => 'Mountainbike u. Rennrad Magazin - Technik, Markt, Tests, GPS, Community, MTB', 7338 => 'Bezeichnung', 7345 => 'Hersteller', 7348 => 'Internet', 7350 => 'Vertrieb', 7352 => 'Saison', 7356 => 'Preis', 7358 => 'Gewicht', 7380 => 'Beschreibung', 7383 => 'Informationen', 7507 => 'Links', 7335 => 'Rennräder', 16 => 'About me', 18 => 'AIM ID', 20 => 'MSN Messenger ID', 22 => 'Yahoo messenger ID', 24 => 'Skype ID', 26 => 'Interests', 28 => 'Location', 30 => 'Occupation', 4543 => 'Bikes', 4545 => 'Bikerevier', 4547 => 'Bikekategorien', 17 => 'Some personally written information.', 19 => 'AIM username.', 21 => 'E-mail address of MSN Messenger account.', 23 => 'Log in name of a Yahoo messenger account.', 25 => 'Skype username.', 27 => 'A summary of your interests.', 29 => 'Your geographical location.', 31 => 'This member\'s occupation.', 4544 => 'Welche Bikes fahren Sie?', 4546 => 'Wo ist oder sind Ihr(e) Bikerevier(e)? Wo biken Sie am liebsten?', 4548 => 'Was fahren Sie am liebsten? XC, Marathon, Tour, Trail, All Mountain, Freeride, Downhill, Dirt, oder ganz etwas anderes?', ), 'text_lookup_cache' => array ( 78 => 'return unserialize("a:6:{i:0;a:0:{}i:1;a:0:{}i:2;s:10:\":container\";i:3;N;i:4;N;i:5;s:0:\"\";}"); ', 79 => 'return unserialize("a:6:{i:0;a:0:{}i:1;a:0:{}i:2;s:10:\":container\";i:3;N;i:4;N;i:5;s:0:\"\";}"); ', 36 => '', 38 => '', 37 => '', 39 => '', 9 => '', 4 => '', 7338 => '', 7345 => '', 7348 => '', 7350 => '', 7352 => '', 7356 => '', 7358 => '', 7380 => '', 7383 => '', 7507 => '', 7335 => '', 16 => '', 18 => '', 20 => '', 22 => '', 24 => '', 26 => '', 28 => '', 30 => '', 4543 => '', 4545 => '', 4547 => '', 17 => '', 19 => '', 21 => '', 23 => '', 25 => '', 27 => '', 29 => '', 31 => '', 4544 => '', 4546 => '', 4548 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))
Args'SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,t1.text_original AS b_cv_value,t1.text_original AS f0_actual_value,t2.text_original AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t3.text_original AS f7_actual_value,t4.text_original AS f8_actual_value,t5.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short_trans f0 ON (f0.ce_id=r.id AND f0.cf_id=42) LEFT JOIN ocp4_catalogue_efv_short_trans f1 ON (f1.ce_id=r.id AND f1.cf_id=44) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type=\'catalogue_entry\' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST (\'r\') AND r.ce_add_date>1284550519 AND t1.text_original LIKE \'%r%\' AND r.c_name=\'Rennrad\' ORDER BY ce_add_date DESC'


File'/opt/lampp/htdocs/mtbrrmag/sources/hooks/modules/search/catalogue_entries.php'
Line'309'
Function'get_search_rows'
Args'catalogue_entry'

'id'

array ( 0 => 'r', )

false

'DESC'

10

0

false

'catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short_trans f0 ON (f0.ce_id=r.id AND f0.cf_id=42) LEFT JOIN ocp4_catalogue_efv_short_trans f1 ON (f1.ce_id=r.id AND f1.cf_id=44) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)'

array ( 0 => '!', 1 => 'f0.cv_value', 2 => 'f1.cv_value', 3 => 'f7.cv_value', 4 => 'f8.cv_value', 5 => 'f9.cv_value', )

' AND r.ce_add_date>1284550519 AND t1.text_original LIKE \'%r%\' AND r.c_name=\'Rennrad\''

'(? LIKE \'%r%\')'

'ce_add_date'

'r.*,r.id AS id,r.cc_id AS r_cc_id,t1.text_original AS b_cv_value,t1.text_original AS f0_actual_value,t2.text_original AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t3.text_original AS f7_actual_value,t4.text_original AS f8_actual_value,t5.text_original AS f9_actual_value'

array ( 0 => 'f2.cv_value', 1 => 'f5.cv_value', 2 => 'f6.cv_value', )


File'/opt/lampp/htdocs/mtbrrmag/site/pages/modules/search.php'
Line'563'
Function'run'
Class'Hook_search_catalogue_entries'
Type'->'
ObjectHook_search_catalogue_entries::__set_state(array( ))
Argsarray ( 0 => 'r', )

false

'DESC'

10

0

false

'(? LIKE \'%r%\')'

''

NULL

1284550519

'add_date'

'catalogue_entries'

'OR'

''

'!'

0


File'/opt/lampp/htdocs/mtbrrmag/site/pages/modules/search.php'
Line'460'
Function'results'
Class'Module_search'
Type'->'
ObjectModule_search::__set_state(array( ))
Args'catalogue_entries'

''

NULL

60

'add_date'

'DESC'

false

'!'


File'/opt/lampp/htdocs/mtbrrmag/site/pages/modules/search.php'
Line'225'
Function'form'
Class'Module_search'
Type'->'
ObjectModule_search::__set_state(array( ))
Args

File'/opt/lampp/htdocs/mtbrrmag/sources/zones.php'
Line'336'
Function'run'
Class'Module_search'
Type'->'
ObjectModule_search::__set_state(array( ))
Args

File'/opt/lampp/htdocs/mtbrrmag/sources/site.php'
Line'964'
Function'load_module_page'
Args'site/pages/modules/search.php'

'search'


File'/opt/lampp/htdocs/mtbrrmag/sources/misc_scripts.php'
Line'188'
Function'request_page'
Args'search'

true


File'/opt/lampp/htdocs/mtbrrmag/data/iframe.php'
Line'49'
Function'iframe_script'
Args

Back to the top
 
Posted
Rating:
#64536
Avatar

Well-settled

Everything seems searchable, except the (custom) catalogues. When performing a search from the search box, it ends up in the MySQL deamon running at 100% CPU and never ending. I highlighted the snippet which seems to be the root cause.

SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,b.cv_value AS b_cv_value
FROM ((ocp4_catalogue_fields f,ocp4_catalogue_entries r)
LEFT JOIN ocp4_catalogue_efv_short_trans a ON (r.id=a.ce_id AND f.id=a.cf_id)
LEFT JOIN ocp4_catalogue_efv_long_trans b ON (r.id=b.ce_id AND f.id=b.cf_id)
LEFT JOIN ocp4_catalogue_efv_short c ON (r.id=c.ce_id AND f.id=c.cf_id)
LEFT JOIN ocp4_catalogue_efv_long d ON (r.id=d.ce_id AND f.id=d.cf_id)
LEFT JOIN ocp4_group_category_access z ON (z.module_the_name='catalogues_category' AND z.category_name=r.cc_id AND z.group_id=14 OR z.group_id=7)
LEFT JOIN ocp4_group_category_access p ON (p.module_the_name='catalogues_catalogue' AND p.category_name=r.c_name AND p.group_id=14 OR p.group_id=7))
JOIN ocp4_seo_meta m ON (m.meta_for_type='catalogue_entry' AND m.meta_for_id=r.id)
LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords
WHERE MATCH (tm.text_original) AGAINST ('scott')
AND z.category_name IS NOT NULL
AND p.category_name IS NOT NULL
AND ce_validated=1
ORDER BY ce_add_date DESC
Back to the top
 
Posted
Rating:
#64699
Avatar

Does this fix your problems?

Attachment
sources/hooks/modules/search/catalogue_entries.php
» Download: catalogue_entries.php (17 Kb, 114 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#64712
Avatar

Well-settled

Hi Chris,

Thanks for this. Unfortunatelly, it doesn't solve the issue.

1. Create custom catalogue
2. Add custom fields to the custom catalogue [A brief line of text (no Comcode support)]
3. Perform the following catalogue entry search [../site/index.php?page=search&id=catalogue_entries]:

3a) Fill in search criteria in custom field, sort by relevance
3b) Fill in search criteria in custom field, sort by date
3c) Fill in search criteria in search field, sort by relevance
3d) Fill in search criteria in search field, sort by date

Errors:

3a)

Unfortunately a query has failed [SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value, AS contextual_relevance FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t1 ON t1.id=f7.cv_value WHERE AND r.ce_add_date>1285320616 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' UNION SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value, AS contextual_relevance FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t2 ON t2.id=f8.cv_value WHERE AND r.ce_add_date>1285320616 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' UNION SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value, AS contextual_relevance FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t3 ON t3.id=f9.cv_value WHERE AND r.ce_add_date>1285320616 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad'] [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 'AS contextual_relevance FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_' at line 1]

3b)

Unfortunately a query has failed [SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t1 ON t1.id=f7.cv_value WHERE AND r.ce_add_date>1285320695 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' UNION SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t2 ON t2.id=f8.cv_value WHERE AND r.ce_add_date>1285320695 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' UNION SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) LEFT JOIN ocp4_translate t3 ON t3.id=f9.cv_value WHERE AND r.ce_add_date>1285320695 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' ORDER BY ce_add_date DESC] [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 r.ce_add_date>1285320695 AND f1.cv_value LIKE '%cube%' AND r.c_name='Rennrad' at line 1]

3c)

Unfortunately a query has failed [SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type='catalogue_entry' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST ('cube') AND r.ce_add_date>1285320767 AND r.c_name='Rennrad'] [Unknown column 't1.text_original' in 'field list'].

3d)

Unfortunately a query has failed [SELECT r.*,r.id AS id,r.cc_id AS r_cc_id,f0.cv_value AS b_cv_value,f0.cv_value AS f0_actual_value,f1.cv_value AS f1_actual_value,f2.cv_value AS f2_actual_value,f5.cv_value AS f5_actual_value,f6.cv_value AS f6_actual_value,t1.text_original AS f7_actual_value,t2.text_original AS f8_actual_value,t3.text_original AS f9_actual_value FROM (ocp4_catalogue_entries r LEFT JOIN ocp4_catalogue_efv_short f0 ON (f0.ce_id=r.id AND f0.cf_id=131) LEFT JOIN ocp4_catalogue_efv_short f1 ON (f1.ce_id=r.id AND f1.cf_id=129) LEFT JOIN ocp4_catalogue_efv_short f2 ON (f2.ce_id=r.id AND f2.cf_id=45) LEFT JOIN ocp4_catalogue_efv_long f3 ON (f3.ce_id=r.id AND f3.cf_id=46) LEFT JOIN ocp4_catalogue_efv_long f4 ON (f4.ce_id=r.id AND f4.cf_id=47) LEFT JOIN ocp4_catalogue_efv_short f5 ON (f5.ce_id=r.id AND f5.cf_id=49) LEFT JOIN ocp4_catalogue_efv_short f6 ON (f6.ce_id=r.id AND f6.cf_id=50) LEFT JOIN ocp4_catalogue_efv_long_trans f7 ON (f7.ce_id=r.id AND f7.cf_id=59) LEFT JOIN ocp4_catalogue_efv_long_trans f8 ON (f8.ce_id=r.id AND f8.cf_id=60) LEFT JOIN ocp4_catalogue_efv_long_trans f9 ON (f9.ce_id=r.id AND f9.cf_id=92)) JOIN ocp4_seo_meta m ON (m.meta_for_type='catalogue_entry' AND m.meta_for_id=r.id) LEFT JOIN ocp4_translate tm ON tm.id=m.meta_keywords WHERE MATCH (tm.text_original) AGAINST ('cube') AND r.ce_add_date>1285320844 AND r.c_name='Rennrad' ORDER BY ce_add_date DESC] [Unknown column 't1.text_original' in 'field list'].


Btw, global search including catalogue entries seem to work.
Back to the top
 
Posted
Rating:
#64723
Avatar

Two classes of error here. I could reproduce one of them, the other seems to be an older problem fixed a while back but maybe you have a slightly different 5.0.3 to what I tested on. Regardless I think using these files will fix it all.

Attachment
» Download: database_search.php (31 Kb, 115 downloads so far)
Attachment
» Download: catalogue_entries.php (17 Kb, 119 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#64764
Avatar

Well-settled

Hi Chris,

Thank You, this fixed the issue. Searching custom catalogues works fine now.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: