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.


ocf_groups.php - Error [5.0.0]

Login / Search

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

Well-settled

Incomplete SQL statement in ocf_groups.php

Hi Chris, All,

Just upgraded from 4.3.2 to 5.0.0.

The below error occurs on site [/personalzone/myhome.htm] when logged in with Administrator account (btw, errors are populated to this account).

Pls find the stack trace below. As you can see, the SQL statement appears incomplete (missing group id).

Thanks in advance for your advice.

Dirk



Unfortunately a query has failed [SELECT g.*,t0.text_original AS t0__text_original,t0.text_parsed AS t0__text_parsed,t1.text_original AS t1__text_original,t1.text_parsed AS t1__text_parsed FROM ocp4_f_groups g LEFT JOIN ocp4_translate t0 on t0.id=g_name AND t0.language='DE' LEFT JOIN ocp4_translate t1 on t1.id=g_title AND t1.language='DE' WHERE g.id=] [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 '' at line 1]. (version: 5.0.0, PHP version: 5.2.2, URL: /personalzone/myhome.htm)

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/ocportal/sources/failure.php'
Line'592'
Function'get_html_trace'
Args

File'/opt/lampp/htdocs/ocportal/sources/global2.php'
Line'883'
Function'_fatal_exit'
Argsobject


File'/opt/lampp/htdocs/ocportal/sources/database/mysql.php'
Line'232'
Function'fatal_exit'
Argsobject


File'/opt/lampp/htdocs/ocportal/sources/database.php'
Line'1,025'
Function'db_query'
Class'Database_Static_mysql'
Type'->'
ObjectDatabase_Static_mysql::__set_state(array( ))
Args'SELECT g.*,t0.text_original AS t0__text_original,t0.text_parsed AS t0__text_parsed,t1.text_original AS t1__text_original,t1.text_parsed AS t1__text_parsed FROM ocp4_f_groups g LEFT JOIN ocp4_translate t0 on t0.id=g_name AND t0.language=\'DE\' LEFT JOIN ocp4_translate t1 on t1.id=g_title AND t1.language=\'DE\' WHERE g.id='

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

NULL

NULL

false

false

false

false


File'/opt/lampp/htdocs/ocportal/sources/database.php'
Line'920'
Function'_query'
Class'database_driver'
Type'->'
Objectdatabase_driver::__set_state(array( 'table_prefix' => 'ocp4_', 'connection_read' => array ( 0 => NULL, 1 => 'ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => 'ocportal', ), 'text_lookup_original_cache' => array ( 78 => '', 79 => '', 36 => 'Administratoren', 5745 => 'Scott Genius Fahrer/innen', 37 => '', 5746 => '', 2772 => '', 2773 => '', 46 => 'Local', 5729 => 'Sinsheim', 47 => 'Standard member', 5730 => '', 89 => 'ocp_mobile_phone_number', 302 => 'ocp_points_gained_seedy', 313 => 'ocp_points_gained_chat', 351 => 'ocp_currency', 353 => 'ocp_payment_cardholder_name', 355 => 'ocp_payment_type', 357 => 'ocp_payment_card_number', 359 => 'ocp_payment_card_start_date', 361 => 'ocp_payment_card_expiry_date', 363 => 'ocp_payment_card_issue_number', 365 => 'ocp_payment_card_cv2', 379 => 'ocp_firstname', 381 => 'ocp_lastname', 383 => 'ocp_building_name_or_number', 385 => 'ocp_city', 387 => 'ocp_state', 389 => 'ocp_post_code', 391 => 'ocp_country', 425 => 'ocp_points_used', 427 => 'ocp_gift_points_used', 429 => 'ocp_points_gained_given', 431 => 'ocp_points_gained_rating', 433 => 'ocp_points_gained_voting', 435 => 'ocp_sites', 437 => 'ocp_role', 439 => 'ocp_fullname', 2774 => '', 2775 => '', 2776 => '', 4543 => 'Bikes', 4545 => 'Bikerevier', 4547 => 'Bikekategorien', 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?', 3637 => '', 3638 => '', 50 => 'Neuling', 51 => 'Standard member', 3639 => '', 3640 => '', 3641 => '', 9012 => '', 9013 => '', 9015 => '', 9016 => '', 9017 => '', 9038 => '', 9039 => '', 9041 => '', 9042 => '', 9043 => '', 34 => 'Guests', 35 => 'Guest user', ), 'text_lookup_cache' => array ( 78 => '', 79 => '', 36 => '', 5745 => '', 37 => '', 5746 => '', 2772 => '', 2773 => '', 46 => '', 5729 => '', 47 => '', 5730 => '', 89 => '', 302 => '', 313 => '', 351 => '', 353 => '', 355 => '', 357 => '', 359 => '', 361 => '', 363 => '', 365 => '', 379 => '', 381 => '', 383 => '', 385 => '', 387 => '', 389 => '', 391 => '', 425 => '', 427 => '', 429 => '', 431 => '', 433 => '', 435 => '', 437 => '', 439 => '', 2774 => '', 2775 => '', 2776 => '', 4543 => '', 4545 => '', 4547 => '', 4544 => '', 4546 => '', 4548 => '', 3637 => '', 3638 => '', 50 => '', 51 => '', 3639 => '', 3640 => '', 3641 => '', 9012 => '', 9013 => '', 9015 => '', 9016 => '', 9017 => '', 9038 => '', 9039 => '', 9041 => '', 9042 => '', 9043 => '', 34 => '', 35 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))
Args'SELECT g.* FROM ocp4_f_groups g WHERE g.id='

NULL

NULL

false

false

array ( 0 => 'g_name', 1 => 'g_title', )

''


File'/opt/lampp/htdocs/ocportal/sources/ocf_groups.php'
Line'125'
Function'query'
Class'database_driver'
Type'->'
Objectdatabase_driver::__set_state(array( 'table_prefix' => 'ocp4_', 'connection_read' => array ( 0 => NULL, 1 => 'ocportal', ), 'connection_write' => array ( 0 => NULL, 1 => 'ocportal', ), 'text_lookup_original_cache' => array ( 78 => '', 79 => '', 36 => 'Administratoren', 5745 => 'Scott Genius Fahrer/innen', 37 => '', 5746 => '', 2772 => '', 2773 => '', 46 => 'Local', 5729 => 'Sinsheim', 47 => 'Standard member', 5730 => '', 89 => 'ocp_mobile_phone_number', 302 => 'ocp_points_gained_seedy', 313 => 'ocp_points_gained_chat', 351 => 'ocp_currency', 353 => 'ocp_payment_cardholder_name', 355 => 'ocp_payment_type', 357 => 'ocp_payment_card_number', 359 => 'ocp_payment_card_start_date', 361 => 'ocp_payment_card_expiry_date', 363 => 'ocp_payment_card_issue_number', 365 => 'ocp_payment_card_cv2', 379 => 'ocp_firstname', 381 => 'ocp_lastname', 383 => 'ocp_building_name_or_number', 385 => 'ocp_city', 387 => 'ocp_state', 389 => 'ocp_post_code', 391 => 'ocp_country', 425 => 'ocp_points_used', 427 => 'ocp_gift_points_used', 429 => 'ocp_points_gained_given', 431 => 'ocp_points_gained_rating', 433 => 'ocp_points_gained_voting', 435 => 'ocp_sites', 437 => 'ocp_role', 439 => 'ocp_fullname', 2774 => '', 2775 => '', 2776 => '', 4543 => 'Bikes', 4545 => 'Bikerevier', 4547 => 'Bikekategorien', 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?', 3637 => '', 3638 => '', 50 => 'Neuling', 51 => 'Standard member', 3639 => '', 3640 => '', 3641 => '', 9012 => '', 9013 => '', 9015 => '', 9016 => '', 9017 => '', 9038 => '', 9039 => '', 9041 => '', 9042 => '', 9043 => '', 34 => 'Guests', 35 => 'Guest user', ), 'text_lookup_cache' => array ( 78 => '', 79 => '', 36 => '', 5745 => '', 37 => '', 5746 => '', 2772 => '', 2773 => '', 46 => '', 5729 => '', 47 => '', 5730 => '', 89 => '', 302 => '', 313 => '', 351 => '', 353 => '', 355 => '', 357 => '', 359 => '', 361 => '', 363 => '', 365 => '', 379 => '', 381 => '', 383 => '', 385 => '', 387 => '', 389 => '', 391 => '', 425 => '', 427 => '', 429 => '', 431 => '', 433 => '', 435 => '', 437 => '', 439 => '', 2774 => '', 2775 => '', 2776 => '', 4543 => '', 4545 => '', 4547 => '', 4544 => '', 4546 => '', 4548 => '', 3637 => '', 3638 => '', 50 => '', 51 => '', 3639 => '', 3640 => '', 3641 => '', 9012 => '', 9013 => '', 9015 => '', 9016 => '', 9017 => '', 9038 => '', 9039 => '', 9041 => '', 9042 => '', 9043 => '', 34 => '', 35 => '', ), 'table_exists_cache' => array ( ), 'static_ob' => Database_Static_mysql::__set_state(array( )), ))
Args'SELECT g.* FROM ocp4_f_groups g WHERE g.id='

NULL

NULL

false

false

array ( 0 => 'g_name', 1 => 'g_title', )


File'/opt/lampp/htdocs/ocportal/sources/ocf_groups.php'
Line'151'
Function'ocf_ensure_groups_cached'
Argsarray ( 0 => NULL, )


File'/opt/lampp/htdocs/ocportal/sources/ocf_members2.php'
Line'45'
Function'ocf_get_group_property'
ArgsNULL

'_name'


File'/opt/lampp/htdocs/ocportal/personalzone/pages/modules/myhome.php'
Line'183'
Function'ocf_show_member_box'
Args10

false

NULL

NULL

true

array ( 'Mutual friend' => 'Ja', )


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

File'/opt/lampp/htdocs/ocportal/sources/site.php'
Line'962'
Function'load_module_page'
Args'personalzone/pages/modules/myhome.php'

'myhome'


File'/opt/lampp/htdocs/ocportal/sources/site.php'
Line'745'
Function'request_page'
Args'myhome'

true


File'/opt/lampp/htdocs/ocportal/personalzone/index.php'
Line'51'
Function'do_site'
Args

Back to the top
 
Posted
Rating:
#61693
Avatar

Hi,

This should fix your problem (stack trace when member has a friend that is now deleted):

Attachment
sources/ocf_members2.php
» Download: ocf_members2.php (8 Kb, 94 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:
#61696
Avatar

Well-settled

Hi Chris,

Thank you so much for your fast response.

Yes, this file fixes the issue, I can now browse the myhome as Admin without issues.

Dirk
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: