Review main Abandoned

46679[TASK] Add UpdateWizard for RTE to always add P-tags

Benni Mack CR 0 V 0 Hard +838 −0 updated 10/20/17, 11:46

Commit message

Checks all TCA fields and types if they are RTE fields. Flexform fields
are always included because for these the DataStructure needs to be
parsed.
The fields are transformed to include P-tags. Inside flexform data
sections are supported in the first level.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 3435

Show 10 earlier messages
  1. Benni Mack uploaded patch set 1 02/15/16, 17:25

  2. Phat Hoang rebased onto patch set 2 04/12/16, 09:53

  3. Phat Hoang uploaded patch set 3 04/14/16, 10:38

  4. Phat Hoang uploaded patch set 4 04/14/16, 15:49

  5. Phat Hoang uploaded patch set 5 04/14/16, 16:02

  6. Phat Hoang commented on patch set 5 04/14/16, 16:05

    Accidentally removed changes in typo3/sysext/core/Classes/Html/RteHtmlParser.php in previous patch so brought them back.
  7. Phat Hoang uploaded patch set 6 04/14/16, 19:37

  8. Phat Hoang commented on patch set 6 04/14/16, 19:45

    Removed '_all' from findAllRteFields and applied columnsOverrides to get the final fieldConfiguration RTE only possible in type 'flex' and 'text' Moved back from functional to unit test Added more tests (some are yet to be implemented)
  9. Phat Hoang uploaded patch set 7 04/15/16, 15:23

  10. Phat Hoang uploaded patch set 8 04/15/16, 20:21

  1. Phat Hoang commented on patch set 8 04/15/16, 20:28

    Removed parsing of flexform xml in findAllRteFields, no need to deal with FILE:path/to/xml and sheets that point to other sheets.
  2. Phat Hoang uploaded patch set 9 04/15/16, 20:29

  3. Phat Hoang commented on patch set 9 04/15/16, 20:29

    Updated a comment
  4. Benni Mack uploaded patch set 10 04/20/16, 09:20

  5. Jigal van Hemert uploaded patch set 11 05/01/16, 09:23

  6. Jigal van Hemert uploaded patch set 12 05/01/16, 16:36

  7. Nicole Hummel commented on patch set 12 CR -1 05/02/16, 13:04

    I would prefer to mark the functions in RichTextFieldsUpdate as protected and use an accessible mock for testing or provide a mocked database connection with the strings to test.

    RichTextFieldsUpdate.php:23

    new lines?

    RichTextFieldsUpdate.php:54

    and

    RichTextFieldsUpdate.php:63

    !empty()

    RichTextFieldsUpdate.php:84

    empty($tcaFields) && is_array($tcaFields)

    RichTextFieldsUpdate.php:86

    I would prefer to use $this->markWizardAsDone()

    RichTextFieldsUpdate.php:91

    Would it be an option to set the in checkForUpdate() already?

    RichTextFieldsUpdate.php:99

    !empty($GLOBALS['TCA'][$table]['ctrl']['type']) to prevent wrong access

    RichTextFieldsUpdate.php:108

    Should this be converted to doctrine?

    RichTextFieldsUpdate.php:127

    !empty()

    RichTextFieldsUpdate.php:130

    enable libxml_disable_entity_loader() before?

    RichTextFieldsUpdate.php:141

    !empty()

    RichTextFieldsUpdate.php:143

    IMHO this check should go into setParagraphTags()

    RichTextFieldsUpdate.php:152

    !empty()

    RichTextFieldsUpdate.php:152

    s.a.

    RichTextFieldsUpdate.php:163

    !empty()

    RichTextFieldsUpdate.php:164

    doctrine?

    RichTextFieldsUpdate.php:174

    s.a.

    RichTextFieldsUpdate.php:181

    superfluous space

    RichTextFieldsUpdate.php:187

    can be annotated in function

    RichTextFieldsUpdate.php:246

    can be annotated in function

    RichTextFieldsUpdate.php:257

    can be annotated in function

    RichTextFieldsUpdate.php:274

    !empty()

    RichTextFieldsUpdate.php:280

    !empty()

    RichTextFieldsUpdate.php:295

    can be annotated in function

    RichTextFieldsUpdateTest.php:30

    use statement

    RichTextFieldsUpdateTest.php:101

    any reason for splitting this?
  8. Oliver Hader commented on patch set 12 05/02/16, 16:05

    RichTextFieldsUpdate.php:84 Reply

    empty($tcaFields) should be enough then

    RichTextFieldsUpdate.php:130 Reply

    Yes
  9. Oliver Hader uploaded patch set 13 05/02/16, 17:24

  10. Oliver Hader commented on patch set 12 05/02/16, 17:29

    RichTextFieldsUpdate.php:23 Reply

    Done

    RichTextFieldsUpdate.php:54 Reply

    Done

    RichTextFieldsUpdate.php:63 Reply

    Done

    RichTextFieldsUpdate.php:84 Reply

    I changed the order here a bit now

    RichTextFieldsUpdate.php:86 Reply

    Done

    RichTextFieldsUpdate.php:91 Reply

    I kept it here since the call is required anyway to get the remaining fields

    RichTextFieldsUpdate.php:99 Reply

    Done

    RichTextFieldsUpdate.php:108 Reply

    Probably yes... I did not change that yet

    RichTextFieldsUpdate.php:127 Reply

    Done

    RichTextFieldsUpdate.php:130 Reply

    Done

    RichTextFieldsUpdate.php:141 Reply

    Done

    RichTextFieldsUpdate.php:143 Reply

    Still @todo

    RichTextFieldsUpdate.php:152 Reply

    Done

    RichTextFieldsUpdate.php:163 Reply

    Done

    RichTextFieldsUpdate.php:174 Reply

    Done

    RichTextFieldsUpdate.php:181 Reply

    Done

    RichTextFieldsUpdate.php:187 Reply

    Done

    RichTextFieldsUpdate.php:246 Reply

    Done

    RichTextFieldsUpdate.php:257 Reply

    Done

    RichTextFieldsUpdate.php:274 Reply

    Done

    RichTextFieldsUpdate.php:280 Reply

    Done

    RichTextFieldsUpdate.php:295 Reply

    Done

    RichTextFieldsUpdateTest.php:20

    Changed that to UnitTest (which is the namespace and is sufficient as well)

    RichTextFieldsUpdateTest.php:30 Reply

    Done

    RichTextFieldsUpdateTest.php:101 Reply

    Obviously not, but I kept it... can be done in a separate clean up as well
  11. Oliver Hader commented on patch set 12 05/02/16, 17:31

    @todo: * Change to use Doctrine calls * review again & test!
  12. Jigal van Hemert commented on patch set 12 05/02/16, 19:22

    RichTextFieldsUpdate.php:108 Reply

    The rest of the Install Tool doesn't use doctrine yet, that was the reason for using the "old" class for me.

    RichTextFieldsUpdateTest.php:362

    I'd like to add one with a section, but that can wait until later.
  13. Jigal van Hemert commented on patch set 13 CR +1 V +1 05/02/16, 19:25

    Thanks Olly for taking care of the changes. I didn't have time today. Patch is still working fine!
  14. Oliver Hader commented on patch set 13 V -1 05/03/16, 08:52

    Argument 1 passed to TYPO3\CMS\Install\Updates\RichTextFieldsUpdate::findRteFieldInFlexForm() must be of the type array, string given, called in master/typo3/sysext/install/Classes/Updates/RichTextFieldsUpdate.php on line 132
  15. Oliver Hader uploaded patch set 14 05/03/16, 09:41

  16. Oliver Hader commented on patch set 14 CR -1 05/03/16, 11:54

    Still some flaw if record does not have type set n ctrl section
  17. Oliver Hader commented on patch set 14 V -1 05/03/16, 12:21

    RichTextFieldsUpdate.php:107

    This needs to more flexible see TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRecordTypeValue

    RichTextFieldsUpdate.php:122

    This does not work if a table does not have ctrl/type set
  18. Christian Kuhn commented on patch set 14 CR -1 05/03/16, 12:21

    RichTextFieldsUpdate.php:111

    this can easily run into memory limit issues for big tables.

    RichTextFieldsUpdate.php:122

    there is no type definition for records at all. for instance with tt_content, there are mulitple records with different types and only those that have an rte for the specific type should be migrated. For details to determine types, see DatabaseRecordTypeValue class from formEngine
  19. Christian Kuhn commented on patch set 14 05/03/16, 12:26

    Current status: the patch is not ready and has loose ends. Benni says the parsing in RTE can deal with both <p> and without <p>, so this patch is not a must have, still we should get it done for 8.2. furthermore, the solution should be abstracted a bit better, since we need the find-rte-field-by-type-and-foo logic later for the link-syntax-upgrade wizards again. decision: no merge 8.1, but further work for 8.2
  20. Christian Kuhn uploaded patch set 15 01/10/17, 13:23

  21. Christian Kuhn commented on patch set 15 CR -2 01/10/17, 13:24

    rebased. working on it.
  22. TYPO3com voted on patch set 15 V -1 01/10/17, 13:29 Completed build in 05m 19s on Tue, 10 Jan, 02:29 PM Test Summary: 54993 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6393

  23. Christian Kuhn commented on patch set 15 CR -1 01/10/17, 16:13

    will do a different one in a related area, first.
  24. Christian Kuhn commented on patch set 15 10/20/17, 11:46

    this has been obsoleted meanwhile. abandoned.
  25. Christian Kuhn abandoned the change 10/20/17, 11:46