@see title. Probably got accidentally removed while re-factoring the field ui overview pages.

Comments

Stalski’s picture

Shouldn't this be this->adminPath?

fubhy’s picture

StatusFileSize
new864 bytes

Whoops, we actually have a property for the admin path.

fubhy’s picture

@Stalski: Yes :P

webchick’s picture

Issue tags: +Needs tests

Can we add some quick test coverage of this code path?

fubhy’s picture

StatusFileSize
new3.12 KB

Sure... Here we go:

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Fine for me.

fubhy’s picture

Issue tags: -Needs tests

:)

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, one more round...

+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.phpundefined
@@ -259,4 +259,22 @@ function assertNodeViewTextHelper(Node $node, $view_mode, $text, $message, $not_
+  /**
+   * Tests that the 'Manage display' page renders a message if there are no
+   * fields yet.

(nitpick) Please shorten so it fits to 80 characters.

+++ b/core/modules/field_ui/lib/Drupal/field_ui/Tests/ManageDisplayTest.phpundefined
@@ -259,4 +259,22 @@ function assertNodeViewTextHelper(Node $node, $view_mode, $text, $message, $not_
diff --git a/core/modules/system/tests/modules/field_ui_test/field_ui_test.info b/core/modules/system/tests/modules/field_ui_test/field_ui_test.info

+++ b/core/modules/system/tests/modules/field_ui_test/field_ui_test.moduleundefined
@@ -0,0 +1,14 @@
+/**
+ * Implements hook_field_extra_fields_alter().
+ */
+function field_ui_test_field_extra_fields_alter(&$info) {
+  // Remove all extra fields from the 'no_fields' content type;
+  unset($info['node']['no_fields']);

It's very strange to put test modules for Field stuff in System module.

We already have a core/modules/field/tests/modules/field_test module that implements several alter hooks; can we just move this code over there?

fubhy’s picture

Status: Needs work » Needs review
StatusFileSize
new2.76 KB

Right... Good point.

swentel’s picture

+++ b/core/modules/field/tests/modules/field_test/field_test.moduleundefined
@@ -302,3 +302,11 @@ function field_test_field_formatter_settings_form_alter(&$element, &$form_state,
+  // Remove all extra fields from the 'no_fields' content type;
+  unset($info['node']['no_fields']);
+}

I'm just wondering if this doesn't trigger any notices as the 'no_fields' content type doesn't always exists - unless we really really don't have any manage display tests (which could be the case) ?

fubhy’s picture

unset() never triggers a notice if the array key that is going to be unset does not exist.

swentel’s picture

Status: Needs review » Reviewed & tested by the community

Ok then :)

xjm’s picture

#9: 1824180-9.patch queued for re-testing.

fubhy’s picture

#9: 1824180-9.patch queued for re-testing.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed/pushed to 8.x.

fubhy’s picture

Status: Fixed » Active

Didn't happen :)

catch’s picture

Status: Active » Fixed

Oops, trying again.

Status: Fixed » Closed (fixed)

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