Account created on 3 July 2017, about 7 years ago
#

Merge Requests

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Step 1: create a datatime field in any content type
step 2: Render the datatime field in twig file.
step 3: Check the time tag <time datetime="2024-09-05T04:09:23Z">05/09/2024 12:09</time>

Both datatime and displayed time is different

Solution: In DateTimeFormatterBase.php field formatter, we need update the below code to fix this issue.

Current one in Core:

protected function buildDateWithIsoAttribute(DrupalDateTime $date) {
    // Create the ISO date in Universal Time.
    $iso_date = $date->format("Y-m-d\TH:i:s") . 'Z';
    $this->setTimeZone($date);

    $build = [
      '#theme' => 'time',
      '#text' => $this->formatDate($date),
      '#attributes' => [
        'datetime' => $iso_date,
      ],
      '#cache' => [
        'contexts' => [
          'timezone',
        ],
      ],
    ];

    return $build;
  }

Solution: We need to move above $this->setTimeZone($date); to iso_date field conversion.

protected function buildDateWithIsoAttribute(DrupalDateTime $date) {
    // Create the ISO date in Universal Time.
    $this->setTimeZone($date);
    $iso_date = $date->format("Y-m-d\TH:i:s") . 'Z';

    $build = [
      '#theme' => 'time',
      '#text' => $this->formatDate($date),
      '#attributes' => [
        'datetime' => $iso_date,
      ],
      '#cache' => [
        'contexts' => [
          'timezone',
        ],
      ],
    ];

    return $build;
  }
๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Currently, i am patching the plugin id as empty as below

diff --git a/layout_builder_styles.module b/layout_builder_styles.module
index 99d83f1..c39d150 100644
--- a/layout_builder_styles.module
+++ b/layout_builder_styles.module
@@ -19,9 +19,7 @@ function layout_builder_styles_form_alter(&$form, FormStateInterface $formState)
/** @var \Drupal\layout_builder\Form\ConfigureBlockFormBase $formObject */
$formObject = $formState->getFormObject();

- $blockPluginId = $formObject
- ->getCurrentComponent()
- ->getPluginId();
+ $blockPluginId = "";

$bundle = FALSE;
// If this is a reusable block, retrieve the block bundle.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Hi abhinesh.

Thank you, and after updating the core, its working fine now

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Thanks @abhinesh,

Yes, there was a dependency module paragraphs_ee and updated to latest. now working fine.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Hi abhinesh,

Thanks for the new version. but this module is included in https://www.drupal.org/project/ezcontent/releases/2.2.9 โ†’ . can you please update the ezcontent also

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Any update on the above issue? after upgrading drupal 9.5 to Drupal 10.2.2

When viewing "/admin/content/files" it has a hard error and the page is unusable.

The website encountered an unexpected error. Try again later.

InvalidArgumentException: A path was passed when a fully qualified domain was expected. in Drupal\Component\Utility\UrlHelper::externalIsLocal() (line 305 of core/lib/Drupal/Component/Utility/UrlHelper.php).
Drupal\Core\File\FileUrlGenerator->generate('cloudinary://xxxx/images/2023/09/26/test_1695696987.jpeg') (Line: 99)
Drupal\file\Plugin\Field\FieldFormatter\BaseFieldFileFormatterBase->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 268)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 269)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 226)
Drupal\Core\Entity\Entity\EntityViewDisplay->build(Object) (Line: 460)
Drupal\Core\Entity\EntityViewBuilder->viewField(Object, Array) (Line: 243)

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Thanks, Eugen Zerr. After applying the patch, its working fine.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

The same issue is happening to me also. after upgrading D9 to D10. some of the field group fileset are not visible in manage form display

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Thanks @abhinesh

Now its working fine.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

kmani โ†’ changed the visibility of the branch 3412668-srijanoneezcontent-2.2.7-requires to active.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

kmani โ†’ changed the visibility of the branch 3412668-srijanoneezcontent-2.2.7-requires to hidden.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

kmani โ†’ changed the visibility of the branch 3412668-srijanoneezcontent-2.2.7-requires to hidden.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

kmani โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

kmani โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Use messenger interface to display messages while redirecting

use Drupal\Core\Messenger\MessengerInterface;

$this->messenger->addMessage('This is a warning message (orange)', TRUE);

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

This is because of FormattableMarkup and the image source has to convert markup.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

Me too having same issue.

๐Ÿ‡ฎ๐Ÿ‡ณIndia kmani

#15 works for me

Production build 0.71.5 2024