Part of #1971384: [META] Convert page callbacks to controllers

For instructions on how to convert a page callback into a controller, see the WSCCI Conversion Guide.

Files: 
CommentFileSizeAuthor
#34 locale-update_status_form-1978926-34.patch22.28 KBYesCT
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 67,777 pass(es).
[ View ]
#33 locale-update_status_form-1978926-30-33.txt832 byteslikin
#33 locale-update_status_form-1978926-33.patch22.26 KBlikin
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,821 pass(es).
[ View ]
#30 locale-update_status_form-1978926-28-30.txt1.44 KBlikin
#30 locale-update_status_form-1978926-30.patch22.26 KBlikin
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,731 pass(es), 3 fail(s), and 0 exception(s).
[ View ]
#28 locale-update_status_form-1978926-22-28.txt814 byteslikin
#28 locale-update_status_form-1978926-28.patch22.29 KBlikin
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,613 pass(es), 46 fail(s), and 16 exception(s).
[ View ]
#26 locale_improved.patch13.15 KBneetu morwani
FAILED: [[SimpleTest]]: [MySQL] 61,470 pass(es), 1,725 fail(s), and 801 exception(s).
[ View ]
#22 drupal.locale.update_form_status-1978926-22.patch22.39 KBLuxian
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal.locale.update_form_status-1978926-22.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#22 interdiff.txt7.33 KBLuxian
#18 drupal8.locale-module.1978926-18.patch22.26 KBdisasm
FAILED: [[SimpleTest]]: [MySQL] 59,275 pass(es), 3 fail(s), and 0 exception(s).
[ View ]
#18 interdiff.txt16.98 KBdisasm
#11 drupal-locale_translation_status_form_controller-1978926-11.patch19.46 KBh3rj4n
FAILED: [[SimpleTest]]: [MySQL] 57,961 pass(es), 4 fail(s), and 0 exception(s).
[ View ]
#10 drupal-locale_translation_status_form_controller-1978926-10.patch19.42 KBh3rj4n
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#5 locale_translation_status_form_controller-1978926-5.patch19.14 KBPancho
FAILED: [[SimpleTest]]: [MySQL] 56,774 pass(es), 40 fail(s), and 0 exception(s).
[ View ]
#5 interdiff-1978926-2-5.txt11.84 KBPancho
#2 locale_translation_status_form_controller-1978926-2.patch14.93 KBPancho
FAILED: [[SimpleTest]]: [MySQL] 56,924 pass(es), 43 fail(s), and 5 exception(s).
[ View ]
#1 locale_translation_status_form_controller-1978926-1.patch7.76 KBPancho
FAILED: [[SimpleTest]]: [MySQL] 56,605 pass(es), 51 fail(s), and 0 exception(s).
[ View ]

Comments

Status:Active» Needs review
Issue tags:+D8MI, +WSCCI-conversion
StatusFileSize
new7.76 KB
FAILED: [[SimpleTest]]: [MySQL] 56,605 pass(es), 51 fail(s), and 0 exception(s).
[ View ]

Quite straightforward, but I didn't get to testing it that much.
So let's see what the bot says and then please review.

StatusFileSize
new14.93 KB
FAILED: [[SimpleTest]]: [MySQL] 56,924 pass(es), 43 fail(s), and 5 exception(s).
[ View ]

Sorry, the first patch was missing our new class. No other changes.
Here we go again:

Assigned:Unassigned» Pancho

Status:Needs review» Needs work

The last submitted patch, locale_translation_status_form_controller-1978926-2.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new11.84 KB
new19.14 KB
FAILED: [[SimpleTest]]: [MySQL] 56,774 pass(es), 40 fail(s), and 0 exception(s).
[ View ]

New patch:

  • Use 'locale_translation_status_form' as FormID, so the form is correctly recognized for theming
  • Roll in _locale_translation_status_debug_info() as TranslationStatusForm::createInfoString()
  • Swap out the quite complex data shuffling to TranslationStatusForm::prepareUpdateData()
  • Remove the unused $projects variable with it's call to locale_translation_get_projects()
  • Inject the module handler.
  • Some minor optimizations.

Now let's see what the testbot says.
In any case still open for further improvements, optimizations and suggestions.

Status:Needs review» Needs work
Issue tags:-D8MI, -FormInterface, -WSCCI-conversion

The last submitted patch, locale_translation_status_form_controller-1978926-5.patch, failed testing.

Status:Needs work» Needs review

#5: locale_translation_status_form_controller-1978926-5.patch queued for re-testing.

Previous result: FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/drupal.git].

Status:Needs review» Needs work
Issue tags:+D8MI, +FormInterface, +WSCCI-conversion

The last submitted patch, locale_translation_status_form_controller-1978926-5.patch, failed testing.

Assigned:Pancho» h3rj4n

taking over the issue.

StatusFileSize
new19.42 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

This patch is definitely going to fail but the old one couldn't be applied, so just created a new one.

StatusFileSize
new19.46 KB
FAILED: [[SimpleTest]]: [MySQL] 57,961 pass(es), 4 fail(s), and 0 exception(s).
[ View ]

Ok, I hope this one doesn't fail. Should all be fixed.

Status:Needs work» Needs review

Forgot 'needs review' again :S

Status:Needs review» Needs work

The last submitted patch, drupal-locale_translation_status_form_controller-1978926-11.patch, failed testing.

quick update: The locale module requires the update module to be enabled. Otherwise this module doesn't work. It's about this function locale_translation_build_projects. It works but won't give you the functionality you want.

Issue tags:+Needs reroll

Thanks for your work on this issue! Please see #1971384-43: [META] Convert page callbacks to controllers for an update on the routing system conversion process.

Issue tags:+language-ui

Assigned:h3rj4n» disasm
Status:Needs work» Needs review
StatusFileSize
new16.98 KB
new22.26 KB
FAILED: [[SimpleTest]]: [MySQL] 59,275 pass(es), 3 fail(s), and 0 exception(s).
[ View ]

massive reroll. Built on FormBase. Injecting KeyVaueStoreInterface to get rid of Drupal::state(). Compared functions being replaced with methods and made changes accordingly. Not throwing any errors locally. Lets see what testbot thinks!

Noting that if anything looks odd in the interdiff (like removing locale_translation_manual_status), that isn't really happening. It was a screw-up I made in the reroll somehow that I fixed in my commit (in the reroll I ended up with two locale_translation_manual_status functions, one of which contained the stuff I really wanted to remove.

Status:Needs review» Needs work

The last submitted patch, drupal8.locale-module.1978926-18.patch, failed testing.

Assigned:disasm» Luxian

@disasm Your patch looks really good and I would like to continue your work and try to get all the Locale forms converted. The other forms already have a working patch:

So, I will assign this to me.

Status:Needs work» Needs review
StatusFileSize
new7.33 KB
new22.39 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal.locale.update_form_status-1978926-22.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

This is the patch from #1978926-18: Convert locale_translation_status_form to a Controller re-rolled with conflicts resolved. I have 3 tests failing on my local. I'm not sure how much time I will have in the next 2 days, so if anyone wants to work on it can assign it to himself.

Interdiff might be wrong (not sure if I do them right).

The last submitted patch, drupal.locale.update_form_status-1978926-22.patch, failed testing.

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, 22: drupal.locale.update_form_status-1978926-22.patch, failed testing.

Issue summary:View changes
Status:Needs work» Needs review
StatusFileSize
new13.15 KB
FAILED: [[SimpleTest]]: [MySQL] 61,470 pass(es), 1,725 fail(s), and 801 exception(s).
[ View ]

Last patch re-rolled. Now the patch applies successfully.

Status:Needs review» Needs work

The last submitted patch, 26: locale_improved.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new22.29 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,613 pass(es), 46 fail(s), and 16 exception(s).
[ View ]
new814 bytes

Status:Needs review» Needs work

The last submitted patch, 28: locale-update_status_form-1978926-28.patch, failed testing.

Assigned:Luxian» Unassigned
Status:Needs work» Needs review
StatusFileSize
new22.26 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,731 pass(es), 3 fail(s), and 0 exception(s).
[ View ]
new1.44 KB

Status:Needs review» Needs work

The last submitted patch, 30: locale-update_status_form-1978926-30.patch, failed testing.

Issue tags:-Needs reroll

It still applies, tag removed.

Status:Needs work» Needs review
StatusFileSize
new22.26 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 66,821 pass(es).
[ View ]
new832 bytes

-        if (!isset($project_info->type)) {
+        if (empty($project_info->type)) {

if it is a class. It always have to have an attribute.

StatusFileSize
new22.28 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 67,777 pass(es).
[ View ]

was going to review this, but it did not apply.
rerolled.
easy, auto 3-way merge.
no conflicts. (no interdiff)

I'll review this now.

Status:Needs review» Needs work

+++ b/core/modules/locale/lib/Drupal/locale/Form/LocaleForm.php
@@ -31,4 +31,14 @@ public function status() {
     return \Drupal::formBuilder()->getForm('locale_translation_status_form');
   }
...
+   * Wraps locale_translate_export_form().
+   *
+   * @todo Remove locale_translate_export_form().
+   */
+  public function export() {
+    module_load_include('bulk.inc', 'locale');
+    return drupal_get_form('locale_translate_export_form');
+  }
+

Bad merge? It's supposed to be removing the other one.

@tim.plunkett This is from
https://drupal.org/node/1978924. It is a pitty that it has been closed automaticaly due to no activity. We need an authorized person to solve such problems. There are a lot rtbc tasks.