Project

General

Profile

Actions

Task #59291

closed

`fieldname` from `sys_category_record_mm` has no default value after upgrading to Typo3 6.2

Added by Kurt Gusbeth over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
Category:
Categorization API
Target version:
-
Start date:
2014-06-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

I am using makeCategorizable since Typo3 version 6.0 like this:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable(
    $_EXTKEY,
    'tx_camaliga_domain_model_content',
    $fieldName = 'categories',
    $options = array()
);

and:
CREATE TABLE tx_camaliga_domain_model_content (
    ...
    categories int(11) DEFAULT '0' NOT NULL,
    ...
);

The problem: till Typo3 6.2 the field `fieldname` of sys_category_record_mm dinĀ“t exist.
Since Typo3 6.2 it contains the value 'categories' when I save an element, but for old entries it contains nothing.
The problem: all entries with an empty `fieldname` in sys_category_record_mm are ignored in the backend. Thats bad.
There should be an Updater that sets the `fieldname` of sys_category_record_mm when updating from Typo3 6.0 or 6.1 to Typo3 6.2.
Do you have a suggestion how to fix this problem?

Actions #1

Updated by Francois Suter over 10 years ago

  • Project changed from 1107 to TYPO3 Core
Actions #2

Updated by Francois Suter over 10 years ago

  • Category set to Categorization API
  • TYPO3 Version set to 6.2

This was indeed forgotten. There should have been an upgrade wizard for this. But it's related to the TYPO3 CMS Core, not the coding guidelines.

As a quick fix, you can just fill the "fieldname" field for all entries with "categories" with a SQL statement, since the categories relation field was called "categories" by default all the time before 6.2 (it was not possible to change its name before 6.2).

Actions #3

Updated by Kurt Gusbeth over 10 years ago

OK, I have written an update-script for my extension.

Actions #4

Updated by Riccardo De Contardi over 9 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Kurt Gusbeth

Could you please tell us if this can be closed? Thank you!

Actions #5

Updated by Kurt Gusbeth over 9 years ago

Yes, you can close this bug.

Actions #6

Updated by Riccardo De Contardi over 9 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF