SOLVED: Problem with Greek characters in query

Status
Not open for further replies.

dimoss

Well-Known Member
Hi

I have a display field in a list in which I have put a link to another list to filter the results based on the passed data.
The problem is that when I select to query based on an element which contains greek characters, it returns nothing but it should return results.
However when I select to query based on an element which is numeric it return the rows correctly as it should be.

In both cases the filter shows nothing. It should saw the value as it does in an analogues case in Fabrik 3.2.x

Thanks
 
As per my response in Skype just now, afaik, Greek characters would have to be url encoded on a query string. And we won't do that in the display element, as we have no clue as to what text you are putting in there.

Maybe try using a calc element, and encode the text yourself.

[4:08:06 AM] Hugh Messenger: return "http://blah.blah/option=com_fabrik&blah&yourtable___elementname_to_filter_on=" . urlencode('{thistable___element_to_be_encoded}');

-- hugh
 
Hi Hugh

Tried as you pointed out but even if it encoded correctly again I get no results.
I used this in the calc element

Code:
$url = "http://pdan.alfaweb.gr/index.php?option=com_fabrik&view=list&listid=24&fab_adeies___eponymo_raw=".urlencode('{fab_dinamologio___eponymo_raw}');
return "<a href=$url>Link</a>";

It seems that somehow that the decoded is done on the fly because it's on the a href tag so the resulted link is with the Greek text which produce no results
 
The calc link is working in my Fabrik3.0 side with and without urlencode (with greek characters) and it is shown in the filter list.
Are you sure there's no typo in your element name?
Is the list filtered if you use the URL directly in the browser?
 
Hi Trester

The element syntax is ok. I can see also the greek characters in the filter list.
No, the list isn't filtered if I use the URL directly in the browser

However on the same list if I put the greek text on the filter and click the search button it will return the results as expected!!

Any ideas?
Thanks
 
Can you enable fabrikdebug and add &fabrikdebug=1 to your URL?
What is in list GetData?

Ah, and append &resetfilters=1 to your calc url.
 
Hi Troester

The link with resetfilters=1 gives this WHERE:
Code:
WHERE ( fab_adeies.domi = (SELECT per_id FROM pdan_users WHERE id = 274) ) AND ( `fab_adeies`.`eponymo` REGEXP LOWER('????????') ) ORDER BY `fab_adeies`.`id` DESC

which returns no results.

If I use the greek text directly on the filter and click serach I get this WHERE:
Code:
WHERE ( fab_adeies.domi = (SELECT per_id FROM pdan_users WHERE id = 274) ) AND ( `fab_adeies`.`eponymo` LIKE '%????????%' ) ORDER BY `fab_adeies`.`id` DESC

As you see the different in the query string is obvious.
 
Hi Troester

The calc element is like this after ypur change:

Code:
$url = "http://pdan.alfaweb.gr/index.php?option=com_fabrik&view=list&listid=24&fab_adeies___eponymo_raw[value][]=".urlencode('{fab_dinamologio___eponymo_raw}')&fab_adeies___eponymo_raw[condition]=CONTAINS;
return "<a href=$url&resetfilters=1>Link</a>";

But now I can't see the link to click.
 
Great if it's ok with the display element.

My link was wrong php, should have been
...=".urlencode('{fab_dinamologio___eponymo_raw}')."&fab_adeies___eponymo_raw[condition]=CONTAINS";
 
Just one small question.
When I use the numeric element which is a CDD element (not in the filter list) to make a url filtering I get the results as expected.
The problem is that the value is not shown in filter list as expected. See screenshot.

Screenshot.png

The produced link is:
index.php?option=com_fabrik&view=list&listid=24&fab_adeies___am_raw=50470&resetfilters=1

So it 50470 should be shown there.
I think it has to do with the fact that this element is CDD
Any idea?

Thanks again.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top