Cascading dropdown auto-complete bug (SQL query error)

herve06

Member
Hello,

I have a bug in the cascadingDropDown plugin form in autocomplete.

Sometimes it works in dropdown but not in autocomplete.

After analyses logs, the error is in the SQL query called by ajax.
The result of the ajax query is (Error 501 ...):
Code:
Unknown column 't_adorga.ADORNAME' in 'where clause'
SQL=SELECT DISTINCT(`t_adorga_0`.`adorcode`) AS value, `t_adorga_0`.`ADORNAME`AS text
FROM `t_adorga` AS `t_adorga_0`
WHERE ORADCNCODEX IN ('FR')
      AND t_adorga.`ADORNAME` LIKE '%c%' ORDER BY text ASC

As you can see in the like it do not use the alias but the name of the table :/ (t_adorga whereas t_adorga_0)

PS: More information: http://pastebin.com/3iBKvTvu
PPS: I use joomla2.5 so Fabrik3 git updated on 1st August
 
no ftp!? How do you add files then?
Sorry without FTP its going to be impossible to test what is going on
 
No, It's a local web server in our Office. If you want I can give you a SVN account on it, but there is a problem on your website, I cannot login (but I'm connected to the forum only), when I try acces http://fabrikar.com/you/my-sites it ask me connection, but when I try it display: joomla_int Session Create: You cannot access the private section of this site.
 
Ok, I've corrected the bug:
FIX:

File: /plugins/fabrik_element/cascadingdropdown/cascadingdropdown.php
Line 817:

if (!empty($this->_autocomplete_where))
{
$where .= $where !== '' ? ' AND ' . $this->_autocomplete_where : $this->_autocomplete_where;
$where = str_replace($join->table_join, $join->table_join_alias, $where);
}
 
I'm getting the "have you installed the Fabrik system plugin?" on that page.

Line 817? In my copy of the 3.0 code that's at line 863.

https://github.com/Fabrik/fabrik/bl...ement/cascadingdropdown/cascadingdropdown.php

... so it looks like you have a pretty old version of 3.0.

I've attempted a fix with this commit:

https://github.com/Fabrik/fabrik/commit/45df772bc636c4311ebd72e01daf7281e738583d

... but haven't tested it, as I don't currently have a test case for an autocomplete join/CDD setup, and we've pretty much officially ended development for 3.0, except for security related bug fixes, now that J! 2.5 is officially end-of-lifed.

You'll need to do a full github update. Suggest you do a full backup of your site first.

-- hugh
 
Hi
I have done an update from gethub, although still have this error. I have attached the php file from database join, where do I add the code you posted in the second link. Sorry I am new to php and joomla.
 

Attachments

  • databasejoin.txt
    99.3 KB · Views: 505
Seems your txt file is showing the recent Fabrik3.3 code.
If your are running Fabrik3.0.9 on Joomla2.5 your have to update from GitHub joomla2.5 branch
 
You are posting in the Fabrik3.0/Joomla2.5 forum and Hugh's fix/commit is in the Joomla2.5 branch.

So can you please post in the correct forum and mention your exact Joomla and Fabrik versions, error message etc.
 
Indeed, I can only go by where the question is posted. if it's posted in a forum marked "Fabrik 3.0 for J! 2.5", then I assume that's the version you are running.

If you are running Fabrik >= 3.1 on J! 3.x, can you post in that forum?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top