• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Problem with umlauts and tag element search list (still not working)

JTe

New Member
It looks like umlauts (characters like ä ö and in fact other utf characters too) do not work with the tag element search list.

If I have a tag element and when I start typing a word like "sähkö" I will get the following debugging output
(the word I typed is sent with url encoding the utf8 characters):
Code:
?option=com_fabrik&view=list&listid=14&format=tags&elID=151&like=s%C3%A4hk%C3%B6

In the above case the matching string for tag search seems to be "shk", so the url encoded characters are just dropped off.

However the response is coming without the url encoding (if I set the minimum length for a matching string to 1 and the match is against "s"):
Code:
option: com_fabrik
view: list
listid: 14
format: tags
elID: 151
like: sähkö

I guess the problem occurs when searching a tag and a url encoded string is used to match the tag. Would it be possible to "urldecode" this search string before trying to match it to the tag?
 
What do you mean with "tag element search list"?
In list filter (type autocomplete) and in the tag element itself umlaute are working.
 
I mean this. So when I enter a tag in a input form with umlauts and I am typing it the typed text does not match to the tag already in the tags db:
Screenshot1.png

If I however type a matching part of the word without umlauts I will get a match:
Screenshot2.png

Now that the tags element has loaded the matching tags, I can type the word with umlauts and I have a match:
Screenshot3.png

What I did debug is when the matching tags are fetched by the javascript, it is with this:
Code:
&format=tags&elID=151&like=s%C3%A4hk%C3%B6
(tags element, elelement id 151, and the search key s%C3%A4hk%C3%B6, which is urlencoded)

If I search the matching part without umlauts, like "veturi", I have:
Code:
&format=tags&elID=151&like=veturi

The problem is not the matching in the tag-element javascript part when the search list is already loaded. The problem is to get the correct search list from the tags db.
 
Ok, I find a solution. The problem was probably related to utf8 characters cut away in the file com_fabrik/views/list/view.tags.php on line 84:

Code:
if (stristr($d->text, $input->get('like')))

If I add the JInput "STRING" filter to that line:

Code:
if (stristr($d->text, $input->get('like','','STRING')))

Everything works fine!

I guess that should be also changed in git...
 
It seems that the above pull request is not included in the newest version of Fabrik (3.9.2), as after the update I have the problem again.

I guess the problem has something to do with the mysql collation in use. I think the reason is that JInput is defaulting to filter 'CMD', but to be absolutely safe with strings we should use filter 'STRING'.

Could somebody please fix this in the code.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top