Account created on 23 August 2022, about 2 years ago
  • Associate Software Engineer at Vardot 
#

Merge Requests

More

Recent comments

🇯🇴Jordan Ahmad Khader

Drupal 10 compatibility and code standards fixes as patch.

🇯🇴Jordan Ahmad Khader

I tested the patch mentioned in #12, and it was successful for me. However, I believe we should format the hiddenInput to INTERNATIONAL rather than E164, as the placeholder suggests the presence of spaces.

It would be nice if in the future we added a format option to display the field

🇯🇴Jordan Ahmad Khader

@smustgrave, I don't believe we need test coverage for this, as the main issue is that certain components from modules disrupt core functionality. I don't think this should be the case.

For instance, consider the moderation_sidebar module from #7 comment, where the element possesses the attribute data-dialog-renderer but lacks a contextual link.

🇯🇴Jordan Ahmad Khader

Remove handleTranslationAccess since it disables the layout builder on translations.

  protected function handleTranslationAccess(AccessResult $result, $operation, AccountInterface $account) {
    $entity = $this->getEntity();
    // Access is always denied on non-default translations.
    return $result->andIf(AccessResult::allowedIf(!($entity instanceof TranslatableInterface && !$entity->isDefaultTranslation())))->addCacheableDependency($entity);
  }
🇯🇴Jordan Ahmad Khader

Note that normal users who don't have access to the layout builder manage or edit won't have access.
The problem is that the layout builder is enabled without actually being enabled.

🇯🇴Jordan Ahmad Khader

Thanks, Rajab for your feedback on this issue.
I don't think this is a vulnerability issue as normal users who don't have access to the layout builder manage or edit won't have access.
The problem is that the layout builder is enabled without actually being enabled.

🇯🇴Jordan Ahmad Khader

@rajab_natshah,
Hmmm, It's differently an issue but I think it's unrelated to this error since disabling the Responsive Theme Preview module won't fix the error.

I added a patch to test global object properties fix.

🇯🇴Jordan Ahmad Khader

hi @rajab_natshah
I have switched to bootstrap.bundle.min.js in my projects due to this error, along with other issues related to Bootstrap components. You can read more about it here: https://stackoverflow.com/questions/68750341/bootstrap-5-uncaught-typeer....

However, if you prefer to resolve the issue without transitioning to the bundled version, you must modify the global property from global["@popperjs/core"] to global. Popper in dropdown.js. This adjustment is necessary as it addresses the underlying issue. It is essential to ensure that the global properties are correctly defined and accessible. Utilizing string-based property access (global["@popperjs/core"]) is less common and may lead to complications if the global object properties are not configured as anticipated.

🇯🇴Jordan Ahmad Khader

Hmmmm.
I removed the failsafe but it didn't fix the problem.

I think the main issue is that $el.off('transitionend', transitioning); isn't removing the event for some reason. The debugger says it's removed but events trigger anyway maybe something to do with Drupal.behavior and off function.

🇯🇴Jordan Ahmad Khader

Hi alfthecat,
It might be late to answer your comment but tmgmt is designed intentionally not to override any translation requests that has those states unfournntally you need to abort them manually or using updb hook.

🇯🇴Jordan Ahmad Khader

The issue is the media-oembed-iframe--remote-video--varbase-media-header.html.twig is not being recognized on the base theme hook.

🇯🇴Jordan Ahmad Khader

The issue is the media-oembed-iframe--remote-video--heroslider.html is not being recognized on the base theme hook.

🇯🇴Jordan Ahmad Khader

Here's the problem: not every instance.element has contextual links. Previously, jQuery would tolerate calling attr('id') on null and return undefined. However, vanilla JS does not behave the same way; it throws an error, and halts the contextual links, as you mentioned.

A couple of elements that don't have contextual links
" />

There is also some contrib/custom.

🇯🇴Jordan Ahmad Khader

This issue appears to break the settings tray, causing contextual links to disappear. please review
https://www.drupal.org/project/drupal/issues/3458067 🐛 Contextual links disappear intermittently leading to console errors Active Unable to find closestSettingsTray;

🇯🇴Jordan Ahmad Khader

Reverting this issue seems to fix it https://www.drupal.org/project/drupal/issues/3238868 📌 Refactor some uses of the jQuery parents function to use vanillaJS Fixed

🇯🇴Jordan Ahmad Khader

This also seems to break the Contextual links, please check https://www.drupal.org/project/drupal/issues/3458067 🐛 Contextual links disappear intermittently leading to console errors Active

🇯🇴Jordan Ahmad Khader

You are right, thank you for highlighting the issue, and uninstalling settings_tray. has fixed the problem. I initially thought it was a Contextual links issue because of the full trace error.
a

🇯🇴Jordan Ahmad Khader

#34 Not really, Gin uses its own message.js to render AJAX messages; that's why it didn't change. However, if we debug the Twig file, we will see that it doesn't use templates/misc/status-messages.html.twig when BigPipe is enabled (AJAX message).

🇯🇴Jordan Ahmad Khader

Removing the following code makes it work normally I assume when it's removed it stops using templates/misc/status-messages.html.twig' file

          // Delete all messages that were generated during the rendering of this
          // placeholder, to render them in a BigPipe-optimized way.
          $messages = $this->messenger->deleteAll();
          foreach ($messages as $type => $type_messages) {
            foreach ($type_messages as $message) {
              $ajax_response->addCommand(new MessageCommand($message, NULL, ['type' => $type], FALSE));
            }
          }
🇯🇴Jordan Ahmad Khader

No issue appeared before and after the update to Drupal ~10.3.0

After the fix

🇯🇴Jordan Ahmad Khader

Without button_option ( https://www.drupal.org/project/varbase_layout_builder/issues/3456925#com... Inherit Linkit module to Varbase Buttons Block Needs review ) patch

🇯🇴Jordan Ahmad Khader

I think it is a value issue as you can produce it without any custom code and using only the widget given.

🇯🇴Jordan Ahmad Khader

the issue is that the administrator doesn't enter _password_policy_user_profile_form_update_fields validation which resets the expiration password.

🇯🇴Jordan Ahmad Khader

#Rajab Natshah patch can work in both ways. We still need it for ckeditor5 and I also want to showcase the functionality on ckeditor4, so we might be able to find a way to embed the plugin in ckeditor5. its also for people who haven't seen the plugin before so they have the chance to see it.

There are a couple of challenges we will face in trying to achieve this:

  1. The Drupallink core has changed its plugin name to 'link', which is what we used to call our Link plugin.
  2. Ckeditor5 has removed the advanced link widget, so we might face issues in building our plugin.
🇯🇴Jordan Ahmad Khader

Note that if you're using a version lower than 8.x-2.0 you might need to double-check and change the following from;

    return [
      'LinkToAnchor' => [
        'label' => $this->t('Link to anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/link.png',
      ],
      'UnlinkAnchor' => [
        'label' => $this->t('Unlink Anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/unlink.png',
      ],
      'Anchor' => [
        'label' => $this->t('Anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/anchor.png',
      ],
    ];

To:

    return [
      'Link' => [
        'label' => $this->t('Link to anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/link.png',
      ],
      'Unlink' => [
        'label' => $this->t('Unlink Anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/unlink.png',
      ],
      'Anchor' => [
        'label' => $this->t('Anchor'),
        'image' => $anchor_link_path . '/js/plugins/link/icons/anchor.png',
      ],
    ];

And then resave the editor. add Link and Unlink buttons in CKEditor

🇯🇴Jordan Ahmad Khader

#Dylan Donkersgoed For testing
3.0.x-dev on ckeditor4
ckeditor4 breaks when you add a link/unlink using 3.0.x-dex

🇯🇴Jordan Ahmad Khader

Using 🐛 path.alias_repository service does not use a proper language fallback mechanism Needs work and the commit https://git.drupalcode.org/project/language_hierarchy/-/commit/c3731dfd0..., I can confirm that URL aliases function properly on Drupal 10.x. Thanks for your awesome work, James Williams.

🇯🇴Jordan Ahmad Khader

I'm having a similar issue but assert already exists there

The website encountered an unexpected error. Please try again later.
Error: Call to a member function subtract() on null in Drupal\google_tag\Plugin\GoogleTag\Event\Commerce\AddToCartEvent->getData() (line 44 of modules/contrib/google_tag/src/Plugin/GoogleTag/Event/Commerce/AddToCartEvent.php).
Drupal\google_tag\Plugin\GoogleTag\Event\Commerce\AddToCartEvent->getData() (Line: 147)
google_tag_page_attachments(Array) (Line: 315)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}(Object, 'google_tag') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('page_attachments', Object) (Line: 316)
Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks(Array) (Line: 289)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 290)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 718)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
🇯🇴Jordan Ahmad Khader

Ahmad Khader changed the visibility of the branch 3442854-add-ckeditor-5 to hidden.

🇯🇴Jordan Ahmad Khader

Ahmad Khader changed the visibility of the branch 3442854-add-ckeditor-5 to hidden.

🇯🇴Jordan Ahmad Khader

Please check if this issues ticket's patch to Missing views bulk operations on the media library view. 🐛 Missing views bulk operations on the media library view Needs review

🇯🇴Jordan Ahmad Khader

Please note that this issue is related to Missing views bulk operations on the media library view 🐛 Missing views bulk operations on the media library view Needs review .

🇯🇴Jordan Ahmad Khader

I can conform that the patch fixes the problem.

🇯🇴Jordan Ahmad Khader

Note that for ckeditor5_table changing property does actually reflect after saving and works normally

https://www.drupal.org/forum/support/post-installation/2023-10-19/how-ca...

/**
 * Implements hook_ckeditor5_plugin_info_alter().
 */
function ckeditor_config_ckeditor5_plugin_info_alter(array &$plugin_definitions) {
  if (isset($plugin_definitions['ckeditor5_table'])) {
    $table_plugin_definition = $plugin_definitions['ckeditor5_table']->toArray();
    $table_plugin_definition['ckeditor5']['config']['table']['defaultHeadings'] = [
      'rows' => 1,
      'columns' => 0,
    ];
    $plugin_definitions['ckeditor5_table'] = new CKEditor5PluginDefinition($table_plugin_definition);
  }
}
Production build 0.71.5 2024