Support from Acquia helps fund testing for Drupal Acquia logo

Comments

naveenvalecha created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

shadcn’s picture

Version: 8.3.x-dev » 8.4.x-dev
Status: Active » Needs review
FileSize
8.91 KB

OK let's test this.

Status: Needs review » Needs work

The last submitted patch, 3: entityresource_provide-2843763-3.patch, failed testing.

Wim Leers’s picture

+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsResourceTestBase.php
@@ -0,0 +1,91 @@
+      'default_langcode' => 'site_default',

Let's use setTargetBundle(), setDefaultLangcode(), etc.

shadcn’s picture

Assigned: Unassigned » shadcn

OK I'll make the changes. Thanks.

shadcn’s picture

Status: Needs work » Needs review
FileSize
8.95 KB
735 bytes

Hmm we can't really use setTargetBundle here. See ContentLanguageSettings constructor below:

public function __construct(array $values, $entity_type = 'language_content_settings') {
    if (empty($values['target_entity_type_id'])) {
      throw new ContentLanguageSettingsException('Attempt to create content language settings without a target_entity_type_id.');
    }
    if (empty($values['target_bundle'])) {
      throw new ContentLanguageSettingsException('Attempt to create content language settings without a target_bundle.');
    }
    parent::__construct($values, $entity_type);
  }

I've added the setDefaultLangcode call.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Ah, hah :) Then this is good to go!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed b712a2d to 8.4.x and d6a1aa6 to 8.3.x. Thanks!

Backported to 8.3.x because its tests only.

  • alexpott committed b712a2d on 8.4.x
    Issue #2843763 by arshadcn, Wim Leers: EntityResource: Provide...

  • alexpott committed d6a1aa6 on 8.3.x
    Issue #2843763 by arshadcn, Wim Leers: EntityResource: Provide...

Status: Fixed » Closed (fixed)

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