Files: 
CommentFileSizeAuthor
#24 interdiff.txt1.44 KBtim.plunkett
#22 custom-block-1983682-22.patch11.31 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 57,038 pass(es).
[ View ]
#22 interdiff.txt11.5 KBtim.plunkett
#18 custom_block-1983682-18.patch11.5 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 56,449 pass(es).
[ View ]
#18 interdiff.txt5.26 KBtim.plunkett
#15 custom-block-1983682-15.patch13.56 KBh3rj4n
FAILED: [[SimpleTest]]: [MySQL] 56,225 pass(es), 83 fail(s), and 8 exception(s).
[ View ]
#15 interdiff-1983682.txt818 bytesh3rj4n
#13 custom-block-1983682-13.patch13.49 KBh3rj4n
FAILED: [[SimpleTest]]: [MySQL] 56,447 pass(es), 107 fail(s), and 8 exception(s).
[ View ]
#13 interdiff-1983682.txt4.67 KBh3rj4n
#11 custom-block-1983682-11.patch11.4 KBtim.plunkett
FAILED: [[SimpleTest]]: [MySQL] 57,631 pass(es), 55 fail(s), and 7 exception(s).
[ View ]
#11 interdiff.txt1.09 KBtim.plunkett
#9 custom-block-1983682-9.patch11.17 KBtim.plunkett
FAILED: [[SimpleTest]]: [MySQL] 57,742 pass(es), 55 fail(s), and 0 exception(s).
[ View ]
#9 interdiff.txt1.13 KBtim.plunkett
#5 custom-block-1983682-5.patch12.51 KBtim.plunkett
FAILED: [[SimpleTest]]: [MySQL] 55,587 pass(es), 55 fail(s), and 0 exception(s).
[ View ]
#5 interdiff.txt3.58 KBtim.plunkett
#3 custom-block-1983682-3.patch8.44 KBtim.plunkett
FAILED: [[SimpleTest]]: [MySQL] 55,541 pass(es), 85 fail(s), and 10 exception(s).
[ View ]
#3 interdiff.txt5.68 KBtim.plunkett
#1 block-entity-form-1983682.1.patch6.59 KBlarowlan
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new6.59 KB
FAILED: [[SimpleTest]]: [MySQL] Drupal installation failed.
[ View ]

_entity_form is awesome!
less code++

Status:Needs review» Needs work

The last submitted patch, block-entity-form-1983682.1.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.68 KB
new8.44 KB
FAILED: [[SimpleTest]]: [MySQL] 55,541 pass(es), 85 fail(s), and 10 exception(s).
[ View ]

Swooping in :)

Status:Needs review» Needs work

The last submitted patch, custom-block-1983682-3.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new3.58 KB
new12.51 KB
FAILED: [[SimpleTest]]: [MySQL] 55,587 pass(es), 55 fail(s), and 0 exception(s).
[ View ]

Status:Needs review» Needs work

The last submitted patch, custom-block-1983682-5.patch, failed testing.

+++ b/core/includes/menu.incundefined
@@ -771,8 +771,15 @@ function _menu_translate(&$router_item, $map, $to_arg = FALSE) {
+    // Attempt to match this path to provide a fully built request to the
+    // acccess checker.
+    try {
+      $request->attributes->add(Drupal::service('router')->matchRequest($request));
+      $router_item['access'] = Drupal::service('access_manager')->check($route, $request);
+    }
+    catch (NotFoundHttpException $e) {
+      $router_item['access'] = FALSE;

I guess this should be moved into a separate issue.

+++ b/core/modules/block/custom_block/custom_block.routing.ymlundefined
@@ -1,6 +1,28 @@
+    custom_block: \d+

Oh does this regex support come from symfony directly, neat.

Status:Needs work» Needs review
StatusFileSize
new1.13 KB
new11.17 KB
FAILED: [[SimpleTest]]: [MySQL] 57,742 pass(es), 55 fail(s), and 0 exception(s).
[ View ]

Status:Needs review» Needs work

The last submitted patch, custom-block-1983682-9.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new1.09 KB
new11.4 KB
FAILED: [[SimpleTest]]: [MySQL] 57,631 pass(es), 55 fail(s), and 7 exception(s).
[ View ]

Missed a spot.

Status:Needs review» Needs work

The last submitted patch, custom-block-1983682-11.patch, failed testing.

StatusFileSize
new4.67 KB
new13.49 KB
FAILED: [[SimpleTest]]: [MySQL] 56,447 pass(es), 107 fail(s), and 8 exception(s).
[ View ]

re-rolled the patch. Tested locally but failed on the 'Custom Block translation UI' test. A verbose message gave me this:
InvalidArgumentException: Missing 'form: default' for entity 'custom_block' in Drupal\Core\Entity\EntityManager->getControllerClass() (line 166 of /var/www/html/drupal/core/lib/Drupal/Core/Entity/EntityManager.php).

It still has to do something with routing.

+++ b/core/modules/block/custom_block/custom_block.routing.ymlundefined
+++ b/core/modules/block/custom_block/custom_block.routing.ymlundefined
+     custom_block: \d+
+ ¶
+ custom_block_type_add:
...
+     _permission: 'administer blocks'
+ ¶
+ custom_block_type_edit:

Trailing whitespace

+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlockType.phpundefined
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlockType.phpundefined
-  *       "default" = "Drupal\custom_block\CustomBlockTypeFormController",

You can't get rid of "default" anymore until #2006348: Remove default/fallback entity form operation goes in.

StatusFileSize
new8.94 KB
new818 bytes
new13.56 KB
FAILED: [[SimpleTest]]: [MySQL] 56,225 pass(es), 83 fail(s), and 8 exception(s).
[ View ]

Added the 'default' in the file. Didn't found the white pace error.

The test still fails. Dunno why. Tried to add a custom block manually in a different language and I got the following error:
block_error.png

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, custom-block-1983682-15.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.26 KB
new11.5 KB
PASSED: [[SimpleTest]]: [MySQL] 56,449 pass(es).
[ View ]

Wrong form controller.
Also leftover code in custom_block.admin.inc.

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

The last submitted patch, custom_block-1983682-18.patch, failed testing.

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

#18: custom_block-1983682-18.patch queued for re-testing.

+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/CustomBlockTypeFormController.phpundefined
@@ -21,6 +21,11 @@ public function form(array $form, array &$form_state) {
+      drupal_set_title(t('@label', array('@label' => $block_type->label())));

I think this will double encode (ie two calls to check_plain, one from drupal_set_title, one from using @)
Other than that looks RTBC

StatusFileSize
new11.5 KB
new11.31 KB
PASSED: [[SimpleTest]]: [MySQL] 57,038 pass(es).
[ View ]

Ah that was a hack anyway, we fixed title callback for routes.

StatusFileSize
new1.44 KB

Wrong interdiff

Status:Needs review» Reviewed & tested by the community

Unless bot says no

#22: custom-block-1983682-22.patch queued for re-testing.

Status:Reviewed & tested by the community» Needs review

+++ b/core/modules/block/custom_block/custom_block.routing.ymlundefined
@@ -24,4 +24,26 @@ custom_block_type_delete:
+custom_block_edit:
+  pattern: '/block/{custom_block}'
+  defaults:
+    _entity_form: 'custom_block.edit'
+  requirements:
+    _entity_access: 'custom_block.update'
+    custom_block: \d+

Are we sure that we want to use this route for editing a block? What about sub-requests / ESI etc...

Status:Needs review» Reviewed & tested by the community

Is that in scope?

  $items['block/%custom_block'] = array(
    'title' => 'Edit',
    'page callback' => 'custom_block_edit',
    'page arguments' => array(1),
    'access callback' => 'entity_page_access',
    'access arguments' => array(1, 'update'),
    'file' => 'custom_block.pages.inc',
  );

is in HEAD, this is just a conversion.

Status:Reviewed & tested by the community» Fixed

You're correct - it's out of scope :)

Committed c2e0cda and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.