Review main Abandoned

49437[BUGFIX] Pass on translation elements via translate button

Andreas Wolf CR 0 V 0 Normal +33 −21 updated 06/12/18, 10:43

Commit message

For the page module, the elements that may be translated are selected
both when rendering the page view and when rendering the element list in
the translation wizard. The former may easily be overwritten by a custom
page module renderer, as e.g. done in Flux/Fluidcontent, but for the
latter, this is harder, as only the page id, colPos and language id are
passed to the AJAX module. The rest of the structural information
(container element id, container column) as added by extensions like
Flux and Gridelements is lost.

When translating items in a nested container structure, the exact list
of items therefore needs to be passed back from the localization modal
to the translation controller (within the AJAX request), so the correct
elements are selected. This also requires overriding
AjaxLocalizationController in the respective extension.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 4

Review log 2838

Show 913 earlier messages
  1. Andreas Wolf uploaded patch set 1 08/10/16, 05:41

  2. Andreas Wolf updated the commit message in patch set 2 08/10/16, 05:41

  3. Benni Mack commented on patch set 2 CR +1 08/10/16, 05:45

    Makes complete sense. Do you have an example in a third-party ext that includes this change already? So it's possible to test this one.
  4. TYPO3com voted on patch set 1 V +1 08/10/16, 05:49 Completed build in 08m 07s on Wed, 10 Aug, 07:49 AM Test Summary: 18474 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1970

  5. TYPO3com voted on patch set 2 V +1 08/10/16, 05:52 Completed build in 10m 29s on Wed, 10 Aug, 07:52 AM Test Summary: 18474 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1971

  6. Andreas Kienast commented on patch set 2 08/10/16, 08:28

    Localization.js:237

    Where is this used in LocalizationController::getRecordLocalizeSummary()?
  7. Andreas Wolf commented on patch set 2 08/13/16, 10:34

    Localization.js:237 Reply

    I have implemented this for Flux by extending the LocalizationController. The better alternative of course would be to include it in the core’s LocController – I’ll do that instead. Thanks for the hint!
  8. Andreas Wolf uploaded patch set 3 08/13/16, 11:17

  9. TYPO3com voted on patch set 3 V -1 08/13/16, 11:20 Completed build in 02m 33s on Sat, 13 Aug, 01:20 PM Test Summary: 18668 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2031

  10. Andreas Wolf commented on patch set 3 08/13/16, 11:25

    The controller now fetches elements with the given IDs instead of the page id, colPos etc. The new repository method probably should be located somewhere else, as it does not really have anything localization-specific.
  11. Andreas Wolf rebased onto patch set 4 08/30/16, 11:51

  12. TYPO3com voted on patch set 4 V -1 08/30/16, 11:54 Completed build in 03m 08s on Tue, 30 Aug, 01:54 PM Test Summary: 18646 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2439

  13. Andreas Wolf uploaded patch set 5 08/30/16, 11:55

  1. TYPO3com voted on patch set 5 V +1 08/30/16, 11:58 Completed build in 02m 54s on Tue, 30 Aug, 01:58 PM Test Summary: 18646 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2440

  2. Stefan Neufeind commented on patch set 5 08/30/16, 18:41

    LocalizationController.php:131

    Also in getRecordUidsToCopy then maybe?

    LocalizationRepository.php:99

    description needs to be adjusted

    PageLayoutView.php:1953

    of topic, but stumbled across it during review: Should we maybe rename the internal variable? It contains IDs (looked it up) not just counts.
  3. Andreas Wolf commented on patch set 5 09/02/16, 09:45

    LocalizationController.php:131 Reply

    Will have a look, thanks for the hint!

    LocalizationRepository.php:99 Reply

    Oops. :-)

    PageLayoutView.php:1953 Reply

    Definitely!
  4. Andreas Wolf commented on patch set 5 09/02/16, 09:49

    LocalizationController.php:131 Reply

    That method actually seems to be unused… o.0
  5. Andreas Wolf uploaded patch set 6 09/02/16, 10:45

  6. Andreas Wolf commented on patch set 5 09/02/16, 10:48

    Fixed the remarks directly related to this patchset here, moved two other changes to separate patches.
  7. TYPO3com voted on patch set 6 V +1 09/02/16, 10:49 Completed build in 03m 32s on Fri, 2 Sep, 12:49 PM Test Summary: 18499 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2722

  8. Stefan Neufeind commented on patch set 6 09/02/16, 11:22

    LocalizationRepository.php:103

    According to Query.php, could it be that's more a: @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
  9. Andreas Wolf commented on patch set 6 09/02/16, 18:59

    LocalizationRepository.php:103 Reply

    Good point. Will fix that.
  10. Andreas Wolf rebased onto patch set 7 09/03/16, 15:35

  11. TYPO3com commented on patch set 7 09/03/16, 15:39 Completed build in 03m 35s on Sat, 3 Sep, 05:39 PM Test Summary: 18506 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2933

  12. Daniel Maier voted on patch set 7 CR +1 V +1 09/04/16, 09:16

  13. Stefan Neufeind commented on patch set 7 V -1 09/06/16, 11:04

    PageLayoutView.php:1949

    That button seems to have { for the data-element-ids for me?!? Also Firebug gives me some strange (maybe wrong decoded/reordered?) arguments: <input type="button" data-colpos-name="Normal" data-colpos-id="0" data-language-name="Dansk" data-language-id="2" data-page-id="189" data-table="tt_content" data-allow-translate="0" data-allow-copy="1" data-has-elements="1" value="Translate" 1":295}"="" data-element-ids="{" class="btn btn-default t3js-localize"> So finally the ajax-call gives me a PHP-error since { is used for the element-ids
  14. Benni Mack commented on patch set 7 10/03/17, 20:05

    ping - over a year of no activity. Any chance of fixing Stefan's remarks and get this patch in?
  15. Andreas Kienast uploaded patch set 8 10/04/17, 13:30

  16. Andreas Kienast uploaded patch set 9 10/04/17, 13:33

  17. TYPO3com voted on patch set 8 V +1 10/04/17, 13:41 Completed build in 10m 33s on Wed, 4 Oct, 03:41 PM Test Summary: 56646 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15348

  18. TYPO3com voted on patch set 9 V +1 10/04/17, 13:45 Completed build in 11m 55s on Wed, 4 Oct, 03:45 PM Test Summary: 56646 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-15349

  19. Jörg Bösche voted on patch set 9 CR +1 11/13/17, 10:06

  20. Steffen Frese voted on patch set 9 CR +1 12/04/17, 10:49

  21. Mathias Schreiber commented on patch set 9 02/03/18, 09:51

    LocalizationController.php:125 Unresolved

    This feels like it could become an information disclosure. I can just pass in any elements, right? I didn't check yet what happens with the current code if I just pass in any page ID, though.
  22. Andreas Kienast uploaded patch set 10 02/05/18, 19:22

  23. Andreas Kienast commented on patch set 10 02/05/18, 19:22

    Just resolved the merged conflicts, Mathias' comments are still valid.
  24. TYPO3com voted on patch set 10 V -1 02/05/18, 19:36 Completed build in 14m 14s on Mon, 5 Feb, 08:36 PM Test Summary: 4 of 30571 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-18962

  25. Benni Mack abandoned the change 06/12/18, 10:43

    I'll abandon that patch, as we're going the alternative way to ensure the connected/free mode and translation mode is built differently (see Andy F.'s current patches)