πŸ‡ΊπŸ‡ΈUnited States @msangha

Account created on 23 March 2016, about 8 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States msangha

I don't know if that is the ordinary behavior of CKEditor 5. If it is, then how can we revert it so the source is same as v4?

πŸ‡ΊπŸ‡ΈUnited States msangha

I am having a similar issue. I have Drupal 10 installed on my local. I pull the Live DB which is Drupal 9 and run config import which works ok. When I run db updates via drush I get this error:

>  [notice] Update started: media_post_update_oembed_loading_attribute
>  [error]  TypeError: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}(): Argument #1 ($definition) must be of type Drupal\Core\Field\FieldStorageDefinitionInterface, null given in Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}() (line 175 of /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php) #0 [internal function]: Drupal\Core\Entity\Sql\DefaultTableMapping::Drupal\Core\Entity\Sql\{closure}()
> #1 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php(175): array_filter()
> #2 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(382): Drupal\Core\Entity\Sql\DefaultTableMapping::create()
> #3 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(357): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getCustomTableMapping()
> #4 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(204): Drupal\Core\Entity\Sql\SqlContentEntityStorage->getTableMapping()
> #5 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(189): Drupal\Core\Entity\Sql\SqlContentEntityStorage->initTableLayout()
> #6 /var/www/mysite/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(149): Drupal\Core\Entity\Sql\SqlContentEntityStorage->__construct()
> #7 /var/www/mysite/modules/contrib/commerce/src/CommerceContentEntityStorage.php(28): Drupal\Core\Entity\Sql\SqlContentEntityStorage::createInstance()
> #8 /var/www/mysite/modules/contrib/commerce/modules/product/src/ProductVariationStorage.php(35): Drupal\commerce\CommerceContentEntityStorage::createInstance()
> #9 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityTypeManager.php(269): Drupal\commerce_product\ProductVariationStorage::createInstance()
> #10 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityTypeManager.php(258): Drupal\Core\Entity\EntityTypeManager->createHandlerInstance()
> #11 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler()
> #12 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityFieldManager.php(384): Drupal\Core\Entity\EntityTypeManager->getStorage()
> #13 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityFieldManager.php(353): Drupal\Core\Entity\EntityFieldManager->buildBundleFieldDefinitions()
> #14 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(413): Drupal\Core\Entity\EntityFieldManager->getFieldDefinitions()
> #15 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(192): Drupal\Core\Entity\EntityDisplayBase->getFieldDefinitions()
> #16 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityDisplayBase.php(153): Drupal\Core\Entity\EntityDisplayBase->init()
> #17 /var/www/mysite/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(178): Drupal\Core\Entity\EntityDisplayBase->__construct()
> #18 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityStorageBase.php(418): Drupal\Core\Entity\Entity\EntityViewDisplay->__construct()
> #19 /var/www/mysite/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(186): Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords()
> #20 /var/www/mysite/core/lib/Drupal/Core/Entity/EntityStorageBase.php(312): Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple()
> #21 /var/www/mysite/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php(136): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
> #22 /var/www/mysite/core/modules/media/media.post_update.php(32): Drupal\Core\Config\Entity\ConfigEntityUpdater->update()
> #23 /var/www/mysite/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(280): media_post_update_oembed_loading_attribute()
> #24 /var/www/mysite/vendor/drush/drush/includes/batch.inc(245): Drush\Commands\core\UpdateDBCommands::updateDoOnePostUpdate()
> #25 /var/www/mysite/vendor/drush/drush/includes/batch.inc(192): _drush_batch_worker()
πŸ‡ΊπŸ‡ΈUnited States msangha

I am also having the same issue related to views conditional field in my views. This is after I upgraded from D9.5.x do D10.1.x.

I was able to create my own patch but after core gets updated the changes are over-ridden.

I modified this file:
core/lib/Drupal/Component/Render/FormattableMarkup.php

This is the function I modified. I added the switch 'c':

  protected static function placeholderFormat($string, array $args) {
    // Transform arguments before inserting them.
    foreach ($args as $key => $value) {
      if (is_null($value)) {
        // It's probably a bug to provide a null value for the placeholder arg,
        // and in D11 this will no longer be allowed. When this trigger_error
        // is removed, also remove isset $value checks inside the switch{}
        // below.
        @trigger_error(sprintf('Deprecated NULL placeholder value for key (%s) in: "%s". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826', (string) $key, (string) $string), E_USER_DEPRECATED);
        $value = '';
      }
      switch ($key[0]) {
        case '@':
          // Escape if the value is not an object from a class that implements
          // \Drupal\Component\Render\MarkupInterface, for example strings will
          // be escaped.
          // Strings that are safe within HTML fragments, but not within other
          // contexts, may still be an instance of
          // \Drupal\Component\Render\MarkupInterface, so this placeholder type
          // must not be used within HTML attributes, JavaScript, or CSS.
          $args[$key] = static::placeholderEscape($value);
          break;

        case ':':
          // Strip URL protocols that can be XSS vectors.
          $value = UrlHelper::stripDangerousProtocols($value);
          // Escape unconditionally, without checking whether the value is an
          // instance of \Drupal\Component\Render\MarkupInterface. This forces
          // characters that are unsafe for use in an "href" HTML attribute to
          // be encoded. If a caller wants to pass a value that is extracted
          // from HTML and therefore is already HTML encoded, it must invoke
          // \Drupal\Component\Render\OutputStrategyInterface::renderFromHtml()
          // on it prior to passing it in as a placeholder value of this type.
          // @todo Add some advice and stronger warnings.
          //   https://www.drupal.org/node/2569041.
          $args[$key] = Html::escape($value);
          break;

        case '%':
          // Similarly to @, escape non-safe values. Also, add wrapping markup
          // in order to render as a placeholder. Not for use within attributes,
          // per the warning above about
          // \Drupal\Component\Render\MarkupInterface and also due to the
          // wrapping markup.
          $args[$key] = '<em class="placeholder">' . static::placeholderEscape($value) . '</em>';
          break;
					
	case 'c':
	   // 7-7-23 Copied Case @ because was getting placholder error after upgrade to D10.1.1
	  $args[$key] = static::placeholderEscape($value);
	  break;

        default:
          // Warn for random variables that won't be replaced.
          trigger_error(sprintf('Invalid placeholder (%s) with string: "%s"', $key, $string), E_USER_WARNING);
          // No replacement possible therefore we can discard the argument.
          unset($args[$key]);
          break;
      }
    }
Production build 0.69.0 2024