Kiev, Ukraine
Account created on 30 January 2009, almost 16 years ago
#

Merge Requests

More

Recent comments

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Added 'datetime' field type.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

@mark_fullmer, you are right. I didn't see #3317769 before. Thank you very much for the quick response, and have a tremendous day.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you, @mark_fullmer, for your reply.
I am looking again.

A fresh D10 site enabled the Linkit module v 7.0.0-alpha1 and media macher.
Create two media 1.jpg and 2.png.
In CKeditor
Create a node with "Text Link" text and two images (one image inserted as media, one uploaded as file).
Link all elements to "2.png" media.

A source code will be

<p>
    <a href="/media/4" data-entity-type="media" data-entity-uuid="2142ef3f-60e0-4115-80ce-8d460aa5406a" data-entity-substitution="media">Text Link</a>
</p>
<a href="/media/4"><drupal-media data-entity-type="media" data-entity-uuid="c390e8a9-0b66-4c44-8bd3-dd79b95d4c65">&nbsp;</drupal-media></a>
<a href="/media/4"><img src="/sites/default/files/inline-images/3.jpg" data-entity-uuid="3d311f2c-0dad-4ef6-a1ec-949d0c069523" data-entity-type="file" width="1800" height="943"></a>

Rendered HTML will be

<p>
  <a href="/sites/default/files/2024-11/2.pdf" 
     data-entity-type="media"  
     data-entity-uuid="2142ef3f-60e0-4115-80ce-8d460aa5406a" 
     data-entity-substitution="media" title="2.pdf">Text Link</a>
</p>
<a href="/media/4">
  <div class="media media--type-image media--view-mode-default">
    <div class="field field--name-field-media-image field--type-image field--label-visually_hidden">
      <div class="field__label visually-hidden">Image</div>
      <div class="field__item">
        <img loading="lazy" src="/sites/default/files/styles/large/public/2024-11/1.jpg.webp?itok=5BbDYn1H"
                                    width="480" height="251" alt="test">
      </div>
    </div>
  </div>
</a>
<a href="/media/4">
  <img data-entity-uuid="3d311f2c-0dad-4ef6-a1ec-949d0c069523" 
       data-entity-type="file"
       src="/sites/default/files/inline-images/3.jpg" width="1800" height="943"
                            loading="lazy">
</a>

So, it works nicely with texts but has media issues.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you, @pianomansam. Have a great time.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I apologize. I meant a new release for Drupal v11.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Will be great if we will have a release for Drupal 10.3.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Yes, we can do as @flyke proposed at #27.
+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

+1 for an official Drupal 11 release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Reviewed MR14 . Looks good for me.
+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

+1 for an official release. Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Reviewed MR12. Looks good for me.
+1 for an official release.
Thanks for working on this!

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Reviewed. I believe we can have a new version for Drupal 11 as soon as possible. Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Reviewed. I believe we can have a new version for Drupal 11 as soon as possible. Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I believe we can have a new version for Drupal 11 as soon as possible. Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Reviewed. I believe we can have a new version for Drupal 11 as soon as possible. Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I believe we can have a new version for Drupal 11 as soon as possible. Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I believe we should create a new release for Drupal 11 as soon as possible.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I believe we should to create a new release for Drupal 11 as soon as possible.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Created MR !6. Also I have removed "Information added by Drupal.org". This information will be added for each release automatically. I think we can create a new release for Drupal 11 as soon as possible.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Is it possible to make a new release for Drupal 11?

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you @flyke.
I think need to create a new release ASAP.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I can apply #8 patch to filefield_paths:1.0.0.0-beta7.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Is this issue again in 6.1.4 and 7.0.0-alpha1 or did I miss something?
With "Direct URL to media file entity" option I see an URL like media/XXX.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

I have committed a simple fix.
It can be improved if required by using regex. Also "if (filter_var($string, FILTER_VALIDATE_EMAIL))" can be replaced with something like "\Drupal::service('email.validator')->isValid($string)".
I decided to use explode() instead of preg_replace() because explode() will work faster.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you, ELC. It was merged into DEV. I will have a look later.
Regarding to tests. Currently, I don't have free time to write this today. I am in Ukraine, and I have other priorities. If someone is willing and able to do it, I appreciate it more.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

This patch #2 works for us with "Drupal 10.1.8" and "Recurring Date Field Modular Widgets 3.1.0". Thank you.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

MR !6 can be applied to beta-1, but not to beta-2. Will try to improve it.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

This is temporary solution for review because I don't have the original ckeditor_templates.js.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

This is not a duplicate. This issue appeared after this task #3426330 🐛 Catch exception on lookup of matching redirects when creating a breadcrumb Fixed was released.
If we want to close the current task #3439365, we should reopen #3426330 🐛 Catch exception on lookup of matching redirects when creating a breadcrumb Fixed .

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

It can be resolved by custom module.

Apply this patch https://www.drupal.org/project/user_csv_import/issues/3380676 Allows altering a user during importing Needs review .

Add code like:

/**
 * Implements hook_user_csv_import_create_user_alter().
 */
function custom_module_user_csv_import_create_user_alter(UserInterface &$user, $values): void {
  if ($user->hasField('field_department')
    && $values['field_department'] !== '') {
    $tid = custom_module_create_terms('person_department', [$values['field_department']]);
    $user->set('field_department', $tid);
    $user->save();
  }
}

/**
 * Create the terms.
 *
 * @param $vid
 * @param array $values
 *
 * @return array
 * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
 * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
 * @throws \Drupal\Core\Entity\EntityStorageException
 */
function custom_module_create_terms($vid, array $values = []): array {
  $terms = [];

  foreach ($values as $value) {
    if ($value != '') {
      $term = custom_module_get_tid_by_name($value, $vid);
      if ($term === FALSE) {
        $term = \Drupal::entityTypeManager()
          ->getStorage('taxonomy_term')
          ->create([
            'parent' => [],
            'name' => $value,
            'vid' => $vid,
          ]);

        $term->save();
      }
      $terms[] = $term;
    }
  }

  return $terms;
}

/**
 * Find term by name and vid.
 *
 * @param $name
 * @param $vid
 *
 * @return false
 * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
 * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
 */
function custom_module_get_tid_by_name($name = NULL, $vid = NULL) {
  $term = custom_module_get_term_by_name($name, $vid);

  return !empty($term) ? $term->id() : FALSE;
}

/**
 * Get term by name.
 *
 * @param $name
 * @param $vid
 *
 * @return false|mixed
 * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
 * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
 */
function custom_module_get_term_by_name($name = NULL, $vid = NULL): mixed {
  $properties = [];
  if (!empty($name)) {
    $properties['name'] = $name;
  }
  if (!empty($vid)) {
    $properties['vid'] = $vid;
  }

  $terms = \Drupal::entityTypeManager()
    ->getStorage('taxonomy_term')
    ->loadByProperties($properties);
  $term = reset($terms);

  return !empty($term) ? $term : FALSE;
}
🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Sorry. For dev branch works well.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

@nicholasThompson, after your commit I see the following:

- Installing drupal/user_csv_import (2.0.3): Extracting archive
- Applying patches for drupal/user_csv_import
https://git.drupalcode.org/project/user_csv_import/-/merge_requests/4.diff (3380676: Allows altering a user during importing)
Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/user_csv_import/-/merge_requests/4.diff

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Updated merge request. Drupal 9, 10 compatibility for jQuery UI Filter. Remove jQuery dependency from the once feature.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Ruslan Piskarov made their first commit to this issue’s fork.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you @sakthi_dev. Works well for me.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

@Greg Boggs,
Created 2.0.0-alpha1.
Thank you for your helping.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Ruslan Piskarov made their first commit to this issue’s fork.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

The ckeditor_templates.js is compressed. I don't see an original in repository. Created a pull request for compressed ckeditor_templates.js.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

If I remember correctly the ['entity'] will appear if embed a view with enabled ajax in pagination.
First time it mentioned at #10.
I can't test today. Need improve a patch.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Added 'boolean' mentioned in #23.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Created a Fork with an implementation. Please review.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Created an initial patch. Not sure that is the best solution because I am not familiar with date_recur module. Still need to work, create tests, etc.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Fixed the issue when a view has ajax enabled and pagination doesn't work.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Thank you @ELC for great work.
Created a new 8.x-1.3 release with this improving.

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

Improvered. Covered more cases, like [paragraph:field_taxonomy_ref:target_id].

🇺🇦Ukraine Ruslan Piskarov Kiev, Ukraine

@Sandeep_k,
On /admin/config/content/embed/button/manage/media_directories choose the Media type = Image and the Entity browser "Media Directories: Editor widget"?
On /admin/config/content/formats/manage/full_html add "Insert Media" widget (media_directories).

Production build 0.71.5 2024