English > Install & Configure jDiction
Installation not working
Harald Leithner:
I have no information about other translation extensions, I only know falang/joomfish which do the same as jdiction, maybe with a better query parser.
But your fix (with whitespace) should fix this problem. By the way thats a complex query that could easily fail by the query parser, do you have the modified query?
joebarrus:
Thanks to you I have now become an expert Php programmer LOL. Really, I hadn't installed any sophisticated tools and have simply been peppering my code with output statements. But in order to continue to debug I had to install Eclipse with XDebug and learn how to use them :) So thank you. :)
Anyway, below is both the entire original query and the modified one. Your modified query changed the FROM clause to FRO losing the M.
sql =
Select
form.id As form_id,
form.act_as_registration,
form.default_category,
form.registration_name_field,
form.registration_username_field,
form.registration_email_field,
form.registration_email_repeat_field,
form.`last_update`,
article.`article_id`,
form.`title_field`,
form.`create_articles`,
form.`name`,
form.`use_view_name_as_title`,
form.`protect_upload_directory`,
form.`reference_id`,
records.`record_id`,
form.`type`,
form.`published_only`,
form.`own_only`,
form.`own_only_fe`,
records.`last_update` As record_last_update,
article.`last_update` As article_last_update
From
#__contentbuilder_records As records
Left Join #__contentbuilder_forms As form On ( form.`type` = records.`type` And form.reference_id = records.reference_id )
Left Join #__contentbuilder_articles As article On ( form.`type` = records.`type` And form.reference_id = records.reference_id And article.form_id = form.id And article.record_id = records.record_id )
Left Join #__content As content On ( form.`type` = records.`type` And form.reference_id = records.reference_id And article.article_id = content.id And article.form_id = form.id And article.record_id = records.record_id )
Where
form.`published` = 1
And
form.create_articles = 1
And
form.`type` = records.`type`
And
form.reference_id = records.reference_id
And
(
(
article.form_id = form.id
And
article.record_id = records.record_id
And
article.article_id = content.id
And
( content.state = 1 Or content.state = 0 )
And
(
form.`last_update` > article.`last_update`
Or
records.`last_update` > article.`last_update`
)
)
Or
(
form.id Is Not Null And records.id Is Not Null And content.id Is Null And article.id Is Null
)
)
Limit 50
Modified query
sql =
Select
form.id As form_id,
form.act_as_registration,
form.default_category,
form.registration_name_field,
form.registration_username_field,
form.registration_email_field,
form.registration_email_repeat_field,
form.`last_update`,
article.`article_id`,
form.`title_field`,
form.`create_articles`,
form.`name`,
form.`use_view_name_as_title`,
form.`protect_upload_directory`,
form.`reference_id`,
records.`record_id`,
form.`type`,
form.`published_only`,
form.`own_only`,
form.`own_only_fe`,
records.`last_update` As record_last_update,
article.`last_update` As article_last_update
Fro, records.id AS JD_MAGIC_KEY_1, form.id AS JD_MAGIC_KEY_2, article.id AS JD_MAGIC_KEY_3, content.id AS JD_MAGIC_KEY_4 m
#__contentbuilder_records As records
Left Join #__contentbuilder_forms As form On ( form.`type` = records.`type` And form.reference_id = records.reference_id )
Left Join #__contentbuilder_articles As article On ( form.`type` = records.`type` And form.reference_id = records.reference_id And article.form_id = form.id And article.record_id = records.record_id )
Left Join #__content As content On ( form.`type` = records.`type` And form.reference_id = records.reference_id And article.article_id = content.id And article.form_id = form.id And article.record_id = records.record_id )
Where
form.`published` = 1
And
form.create_articles = 1
And
form.`type` = records.`type`
And
form.reference_id = records.reference_id
And
(
(
article.form_id = form.id
And
article.record_id = records.record_id
And
article.article_id = content.id
And
( content.state = 1 Or content.state = 0 )
And
(
form.`last_update` > article.`last_update`
Or
records.`last_update` > article.`last_update`
)
)
Or
(
form.id Is Not Null And records.id Is Not Null And content.id Is Null And article.id Is Null
)
)
Limit 50
I'll keep digging to see if I an find more. In the meantime I do have another issue showing itself but haven't had time to tackle that one yet. It seems that my links keep tacking on additional language parameters to the URL. Like http://localhost/es/es/index.php. Any clue why this might be happening? It might be my next debug project. :)
Thanks
joebarrus:
correction, after looking at the query again, it looks like your code inserted the additional select items into the middle of the word FROM
Harald Leithner:
I use a query parser to get the from position and this parser isn't always right...
If the query would use the Jdatabasequery class it there would be no problem... but so its really hard to prevent this error.
Mostly because I missed 2 deadlines and have not much time atm for jdiction... especially because 3rd party components are still not supported...
the other problem does normally happen if the access level of the content language is wrong... but maybe not in this case.
joebarrus:
yeah I found where it was breaking. I guess I'm going to have to hack his code to make it work and suggest he use the solution you suggest. I have deadlines too and need to get this done. :) But if I can fix it as I go, with a little help from you, I can get it to work. I'll keep you informed of any other issues I see.
I may get back to you on the second issue if it persists, but it may be a result of this issue. I haven't seen it come back during my debug sessions today. I changed the position number in the debugger and everything would load fine after that. But you know that may simply mean that I just unblocked one door just so I can see another blocked door :)
Thanks!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version