jDiction Forum
English => General Questions => Topic started by: Xaman on September 12, 2014, 07:22:44 pm
-
Hi,
After updating jDiction to the latest version (1.3.1) I am now getting an error message when I check a translated page.
These are the errors:
Notice: Undefined index: c in /libraries/jdiction/jdiction.php on line 521
Notice: Undefined index: c in /libraries/jdiction/jdiction.php on line 535
Notice: Undefined index: in /libraries/jdiction/jdiction.php on line 535
The page seems to show the translated information correctly.
-
You can reduce the error reporting level in joomla config.
I will also fix this notice.
-
Thanks :)
-
Hi,
Once again I updated my jReviews and S2 Framework and the problem returns and can't seem to fix it. Can you take a look again?
-
which error?
-
which error?
Sent you the link by message.
-
Were you able to see the error?
-
Yes but didn't remember what to change in symfony. Did I wrote a mail to you?
-
I found this message
// Add query KEY HINTS
if(isset($queryData['useKey'])) {
$table_alias = key($queryData['useKey']);
$key_hint = $queryData['useKey'][$table_alias];
if($table_alias == $this->name) {
//$useTable .= ' USE KEY ('.$key_hint.')';
}
elseif (isset($queryData['joins'][$table_alias])) {
$split_ON = explode('ON',$queryData['joins'][$table_alias]);
$split_ON[0] .= ' USE KEY ('.$key_hint.') ';
//$queryData['joins'][$table_alias] = implode('ON',$split_ON);
}
}
I disabled 2 lines but didn't remember the file. Its something in the s2 database framework.
-
Found it here: /components/com_s2framework/s2framework/libs/model/model.php
I removed that part and it's still giving the error.
-
I need the query that makes this problem...
maybe you activate the debugger and send me the logfile file it should be in /logs/jdiction.php or something like this.
-
I need the query that makes this problem...
maybe you activate the debugger and send me the logfile file it should be in /logs/jdiction.php or something like this.
Ok, how do I send you this file? To which email?
-
joomla@itronic.at
-
joomla@itronic.at
Sent.
-
In this file are 10000 translated queries... so I will not find the correct one ;-)
would you please change the following lines in /libraries/jdiction/database/jddatabase.php
line 428:
JLog::add('Query translated: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
} else {
JLog::add('Query not translated: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
//JLog::add('Backtrace: ' . @json_encode(debug_backtrace()), JLog::DEBUG, 'jdiction');
}
to:
if ($_REQUEST['debug'] == '2') JLog::add('Query translated: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
} else {
if ($_REQUEST['debug'] == '2') JLog::add('Query translated: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
//JLog::add('Backtrace: ' . @json_encode(debug_backtrace()), JLog::DEBUG, 'jdiction');
}
then delete the log file and open the page which cause the error with the parameter ?debug=2 attached at the end of the url.
and send the new file again.
-
Done and sent.
-
good the needed query is not in it ;-)
please add after line 386 ("translate = fale;") the following line:
if ($_REQUEST['debug'] == '2') JLog::add('Query: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
-
Ok, done and sent the new logs file.
-
please send me a superuser account.
and do you have the latest jdiction version installed?
because it seams that it translates "UPDATE" and "SHOW" queries but that shouldn't be done.
-
And I did't a misstake.
could you change the code to:
line 429 or so to:
} else {
if ($_REQUEST['debug'] == '2') JLog::add('Query not translated: ' . str_replace("\n", '\n', $this->sql), JLog::DEBUG, 'jdiction');
//JLog::add('Backtrace: ' . @json_encode(debug_backtrace()), JLog::DEBUG, 'jdiction');
}
because atm all queries are translated in the log and thats not true ;-)
-
Oh I think I found it
could you search for the string
# Removed directory from order by because it makes the query SLOW
# Instead we run a much faster query below to re-order the output array
and remove both lines, it seams that they are both in the same query and the parse could not handle comments.
-
Oh I think I found it
could you search for the string
# Removed directory from order by because it makes the query SLOW
# Instead we run a much faster query below to re-order the output array
and remove both lines, it seams that they are both in the same query and the parse could not handle comments.
Remove from where exactly?
-
Search for the Text in the joomla Installation. It must bin in component.
-
I don't know how to do that, I can only search for files names.
-
Do you have a local copy of your site?
if so you can do it locally.
Anyway the should be in /components/com_jReviews/ and then maybe in models directory.
alternative install the attached version.
delete the logfile.
open the url with ?jDictionDebug=2
and send me the logfile.
then I should be able to find the file faster.
btw. the new version fixes a utf8 url translation problem.
-
Ok, sent you the new logs file.
-
You have a good chance to find this in
/components/com_jreviews/jreviews/cms_compat/joomla/models/category.php near line 613 or 679
-
Finally, it worked! Thanks, seems they changed the location of these files, but now I know where is it. :D
Thanks again for all your help.
-
I will try to fix this problem in jdiction too but maybe not today ;-)