Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes

This commit is contained in:
Pantheon Automation 2016-01-06 16:31:26 -08:00 committed by Greg Anderson
parent 1a0e9d9fac
commit a6b049dd05
538 changed files with 5247 additions and 1594 deletions

View file

@ -38,7 +38,7 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
$output .= '<dt>' . t('Configuring view and form modes') . '</dt>';
$output .= '<dd>' . t('You can add, edit, and delete view modes for entities on the <a href=":view_modes">View modes page</a>, and you can add, edit, and delete form modes for entities on the <a href=":form_modes">Form modes page</a>. Once you have defined a view mode or form mode for an entity type, it will be available on the Manage display or Manage form display page for each sub-type of that entity.', array(':view_modes' => \Drupal::url('entity.entity_view_mode.collection'), ':form_modes' => \Drupal::url('entity.entity_form_mode.collection'))) . '</dd>';
$output .= '<dt>' . t('Listing fields') . '</dt>';
$output .= '<dd>' . t('There are two reports available that list the fields defined on your site. The <a href=":entity-list" title="Entities field list report">Entities</a> report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the <a href=":views">Views</a> and <a href=":views-ui">Views UI</a> modules are enabled, the <a href=":views-list" title="Used in views field list report">Used in views</a> report lists each field that is used in a view, with a link to edit that view.', array(':entity-list' => \Drupal::url('entity.field_storage_config.collection'), ':views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', ':views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#',':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '</dd>';
$output .= '<dd>' . t('There are two reports available that list the fields defined on your site. The <a href=":entity-list" title="Entities field list report">Entities</a> report lists all your fields, showing the field machine names, types, and the entity types or sub-types they are used on (each sub-type links to the Manage fields page). If the <a href=":views">Views</a> and <a href=":views-ui">Views UI</a> modules are enabled, the <a href=":views-list" title="Used in views field list report">Used in views</a> report lists each field that is used in a view, with a link to edit that view.', array(':entity-list' => \Drupal::url('entity.field_storage_config.collection'), ':views-list' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('views_ui.reports_fields') : '#', ':views' => (\Drupal::moduleHandler()->moduleExists('views')) ? \Drupal::url('help.page', array('name' => 'views')) : '#', ':views-ui' => (\Drupal::moduleHandler()->moduleExists('views_ui')) ? \Drupal::url('help.page', array('name' => 'views_ui')) : '#')) . '</dd>';
$output .= '</dl>';
return $output;

View file

@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\field\Entity\FieldConfig;
use Drupal\field_ui\FieldUI;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Provides a form for the "field storage" edit page.
@ -33,6 +34,9 @@ class FieldStorageConfigEditForm extends EntityForm {
// The URL of this entity form contains only the ID of the field_config
// but we are actually editing a field_storage_config entity.
$field_config = FieldConfig::load($route_match->getRawParameter('field_config'));
if (!$field_config) {
throw new NotFoundHttpException();
}
return $field_config->getFieldStorageDefinition();
}

View file

@ -132,7 +132,7 @@ class EntityDisplayTest extends KernelTestBase {
$display->save();
$components = array_keys($display->getComponents());
// The name field is not configurable so will be added automatically.
$expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name');
$expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name');
$this->assertIdentical($components, $expected);
}

View file

@ -46,7 +46,7 @@ trait FieldUiTestTrait {
}
// First step: 'Add field' page.
$this->drupalPostForm($bundle_path, $initial_edit, t('Save and continue'));
$this->drupalPostForm($bundle_path, $initial_edit, t('Save and continue'));
$this->assertRaw(t('These settings apply to the %label field everywhere it is used.', array('%label' => $label)), 'Storage settings page was displayed.');
// Test Breadcrumbs.
$this->assertLink($label, 0, 'Field label is correct in the breadcrumb of the storage settings page.');

View file

@ -492,13 +492,13 @@ class ManageFieldsTest extends WebTestBase {
// Try with an entity key.
$edit['field_name'] = 'title';
$bundle_path = 'admin/structure/types/manage/' . $this->contentType;
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
$this->assertText(t('The machine-readable name is already in use. It must be unique.'));
// Try with a base field.
$edit['field_name'] = 'sticky';
$bundle_path = 'admin/structure/types/manage/' . $this->contentType;
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
$this->assertText(t('The machine-readable name is already in use. It must be unique.'));
}
@ -718,4 +718,17 @@ class ManageFieldsTest extends WebTestBase {
$this->assertEqual($view_display->getComponent('field_test_custom_options')['type'], 'field_test_multiple');
}
/**
* Tests the access to non-existent field URLs.
*/
public function testNonExistentFieldUrls() {
$field_id = 'node.foo.bar';
$this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
$this->assertResponse(404);
$this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id . '/storage');
$this->assertResponse(404);
}
}