TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692017-11-23T19:36:56ZTYPO3 Forge
Redmine TYPO3 Core - Bug #83074 (Accepted): The inSet (FIND_IN_SET) function generates invalid SQLhttp://forge.typo3.org/issues/830742017-11-23T19:36:56ZThanos no-lastname-givengatalf@yahoo.com
<p>When building a custom query with getQueryBuilderForTable using the The inSet function in ExpressionBuilder.php, the SQL is wrong because the function returns the pair of fieldName - value in reverse order.</p>
<p>The solution is to change the line 364 of ExpressionBuilder.php to<br /><pre><code class="php syntaxhl" data-language="php"><span class="k">return</span> <span class="nb">sprintf</span><span class="p">(</span>
<span class="s1">'FIND_IN_SET(%s, %s)'</span><span class="p">,</span>
<span class="nv">$this</span><span class="o">-></span><span class="n">connection</span><span class="o">-></span><span class="nf">quoteIdentifier</span><span class="p">(</span><span class="nv">$fieldName</span><span class="p">),</span>
<span class="nv">$value</span>
<span class="p">);</span>
</code></pre></p>
<p>or to use plain sql to the query builder: 'FIND_IN_SET(el.element_type, '. $allowedTypes . ')', but with the addition single quotes in the argument string : "'x,c,z'"</p> TYPO3 Core - Bug #16606 (Closed): indexed_search and utf transformationshttp://forge.typo3.org/issues/166062006-09-29T14:31:17ZThanos no-lastname-givengatalf@yahoo.com
<p>indexed_search version all. Trying to fix in 2.9.2</p>
<p>I have a site with 2 languages:<br />Default that is set to be greek and English. <br />The database is set to:<br />MySQL charset: (utf8)<br />MySQL connection collation: utf8_general_ci<br />And the typo3 database is: MyISAM utf8_general_ci</p>
<p>In the localconf the forceCharser is set to utf-8<br />$TYPO3_CONF_VARS['BE']['forceCharset']='utf-8';</p>
<p>When I search in greek (both with and without the L variable set) for a single Greek word the input field tx_indexedsearch[sword]" returns and renders the word correctly (in readable Greek) but the search is contacted for few repeating Greek letters. You can see this at attached picture. I know is Greek to you but the problem is obvious.</p>
<p>When I search for an English word then everything works fine.</p>
<p>Now when I search in English (with L=1) for an English word again everything goes fine. But when I query a Greek word then another strange issue appears. The search-for string is renders the Greek word correctly but the input field returns the word in the utf equivalent that looks something like the following</p>
<p>(㥀㥀㥀㥀㥀㥀㥀㥀㥀㥀㥀 )</p>
<p>I tried to fixed that by removing the htmlspecialchars() when the input field is created in php, but I don’t believe that this is the correct approach.</p>
<p>The problem is the way the page is rendered. If I use utf-8 as metaCharset, the problems are solved but then I don’t have an actual localization and realy i dont like it.</p>
<p>So something in the core of the typo that handles the utf transformations is not working correctly and I noticed that also when I have to submit something from the front end (for example a chat) or when I have a javascript alert the same problem with the Greek appears.</p>
<p>Because I am new in the TYPO3 philosophy and my PHP programming skills are not so good I would appreciated some help in this issue.</p>
<p>(issue imported from #M4303)</p>