jDiction Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

jDiction 2.2.0 released. http://jdiction.org/downloads

Author Topic: 3rd party translation  (Read 7058 times)

opms.org

  • Newbie
  • *
  • Posts: 2
    • View Profile
3rd party translation
« on: April 04, 2013, 01:31:16 pm »

Hi everyone,

 I have installed the jdiction 0.9 on my joomla 2.5.9 and everything works perfect.Thanks for the amazing job!

Now i want to translate certain 3rd party component. It says that "The integration into 3rd party components is simple, it only needs a XML File with some metadata, this file could be created easily." but i don't know exactly what or where (or how :) ) to do it and I cannot found any documentation for that.
Can someone please give me some pointers?

To be specific my problem is on the registration, login and profile pages of community builder. When I try to access them with "greek" language it shows up an error message

ERROR 5
cannot calculate position of ordering within BY `ordering`.

Thanks.
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1661
    • View Profile
Re: 3rd party translation
« Reply #1 on: April 04, 2013, 02:16:25 pm »

the sql parser has a problem with the sql query... atm I can't really help you with this.

If you know how to get the sql query I can look at it.
Logged
Joomla 3.9.x Release Lead
Vote at JED

opms.org

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: 3rd party translation
« Reply #2 on: April 05, 2013, 11:51:05 am »

I have attached the mysql.log where i have kept only the query's that happens when the problem occurs.
Unfortunately I have no idea witch of those is the false one since it doesn't logs the answers.
But i believe its after line 33 where "lang_id" appears.

Can you look into the matter?

Again thanks a LOT for your help.

Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1661
    • View Profile
Re: 3rd party translation
« Reply #3 on: April 05, 2013, 12:13:14 pm »

this log comes from the mysql query log file correct?

the query will never be executed so you need to modify the jdiction core and print the queries manualy, I haven't a good debug method for this atm.
Logged
Joomla 3.9.x Release Lead
Vote at JED

nkt

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Flantic
Re: 3rd party translation
« Reply #4 on: April 30, 2014, 04:18:38 pm »

Hi all,

I have the same problem and I found the SQL query:
Code: [Select]
SELECT DISTINCT ue.*, u.*, '' AS 'NA' FROM #__users u JOIN #__user_usergroup_map g ON g.`user_id` = u.`id` JOIN #__comprofiler ue ON ue.`id` = u.`id` WHERE u.block = 0 AND ue.approved = 1 AND ue.confirmed = 1 AND ue.banned = 0 AND g.group_id IN ( 6, 2, 3, 4, 5) ORDER BY `name` ASC
The code is executed at line 346 of cb.lists.php in SITE_URL/administrator/components/com_comprofiler/library/cb.

I'll try to fix the problem, but if you know how to solve it immediately please let me know!

Official error: UnableToCalculatePositionException: cannot calculate position of name within BY `name` ASC

Further more if I remove
Code: [Select]
ORDER BY `name` ASC the problem is solved
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1661
    • View Profile
Re: 3rd party translation
« Reply #5 on: April 30, 2014, 05:51:09 pm »

remove the quote for
Code: [Select]
name
Logged
Joomla 3.9.x Release Lead
Vote at JED

nkt

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Flantic
Re: 3rd party translation
« Reply #6 on: April 30, 2014, 06:08:58 pm »

Thank you Harald! I just figured that out, because I traced the problem till deep in the parser. :'(

Explanation for others: you're not allowed to have ` around non-operators. Want to know more, check line 121 and 122 of position-calculator.php in SITE_ROOT/libraries/jdiction/database/parser/classes

I let you know where to edit in Community Builder
Logged

nkt

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Flantic
Re: 3rd party translation
« Reply #7 on: April 30, 2014, 06:30:17 pm »

Found it, you need to comment in Community builder admin.comprofiler.html.php located in SITE_ROOT/administrator/components/com_comprofiler
Start: line 868
Code: [Select]
//if ( substr( $sortfield->name, -1, 1 ) != ')' ) {
// $sortfieldName = '`' . $sortfield->name . '`';
//} else {
$sortfieldName = $sortfield->name;
//}
Start: line 828
Code: [Select]
//if ( substr( $sortpart['field'], -1, 1 ) != ')' ) {
// $sortfiNam = '`' . $sortpart['field'] . '`';
//} else {
$sortfiNam = $sortpart['field'];
//}
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1661
    • View Profile
Re: 3rd party translation
« Reply #8 on: April 30, 2014, 11:23:45 pm »

Would you please test version 1.1.9.2, I replaced the sql parser with a new version.

I think that would solve the problem.
Logged
Joomla 3.9.x Release Lead
Vote at JED

nkt

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Flantic
Re: 3rd party translation
« Reply #9 on: April 30, 2014, 11:28:14 pm »

Hi Harald,

It get the following message: 
Code: [Select]
Fatal error: Class 'MySqlParser' not found in SITE_ROOT\libraries\jdiction\database\database\mysqli.php on line 122
Logged

Harald Leithner

  • Administrator
  • Hero Member
  • *****
  • Posts: 1661
    • View Profile
Re: 3rd party translation
« Reply #10 on: May 01, 2014, 11:00:16 am »

The something went wrong while you updated, because the mysqli.php should try to load \PHPSQLParser\PHPSQLParser() and not longer the MySqlParser class.
Logged
Joomla 3.9.x Release Lead
Vote at JED