Project

General

Profile

Actions

Bug #32427

closed

No datatype in "Remove unused fields" section

Added by Boris Gulay almost 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2011-12-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In Install Tool, Database Analyser, Compare, section Remove unused fields I see the following SQL scripts:

(EXT) ALTER TABLE be_groups CHANGE tx_dam_mountpoints zzz_deleted_tx_dam_mountpoints (255) default '';
(EXT) ALTER TABLE be_users CHANGE tx_t3blog_avatar zzz_deleted_tx_t3blog_avatar (60) default '\'\'::character varying';

As you can see there is no datatype for fields. If I try to run something from this section I receive the error:

Oops, an error occured!
ERROR: Query could not be parsed: "SQL engine parse ERROR: Field type unknown in parseFieldDef()!: near "(255) default '' "". Query: "ALTER TABLE be_groups CHANGE tx_dam_mountpoints zzz_deleted_tx_dam_mountpoints (255) default '';"

I have traced the calls down till admin_get_fields function. I found that it returns incorrect field type in "Type" key, but "type" key (from lover case letter) contains correct value.
This function calls MetaType function for each field in a table passing value from "type" array member and table name.
MetaType function, in case ADODB is used, performs SQL query "SELECT * FROM <table> LIMIT 1" and calls MetaType function from returned object. BUT ONLY if table name exists in cache_fieldType class variable. Existence is checked by in_array($table, $this->cache_fieldType).

BUT!!! $this->cache_fieldType is not an array, it's a dictionary! So, in_array will always return false. array_key_exists must be used instead!

Please, find patch attached.


Files

dbal.patch (674 Bytes) dbal.patch Boris Gulay, 2011-12-09 17:12
Actions #1

Updated by Markus Klein almost 13 years ago

Hi Boris!

Thanks for the patch.
Do you mind pushing it to our review system?
(http://wiki.typo3.org/Contribution_Walkthrough)

Actions #2

Updated by Boris Gulay almost 13 years ago

Markus Klein wrote:

Do you mind pushing it to our review system?
(http://wiki.typo3.org/Contribution_Walkthrough)

Sure. I will do it at monday, ok?
I was sure the system is only for the core. Not for extesions.

Actions #3

Updated by Markus Klein almost 13 years ago

This is correct in general, but that is a system extension, which is additionally maintained in a submodule.
So make sure you configured your GIT properly. (As outlined in the Wiki.)

Actions #4

Updated by Gerrit Code Review almost 13 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7215

Actions #5

Updated by Boris Gulay almost 13 years ago

Markus Klein wrote:

Hi Boris!

Thanks for the patch.
Do you mind pushing it to our review system?
(http://wiki.typo3.org/Contribution_Walkthrough)

Done. Gerrit ID: 7215.

Actions #6

Updated by Xavier Perseguers almost 13 years ago

  • Status changed from New to Under Review
Actions #7

Updated by Michael Stucki almost 11 years ago

  • Category deleted (PostgreSQL)
Actions #8

Updated by Michael Stucki almost 11 years ago

  • Project changed from 329 to TYPO3 Core
  • Target version deleted (1.2.3 (TYPO3 4.5.x))
Actions #9

Updated by Michael Stucki almost 11 years ago

  • Category set to 999
Actions #10

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Needs Feedback
  • TYPO3 Version set to 6.2
  • Is Regression set to No

Hi,

Is this still an issue in newer versions of TYPO3 CMS (6.2.9)?
If yes, can you provide a newer patch against master by using Gerrit? http://wiki.typo3.org/CWT

Actions #11

Updated by Alexander Opitz over 9 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF