Problem/Motivation

As part of making this module ready for Drupal 9, we should add a missing core_version_requirement key to the module info file.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mbovan created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
FileSize
12.11 KB

This patch adds a necessary core_version_requirement key.

nathandentzau’s picture

@mbovan your patch contains changes that are not related to the core_version_requirement key change. Could you provide some context as your reason for the change and if that should be moved to a different issue?

mbovan’s picture

  1. +++ b/tests/src/Functional/SchemaMetatagTagsTestBase.php
    @@ -45,6 +46,11 @@ abstract class SchemaMetatagTagsTestBase extends BrowserTestBase {
    +  /**
    +   * {@inheritDoc}
    +   */
    +  protected $defaultTheme = 'stark';
    

    This is needed to make tests passing.

  2. +++ b/tests/src/Functional/SchemaMetatagTagsTestBase.php
    @@ -107,7 +113,7 @@ abstract class SchemaMetatagTagsTestBase extends BrowserTestBase {
    -      list($config_path, $rendered_path, $save_message) = $item;
    +      [$config_path, $rendered_path, $save_message] = $item;
    

    This was an IDE change. Might not be related.

  3. +++ b/tests/src/Functional/SchemaMetatagTagsTestBase.php
    @@ -202,7 +208,7 @@ abstract class SchemaMetatagTagsTestBase extends BrowserTestBase {
    -      $json = json_decode($elements[0]->getHtml(), TRUE);
    +      $json = Json::decode($elements[0]->getHtml());
    

    It seems like json_decode() could be deperecated in the future.

mbovan’s picture

Reverted #4.2.

mbovan’s picture

FileSize
617 bytes

The interdiff.

nathandentzau’s picture

Hey @mbovan thank you for the context. Sounds good about fixing the test! I just reviewed this locally and works great. RTBC+++

nathandentzau’s picture

Status: Needs review » Reviewed & tested by the community
Berdir’s picture

+++ b/src/Plugin/metatag/Tag/SchemaSpeakableTrait.php
@@ -55,16 +55,17 @@ trait SchemaSpeakableTrait {
       '#default_value' => !empty($value['xpath']) ? $value['xpath'] : '',
-      '#description' => $this->t('ex: @example',
-        ['@example' => "'/html/head/title'", "'/html/head/meta[@name=\'description\']/@content']'"),
+      '#description' => $this->t('Separate xpaths by comma, as in: @example',
+        ['@example' => '/html/head/title, /html/head/meta[@name=\'description\']/@content']
+      ),
     ];
 
     $form['cssSelector'] = [
       '#type' => 'textfield',
       '#title' => $this->t('cssSelector'),
       '#default_value' => !empty($value['cssSelector']) ? $value['cssSelector'] : '',
-      '#description' => $this->t('ex: @example',
-        ['@example' => "'#title'", "'#summary'"]
+      '#description' => $this->t('Separate selectors by comma, as in @example',
+        ['@example' => '#title, #summary']
       ),
     ];

Would be better to leave this out of this patch to avoid conflicts with the other issue.

mbovan’s picture

FileSize
11.76 KB
1.19 KB

Definitely, the snippet was accidentally added in #5 from #3068796: Fatal PHP syntax error in SchemaSpeakableTrait.php.

mbovan’s picture

KarenS’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

I missed this issue and am fixing this in #3138582: Drupal 9 compatibility. Sorry!