Review main Merged

1043[BUGFIX] Changing TCA via Tools->Configuration breaks TCA

Markus Klein CR +2 V +1 Easy +16 −2 updated 06/03/13, 20:49

Commit message

Changing the TCA (especially the columns-part of a table) via
Tools->Configuration breaks eg. the list module.
Tools->Configuration writes strings like
$GLOBALS['TCA']['tt_news']['columns']['image']['config']['allowed'] = 'jpg';
to typo3conf/extTables.php.

However, a call to loadTCA($table) call is not added before, so
the TCA array is incomplete. Furthermore if you set the columns part
in extTables.php any proceeding call to loadTCA will not work, since
'columns' is already defined.

Review

  • Code review CR +2
    • Stefan Galinski +2
    • Susi Moog +2
    • Steffen Gebert +1
  • Verified V +1
    • Steffen Gebert +1

Files 1

Review log 17

  1. Markus Klein commented on patch set 1 03/10/11, 19:52

    Also applies to 4.5
  2. Steffen Gebert uploaded patch set 2 03/10/11, 19:52

    index.php:279 Reply

    Two are better than one ;-) Dunno.. I just gave it a try and it, of course, added the line for a second time. But the changes in between stayed in place, so nothing went wrong by adding it a second time. Do you agree?

    index.php:286

    white spaces

    index.php:295

    $nl2br is wrong copy&paste

    index.php:295 Reply

    That's part of the change! If no loadTCA() call exists, it is added. Thus the change is not one line, but two (which are separated by LF).
  3. Steffen Gebert commented on patch set 2 03/10/11, 19:52

    Verified; Looks good to me, but someone else must approve I just updated the commit message to be more explanatory. No code changes in v2.
  4. Steffen Gebert commented on patch set 2 2 comments 03/10/11, 19:52

    I would prefer that you didn't submit this
  5. Markus Klein commented on patch set 3 03/10/11, 19:52

    Thanks for your corrections! You have to forgive me these mistakes, but I'm currently trying to get all this stuff running and I've simply overseen that. (Windows, Git, TortoiseGIT)
  6. Markus Klein commented on patch set 3 03/10/11, 19:52

    Sorry, bit I don't have the time at the moment. I also feel, that it's not necesary to make such sophisticated checks for such simple things. Don't forget: I anybody modifies the file manually he will only add the loadTCA once. So if the script afterwards add a second line this is no problem, since this is the maximum. The script will never add more than one line. And if the user is not blind or dumb he will not add more than 1 line as well. And don't forget. It may be possible that the requested TCA is already loaded by an ext_tables.php of an extension, which would be included before this extTables.php file is. So you can never avoid calling loadTCA more than once.
  7. Markus Klein commented on patch set 3 03/10/11, 19:52

    (1 inline comment)
  8. Susi Moog commented on patch set 3 03/10/11, 19:52

    (2 inline comments)
  9. Susi Moog commented on patch set 3 03/10/11, 19:52

    (2 inline comments)
  10. Susi Moog commented on patch set 3 03/10/11, 19:52

    Looks good to me, approved Ok, fine with it.
  11. Stefan Galinski commented on patch set 3 03/10/11, 19:52

    Looks good to me, approved
  12. Steffen Gebert commented on patch set 3 03/10/11, 19:52

    Verified; Looks good to me, but someone else must approve Fixed the $nl2br and the white-space issue
  13. Steffen Gebert commented on patch set 3 03/10/11, 19:52

    (2 inline comments)
  14. Steffen Gebert commented on patch set 3 03/10/11, 19:52

    Markus, can you provide an updated patch using a Regexp?
  15. Steffen Gebert uploaded patch set 3 03/10/11, 19:52

  16. Steffen Gebert commented on patch set 3 03/10/11, 19:52

    I agree with Markus. Susanne, are you fine with it?
  17. Andreas Wolf merged patch set 3 03/10/11, 19:52