Account created on 8 November 2012, almost 13 years ago
  • Senior Drupal Developer at ImageX 
  • Drupal Architect at CI&T 
#

Merge Requests

More

Recent comments

🇧🇷Brazil andre.bonon

Works for me on Drupal 10.4.3.
I was able to see the language being updated during the process, and I could retrieve the right config values.

🇧🇷Brazil andre.bonon

andre.bonon changed the visibility of the branch 3541242-domain-config-overrides-beta3 to hidden.

🇧🇷Brazil andre.bonon

andre.bonon changed the visibility of the branch 3541242-domain-config-overrides to hidden.

🇧🇷Brazil andre.bonon

Just re-rolled the patch against the latest dev 2.0.x

🇧🇷Brazil andre.bonon

Attaching the latest changes that are compatible with the beta2 release.

🇧🇷Brazil andre.bonon

I tested this patch against the 2.0.x-dev branch, and it works for me.

🇧🇷Brazil andre.bonon

andre.bonon changed the visibility of the branch 3539379-integrate-tugboat to active.

🇧🇷Brazil andre.bonon

andre.bonon changed the visibility of the branch 3539379-integrate-tugboat to hidden.

🇧🇷Brazil andre.bonon

I’ve added configuration files to enable Layout Builder by default on the Basic Page content type. I also set the Gin theme as the default theme.

🇧🇷Brazil andre.bonon

@smustgrave could you have one last look at this?

🇧🇷Brazil andre.bonon

I’ve added a new configuration option to the Entity Reference field settings that allows site builders to enable the behavior of displaying all field instances. This functionality is currently scoped to Entity Reference fields only, as extending it to other field types would require a more significant refactor across multiple widget implementations.

I’ve also added test coverage for this new setting, following the structure of the existing tests.

🇧🇷Brazil andre.bonon

@smustgrave, not all sites have the inline_entity_form installed, so it needs to check if the module exists before executing.

https://git.drupalcode.org/project/field_config_cardinality/-/merge_requ...

🇧🇷Brazil andre.bonon

MR to 3.x and 4.0.x are submitted now.

🇧🇷Brazil andre.bonon

andre.bonon made their first commit to this issue’s fork.

🇧🇷Brazil andre.bonon

I just tested the patch for 4.x, and it still works as expected with the ‘Autocomplete’ widget. I tested it using both the Gin and Claro admin themes.

🇧🇷Brazil andre.bonon

Unfortunately, the Newsletter (ConfigEntityType) doesn’t provide hasTranslation() or getTranslation() methods like ContentEntityType does.
As a result, I had to use the language manager service and manually fetch each translation—for both the Reason and the Subject—in different files.

This works for now, but further improvements will be needed to support translations more robustly in the future.
It might be worth considering adding translation-handling methods directly to the Newsletter class.

🇧🇷Brazil andre.bonon

Hi, I created this bug https://www.drupal.org/project/simplenews/issues/3534572 🐛 Unsubscribe link uses outdated 'langcode' option in Url::fromRoute(), resulting in incorrect language in generated URL Active , but I noticed later that this is already fixed. However, it hasn't been merged.
Is there a plan for the next release?

🇧🇷Brazil andre.bonon

I noticed that this is already fixed by https://www.drupal.org/project/simplenews/issues/3317849 🐛 Multilingual tokens are not translated Needs work , but has not been merged yet.

🇧🇷Brazil andre.bonon

I set up a new sandbox and was able to identify what was missing in the original one.
It turns out the Index hierarchy processor wasn’t enabled on the site where I encountered the issue.

I'm not sure if the ShowParents processor is still needed.

🇧🇷Brazil andre.bonon

Test steps

  1. Enable Required Modules
    Ensure the following modules are enabled:
    • - Media
    • - Media Library
    • - CKEditor
    • - Plyr
  2. Configure the Media Type
    • - Go to Structure > Media types > Remote video > Manage display.
    • - For the Default display mode, set the Video URL field (or equivalent) to use the Plyr formatter.
    • - Save the configuration.
  3. Configure Text Format for CKEditor
    • - Go to Configuration > Content authoring > Text formats and editors.
    • - Edit the text format used by your content type (e.g., Full HTML or Basic HTML).
    • - Under Enabled filters, ensure the Embed media is enabled
    • - Under Editor settings, make sure the Insert media button is added to the CKEditor toolbar.
    • - Save the configuration.
  4. Test Embedding a Remote Video via CKEditor
    • - Go to Content > Add content and select a content type that includes a Body field (e.g., Article).
    • -In the Body field, verify that the Insert media icon is visible in the CKEditor toolbar.
    • - Click the Insert media icon.
    • - In the media library modal, select an existing Remote video media item or create a new one using a valid YouTube or Vimeo URL.
    • - Insert the media into the editor.
    • - Verify that the video preview is rendered inline within the CKEditor (not just a placeholder).
    • - Save the content.
    • - On the front-end, confirm that the video is rendered using the Plyr player
  5. Test Embedding a Remote Video via CKEditor inside Layout Builder Modal
    • - Ensure that Layout Builder and Layout Builder Modal are enabled
    • - Go to Structure > Content types > [Your Content Type] > Manage display.
    • - Enable Layout Builder for the content type. Enable the "Allow each content item to have its layout customized" option.
    • - Create or edit a node of that content type and click Layout
    • - In the Layout Builder interface, click Add block and choose a Basic block that contains a Body field using CKEditor.
    • - In the Layout Builder Modal that opens, locate the Body field and ensure the Insert media icon is present in the CKEditor toolbar.
    • - Click the Insert media icon.
    • - Select an existing Remote video media item or create a new one using a valid YouTube or Vimeo URL via the media library modal.
    • - Insert the media item into the editor.
    • - Verify that the video preview is rendered inline within the CKEditor (not as a token or placeholder).
    • - Click Update and then Save Layout.
    • - View the node and confirm that the video is rendered using the Plyr player as expected.
🇧🇷Brazil andre.bonon

Adding the patch file that could be used with composer.

🇧🇷Brazil andre.bonon

This feature request is still relevant. I’ve re-targeted the issue to the 8.x-1.x-dev branch.
I plan to submit a merge request with the feature in my next contribution.

🇧🇷Brazil andre.bonon

This is how it is rendered in filter settings.

🇧🇷Brazil andre.bonon

I assumed this new processor should only work with taxonomy terms, so I added the same check used in TermWeightWidgetOrderProcessor. To avoid duplicating code, I encapsulated the logic into a trait and updated that class to use it as well.

🇧🇷Brazil andre.bonon

I tested the patch on Facets 3.0, and it worked, but I had to make some changes. I had to implement the supportsFacet() method to work properly with facets_exposed_filters.
I’ll create a fork soon.

🇧🇷Brazil andre.bonon

If you are using Facets exposed filters, you can try to hook the exposed filter form and attach #states to the fields.
There is a related discussion here 💬 How to achieve facet dependencies in 3.x facets exposed filters? Active .

🇧🇷Brazil andre.bonon

I’ve successfully implemented hook_preprocess_views_exposed_form() to attach #states to a specific field, and it worked

Given that exposed filters are form-based, a possible solution would implement a processor that mimics the #state management approach used in Webforms. This processor would automatically apply #states to each field.

🇧🇷Brazil andre.bonon

I've got a similar situation with a webform where one field controls the visibility of another and it is replaced by an Ajax call. I tried out both Patch #2 and the MR, and I can confirm that the MR still hasn't fixed the issue, but Patch #2 has.
Drupal version: 10.3.1

🇧🇷Brazil andre.bonon

Is openy_carnation still compatible with 10.0.x?

Regardless of what we decide, I've pushed a fix to ensure the exception is an instance of NotFoundHttpException, because in some cases the Exception might be of another type and the response doesn't have a status code.

🇧🇷Brazil andre.bonon

This piece of code is no longer needed (these templates are suggested by default now):

// Adds template suggestions for 40x pages.
  $http_error_suggestions = [
    'system.403' => 'page__403',
    'system.404' => 'page__404',
  ];
  $route_name = \Drupal::routeMatch()->getRouteName();
  if (isset($http_error_suggestions[$route_name])) {
    $suggestions[] = $http_error_suggestions[$route_name];
  }
🇧🇷Brazil andre.bonon

I understand, however, there are some sites that, for their own reasons, cannot be upgraded to version 7 of the module.
I appreciate your effort, but this is about a single line already merged on 7.x.

🇧🇷Brazil andre.bonon

I'm uploading the fix as a patch so devs can use with composer.

🇧🇷Brazil andre.bonon

I saw on the module's homepage "6.0.x = is the current active development branch and currently supports D9 + D10", so I'm re-rolling this fix to the 6.0.x too.

🇧🇷Brazil andre.bonon

I am adding the patch file so the devs can apply the fix.

🇧🇷Brazil andre.bonon

Attaching a patch file from the MR 8779 which applies to Drupal 10.2.x. (tested on 10.2.7) , to be used with composer patches.
It fixes an Ajax error from happening with the Layout builder modal and Drupal-off-canvas that wasn't fixed by the #126.
The Ajax error was preventing the LB modal from closing.

🇧🇷Brazil andre.bonon

I'm testing this module and as I can see the "Limit allowed HTML tags and correct faulty HTML" filter removes the data attributes responsible for alignment in the drupal-media tag:
On Ckeditor:
<drupal-media class="image_resized" style="width:359px;" data-media-width="359px" data-entity-type="media" data-entity-uuid="a77a9f7c-a834-4bea-9a80-bc8169ee7587" data-view-mode="cke_media_resize_large" data-align="center">&nbsp;</drupal-media>

On the page:
Expected:
<div class="image_resized align-center media-embed-resized" style="width:359px;">

Actual result:
<div class="media-embed-resized" style="width:359px;">

I also tried the Extended HTML Filter module, but I had no success even applying the following patches:

  1. core:
    1. https://www.drupal.org/project/drupal/issues/3226368 🐛 FilterHtml accepts <*> but does not support it, resulting in inaccurate ::getHtmlRestrictions() return value Needs work
    2. https://www.drupal.org/files/issues/2024-02-26/3226368-40.patch
  2. extended_html_filter
    1. https://www.drupal.org/project/extended_html_filter/issues/3401513 Match the filter_html <> ckeditor5 integration in Drupal core Needs work
    2. https://git.drupalcode.org/project/extended_html_filter/-/merge_requests...

It is not possible to save the text format. This is what I get from validation:

Error message
The current CKEditor 5 build requires the following elements and attributes:
<br> <p> <* style dir="ltr rtl" lang>
The following elements are missing:
<* style>

I also tried to disable the "Limit allowed HTML tags and correct faulty HTML" filter, but the resize doesn't work without it.

Is there any solution for this issue?

🇧🇷Brazil andre.bonon

I executed the steps mentioned and applied the patch.
That works for me.

🇧🇷Brazil andre.bonon

This merge request broke ping pongs.
I rolled the version back to 9000 and tried to update again, and no new image style is created or displayed on the upgrade dashboard to be manually created.

Production build 0.71.5 2024