Comment to 'Language Translation - Is this a mistake in Russian module ?'
  • How do I debug errors ?

    Error

    Database query error

    This happens when visiting the following pages with my custom language. /joined-events/administrator?owner=1

    Additional information - It works with English. There is no content in the site (so no events). And did not see any issue with other module related pages, only events has issue so far.

    I cant see anything in "Audit" and unfortunately I don't have access to database logs on my hosting.

    Is there any other way to print "error logs" with more debug information ?

    (Should I create a separate thread for this .. Since this is related to the translate module,

    • In the main config file of the installed UNA (inc/header.inc.php) you may find the following line:

      define('BX_DB_FULL_DEBUG_MODE', false); ///< upon db error - show detailed report (turn off in production mode)

      Just replace the false to the true variant and save it. Then visit the page with the DB error again - you will get the full code of the MySQL error. You may provide it here or PM me directly, let's review what might be wrong there.

    • Error
      Database query error
      Query:
      SELECT 0 `id`, 'സ്ഥിരസ്ഥിതി' `title` UNION (SELECT `l`.`id`, `l`.`title` FROM `bx_events_favorites_lists` `l` INNER JOIN `bx_events_favorites_track` `t` ON `t`.`list_id` = `l`.`id` WHERE `l`.`author_id` = :author GROUP BY `l`.`id`, `l`.`title` ORDER BY `l`.`date` DESC) LIMIT 0, 6
      
      
      Mysql error:
      Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'UNION'
      
      
      collation_connection:
      utf8mb4_unicode_ci
      
      Debug backtrace:
      ...
      ... < TRUNCATED BY ME> ...
      

      I can send you the debug trace if needed.

      BTW additional clue

      ## Getting error for this url
      /joined-events/administrator?owner=1
      
      
      ## No error for the following urls
      /events-calendar
      /events-joined
      /events-home
      ...
      other events url are all ok.
      
      • Wondering why there is a /joined-events/ and another /events-joined/. url .. ?

    • You need to review both mentioned tables:

      bx_events_favorites_lists` and  `bx_events_favorites_track
      

      and check the collation there. Both should have utf8mb4_unicode_ci variant. All tables of UNA should have this collation.