Review main Merged

18805[BUGFIX] Importing extensions from repository fails

Wouter Wolters CR +2 V +2 Normal +116 −27 updated 06/03/13, 20:49

Commit message

If importing the extension list from TER, an incoming XML extension
row has a field 'category' that contains either a string like
'plugin' or a category number.
The list is persisted to the 'extension' repository. In the
database, the category is stored as integer. There is a mapping
function in the extension model to get the integer category
index from given XML input. The method is faulty and returns
strings instead of an index if the given category is a string
itself. This results in database errors during insert.

The patch fixes the method, renames it along the way and adds
unit tests to document desired behavior.

Review

  • Code review CR +2
    • Christian Kuhn +2
  • Verified V +2
    • Christian Kuhn +2

Files 3

Review log 21

  1. Mr. Jenkins commented on patch set 1 03/17/13, 10:17

  2. Christian Kuhn commented on patch set 2 03/17/13, 10:17

    I would prefer that you didn't submit this -1 for now: The code is not clean. Furtermore, I'd suggest to add tests to this model method to show with the unit tests what this method returns under which circumstances.

    Extension.php:242

    catIndex is not used afterwards.
  3. Christian Kuhn commented on patch set 2 03/17/13, 10:17

    other than that, i've also seen db errors fetching the ext-list, but i didn't investigate the reason, yet. so, we should get a fix in quickly. if nobody takes a deeper look at the code and tests, i'll probably do it tomorrow or friday evening.
  4. Christian Futterlieb commented on patch set 2 V 0 03/17/13, 10:17

    @Wouter Wolters: Thanks for pushing the patch ;)
  5. Christian Futterlieb commented on patch set 2 03/17/13, 10:17

    No score @Christian Kuhn: Thanks for taking care of this problem. You are right, the code was not good ($catIndex not returned), I fixed that. @all: sorry, it seems that I messed up with pushing patch set 3.. It's now here: https://review.typo3.org/#/c/18891/
  6. Mr. Jenkins commented on patch set 2 03/17/13, 10:17

  7. Wouter Wolters uploaded patch set 2 03/17/13, 10:17

  8. Christian Kuhn commented on patch set 3 03/17/13, 10:17

    working on this now.
  9. Christian Kuhn uploaded patch set 4 03/17/13, 10:17

  10. Christian Kuhn uploaded patch set 5 03/17/13, 10:17

  11. Christian Kuhn uploaded patch set 6 03/17/13, 10:17

  12. Christian Kuhn uploaded patch set 7 03/17/13, 10:17

  13. Christian Kuhn commented on patch set 7 V 0 03/17/13, 10:17

    by team member; Looks good to me, approved i'm sure this works now. merged.
  14. Christian Kuhn merged patch set 8 03/17/13, 10:17

  15. Christian Futterlieb voted on patch set 3 V 0 03/17/13, 10:17

  16. Mr. Jenkins commented on patch set 3 03/17/13, 10:17

  17. Mr. Jenkins commented on patch set 4 03/17/13, 10:17

  18. Mr. Jenkins commented on patch set 6 03/17/13, 10:17

  19. Mr. Jenkins commented on patch set 7 03/17/13, 10:17

  20. Wouter Wolters uploaded patch set 3 03/17/13, 10:17

  21. Christian Futterlieb commented on patch set 8 03/17/13, 10:17

    @Christian Kuhn: much better like that, thank you for your work!