TYPO3 Forge: Issueshttp://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692014-07-22T22:21:29ZTYPO3 Forge
Redmine TYPO3 Core - Task #60479 (Closed): Micro optimizations in SqlParserhttp://forge.typo3.org/issues/604792014-07-22T22:21:29ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Introduced a few optimizations in the SqlParser classes of "core" and "dbal". I had the problem that many queries (e.g. updating the extension list) takes a lot more time when using dbal and adodb (oci8 driver in this case) so I tried to get a few microseconds.</p>
Optimizations made:
<ul>
<li>Changed some regular expressions (see attached benchmark file)</li>
<li>Strict comparison</li>
<li>Put often used variable manipulation into a new method</li>
<li>Definition of $comparatorPatterns was in a while() without any modification on it, so made it a protected member</li>
</ul> TYPO3 Core - Bug #57723 (Closed): PackageStates.php may cannot be written due to invalid pathhttp://forge.typo3.org/issues/577232014-04-07T20:41:52ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hi there,</p>
<p>I tried to do a fresh install of TYPO3 6.2, but it failed in the second step due to following error:<br /><pre>
Uncaught exception 'TYPO3\CMS\Core\Package\Exception\PackageStatesUnavailableException' with message 'The PackageStates.php file is either corrupt or unavailable.' in typo3_sources/typo3_src-6.2.0/typo3/sysext/core/Classes/Package/PackageManager.php:283
Stack trace:
#0 typo3_sources/typo3_src-6.2.0/typo3/sysext/core/Classes/Package/PackageManager.php(130): TYPO3\CMS\Core\Package\PackageManager->loadPackageStates()
#1 typo3_src-6.2.0/typo3/sysext/core/Classes/Core/Bootstrap.php(322): TYPO3\CMS\Core\Package\PackageManager->initialize(Object(TYPO3\CMS\Core\Core\Bootstrap))
#2 typo3_sources/typo3_src-6.2.0/typo3/sysext/core/Classes/Core/Bootstrap.php(288): TYPO3\CMS\Core\Core\Bootstrap->initializePackageManagement('TYPO3\CMS\Core\...')
#3 typo3_sources/typo3_src-6.2.0/typo3/sysext/install/Classes/Service/ClearCacheService.php(64): TYPO3\CMS\Core\Core\Bootstrap->reinitializeCla in typo3_sources/typo3_src-6.2.0/typo3/sysext/core/Classes/Package/PackageManager.php on line 283
</pre></p>
<p>After digging around I found out that the PackageStates.php is tried to be written into /var/www/virtual/XXXX/html/typo3conf/../../typo3conf/PackageStates.php. This obviously fails because the path would be resolved to /var/www/virtual/XXXX/typo3conf which is outside the DocumentRoot.</p>
<p>My symlinks are configured like this:<br /><pre>
index.php -> typo3_src/index.php
typo3 -> typo3_src/typo3
typo3_src -> ../typo3_sources/typo3_src-6.2.0
</pre></p>
<p>Symlinking typo3conf in my DocumentRoot workarounds the problem:<br /><pre>
/var/www/virtual/XXXX/typo3conf -> /var/www/virtual/XXXX/html/typo3conf
</pre></p>
<p>My TYPO3 is hosted at <a class="external" href="https://uberspace.de">https://uberspace.de</a>, a shared hosting platform. The provider uses CentOS, php-fcgi and Apache with suEXEC.</p> TYPO3 Core - Bug #56766 (Closed): Install tool forces mysqlihttp://forge.typo3.org/issues/567662014-03-11T15:23:58ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello,</p>
<p>after applying <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: DatabaseConnection must be initialized (Closed)" href="http://forge.typo3.org/issues/56763">#56763</a>, the install tool forces the use of mysqli instead of oci8 as defined in LocalConfiguration. I guess it's a regression from <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: DBAL needs migration MySQL to MySQLi as well (Closed)" href="http://forge.typo3.org/issues/50752">#50752</a>.</p>
<p>Stack trace:<br /><pre>
Warning: mysqli::real_connect(): MySQL server has gone away in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php on line 3044
Warning: mysqli::real_connect(): Error while reading greeting packet. PID=18902 in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php on line 3044
Warning: mysqli::real_connect(): (HY000/2006): MySQL server has gone away in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php on line 3044
Fatal error: Uncaught exception 'RuntimeException' with message 'TYPO3 Fatal Error: The current username, password or host was not accepted when the connection to the database was attempted to be established!' in typo3/sysext/core/Classes/Database/DatabaseConnection.php:1580
Stack trace:
#0 typo3/sysext/install/Classes/Controller/Action/AbstractAction.php(256): TYPO3\CMS\Core\Database\DatabaseConnection->connectDB()
#1 typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php(91): TYPO3\CMS\Install\Controller\Action\AbstractAction->getDatabase()
#2 typo3/sysext/install/Classes/Controller/StepController.php(120): TYPO3\CMS\Install\Controller\Action\Step\DatabaseData->needsExecution()
#3 [corrupted] in typo3/sysext/core/Classes/Database/DatabaseConnection.php on line 1580
</pre></p> TYPO3 Core - Task #56761 (Closed): Upgrade ADOdb to latest versionhttp://forge.typo3.org/issues/567612014-03-11T14:07:42ZAndreas Fernandeza.fernandez@scripting-base.de
<p>ADOdb should be upgraded from 5.14 (used in adodb, needed by dbal) to the latest version (currently 5.18)</p>
<ul>
<li>fixed SQL injections</li>
<li>PHP 5.4 compatibility</li>
<li>several bugfixes and improvements</li>
</ul>
<p>Please consult <a class="external" href="http://phplens.com/adodb/change.log.html">http://phplens.com/adodb/change.log.html</a></p> TYPO3 Core - Bug #56499 (Closed): SqlParser: Subselect in WHERE not suportedhttp://forge.typo3.org/issues/564992014-03-03T16:21:30ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello TYPO3 team,</p>
<p>updating the extension list after deleting "1.extensions.xml.gz" and "1.mirrors.xml.gz" results in a catchable fatal error:</p>
<blockquote>
<p>PHP Catchable Fatal Error: Argument 1 passed to TYPO3\CMS\Dbal\Database\DatabaseConnection::_quoteWhereClause() must be an array, string given, called in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php on line 1214 and defined in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php line 1702</p>
</blockquote>
<p>After some investigation I found out that the error is triggered by the following part:<br /><pre>
integer_version=(SELECT MAX("integer_version") FROM "tx_extensionmanager_domain_model_extension" "b" WHERE "b"."repository" = 1 AND "a"."extension_key" = "b"."extension_key") AND repository=1
</pre><br /> in typo3/sysext/core/Classes/Database/SqlParser.php in line 1210.</p>
<p>The used regex does not support any subselect in WHERE clause, so the following parse error is triggered:</p>
<blockquote>
<p>No operator, but parsing not finished in parseWhereClause()</p>
</blockquote> TYPO3 Core - Bug #56390 (Closed): Could not parse where clausehttp://forge.typo3.org/issues/563902014-02-27T16:09:18ZAndreas Fernandeza.fernandez@scripting-base.de
<p>The Upgrade Wizard in Install Tool crashes with "Could not parse where clause" using DBAL.<br />DBAL's DatabaseConnection.php has a method "quoteWhereClause()" which calls "parseWhereClause()" in core/Classes/Database/SqlParser.</p>
<p>The method "nextPart" returns an empty string parsing the part <br /><pre>CAST(CAST(media AS DECIMAL) AS CHAR) <> media OR (CType = 'uploads' AND select_key != '')</pre> because it cannot find a field using the following regular expression:</p>
<pre>
^([[:alnum:]._]+)([[:space:]]+|&|\+|-|\*|\/|%|<=|>=|<|>|=|!=|IS)
</pre> TYPO3 Core - Bug #56349 (Closed): Respect table mapping on cachinghttp://forge.typo3.org/issues/563492014-02-26T16:59:06ZAndreas Fernandeza.fernandez@scripting-base.de
<p>The method analyzeFields() of DBAL's ConnectionManager caches the table structure. The caches always use the real table name, ignoring any mapping, which results in a RuntimeException:</p>
<blockquote>
<p>Could not update BLOB >>>> no WHERE clause found!</p>
</blockquote> TYPO3 Core - Feature #56343 (Closed): Allow mapping of key nameshttp://forge.typo3.org/issues/563432014-02-26T15:08:28ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello TYPO3 team,</p>
<p>DBAL allows to map tables and fields to aliases. Oracle has a limit of 30 characters in identifiers.<br />The identifier in this case is table + key, for example:</p>
<p>Table: sys_category_record_mm<br />Key: uid_foreign_tablenames<br />Identifier: sys_category_record_mm_uid_foreign_tablenames</p>
Obviously, the identifier exceeds the character limit. It would be nice to allow mapping the keys, otherwise I'm forced to
<ul>
<li>shrink the table name to 7 characters</li>
<li>patch the keys names in sysext/core/ext_tables.sql</li>
</ul> TYPO3 Core - Bug #56306 (Closed): quoteFieldNames() results an empty stringhttp://forge.typo3.org/issues/563062014-02-26T12:31:57ZAndreas Fernandeza.fernandez@scripting-base.de
<p>DBAL's DatabaseConnection.php uses the method quoteFieldNames() which returns an empty string in all cases. But, the method INSERTquery() uses the result of quoteFieldNames() to set keys of an array.</p>
<p>The problem here is, that DBAL's SqlParser.php tries to access $GLOBALS['TYPO3_DB'] which is not set.</p> TYPO3 Core - Feature #56258 (Closed): Automatic table/field mapping with Oraclehttp://forge.typo3.org/issues/562582014-02-25T10:36:36ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello TYPO3 team,</p>
<p>Oracle DB has a 30 character limit on table names, fields, indices etc. In LocalConfiguration.php I'm able to add mappings to workaround this problem. But even on core tables and fields I'm forced to create mappings, which is imho not feasible.</p>
There should be an automatic mapping on tables and fields, if:
<ul>
<li>length > 30 chars</li>
<li>not already configured in LocalConfiguration.php</li>
</ul>
<p>A possible pattern for a mapping could be:<br />Split by underscore and use the first three characters of each part. For example, the table "extensionmanager_domain_model_extension" would be mapped as "ext_dom_mod_ext".</p> TYPO3 Core - Bug #56257 (Closed): Call to a member function qstr() on a non-objecthttp://forge.typo3.org/issues/562572014-02-25T09:26:16ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello TYPO3 team,</p>
<p>installing TYPO3 with an Oracle database (oci8) fails on certain points. After passing the credentials, the installation crashes with a fatal error:</p>
<blockquote>
<p>PHP Fatal error: Call to a member function qstr() on a non-object in typo3/sysext/dbal/Classes/Database/DatabaseConnection.php on line 1882</p>
</blockquote>
<p>At this point, $this->handlerInstance is an empty array. The property is filled in the method handler_init($handlerKey). As far as I understood the code, $cfgArray is a merged array from ['DB'] and ['EXTCONF']['dbal']['handlerCfg']['_DEFAULT'] as defined in LocalConfiguration.php. But under certain circumstances, the merge is not complete and the following condition matches, resulting an empty array:<br /><pre>
if (!$cfgArray['config']['database']) {
// Configuration is incomplete
return;
}
</pre></p>
<p>When putting the DB configuration into the dbal configuration, the bug does not occur:<br /><pre>
'EXTCONF' => array(
'dbal' => array(
'handlerCfg' => array(
'_DEFAULT' => array(
'config' => array(
'driver' => 'oci8',
'driverOptions' => array(
'connectSID' => '',
),
'database' => 'typo3',
'host' => 'localhost:1521',
'password' => '*****',
'username' => 'johndoe',
),
'type' => 'adodb',
),
),
),
),
</pre></p> TYPO3 Core - Bug #56253 (Closed): Fatal Error at "Installing TYPO3 CMS"http://forge.typo3.org/issues/562532014-02-25T09:03:11ZAndreas Fernandeza.fernandez@scripting-base.de
<p>Hello TYPO3 team,</p>
<p>installing TYPO3 with an Oracle database (oci8) fails on certain points. After selecting oci8 and passing the credentials, the install wizard crashes with a fatal error:</p>
<blockquote>
<p>PHP Fatal error: Cannot use object of type TYPO3\CMS\Core\Configuration\ConfigurationManager as array in typo3/sysext/install/Classes/Controller/Action/Step/DatabaseConnect.php on line 93</p>
</blockquote>
<p>Please see the attached patch file to fix the bug.</p>