🇪🇸Spain @javier_rey

Account created on 5 February 2019, about 6 years ago
#

Recent comments

🇪🇸Spain javier_rey

This also happens to me, it would be great if at least there was some kind of configuration for the module to be able to hide the debug logger in the code. A “silent” mode so to speak. Also it would only apply to the 4 in “assignMediaToGroups”.

🇪🇸Spain javier_rey

This has also happened to me in a Drupal 10.4.4.
Tested it at https://simplytest.me/

Steps to reproduce the error:

  1. Add a language to the web, in this case it will be English (default) and Spanish.
  2. In the language configuration, indicate that in English the prefix will be “en” and in Spanish it will be “es” (admin/config/regional/language/detection/url)
  3. Using the content type “basic page”, mark it as translatable and add an image media type field (not translatable)
  4. Mark as translatable also the media type “image”.
  5. Create 2 nodes in English, add an image to them and translate them into Spanish.

Now comes the problem:

  1. Create a view that shows the content type “basic page”.
  2. Add the image field with the format “thumbnail (important, with the other formats it works fine)”.
  3. Check the “link to content” option in the image field.
  4. When checking the English view, both images point to the corresponding nodes in English:
    1. https://master-teaibnpl96czl1tjspp5qwvhrsw7quru.tugboatqa.com/en/node/1
    2. https://master-teaibnpl96czl1tjspp5qwvhrsw7quru.tugboatqa.com/en/node/2
  5. But if we switch to Spanish, the 2 images point to the English node.
    1. https://master-teaibnpl96czl1tjspp5qwvhrsw7quru.tugboatqa.com/en/node/1 (should be /es/node/1)
    2. https://master-teaibnpl96czl1tjspp5qwvhrsw7quru.tugboatqa.com/en/node/2 (should be /es/node/2)

    So the problem seems to be that when selecting the thumbnail formatter, it is not picking up the correct language of the content it has to link to.

🇪🇸Spain javier_rey

This is also happening to me in a fresh install of Drupal 10.4.2 .

If you create a view and add the same filter 2 times (fixed and exposed), the query is incorrect.
For example, I want to display only B and C activities in a view, and I want to be able to expose that filter so that the users can choose between B and C.

SELECT "node_field_data"."created" AS "node_field_data_created", "node_field_data"."nid" AS "nid"
FROM
{node_field_data} "node_field_data"
INNER JOIN {node__field_tipo_de_actividad} "node__field_tipo_de_actividad" ON node_field_data.nid = node__field_tipo_de_actividad.entity_id AND node__field_tipo_de_actividad.deleted = '0'
LEFT JOIN {node__field_tipo_de_actividad} "node__field_tipo_de_actividad2" ON node_field_data.nid = node__field_tipo_de_actividad2.entity_id AND node__field_tipo_de_actividad2.field_tipo_de_actividad_target_id != '3'
WHERE ("node_field_data"."status" = '1') AND ("node_field_data"."type" IN ('page')) AND ((node__field_tipo_de_actividad.field_tipo_de_actividad_target_id IN('2', '3'))) AND ((node__field_tipo_de_actividad2.field_tipo_de_actividad_target_id = '3'))
ORDER BY "node_field_data_created" DESC
LIMIT 11 OFFSET 0
🇪🇸Spain javier_rey

The code works like a charm :)

🇪🇸Spain javier_rey

I agree. I had an old Drupal 10 project and when I re-launched the migrations with “item_selector: /” I found that they didn't work. Using “item_selector: 0” they work perfectly again.

🇪🇸Spain javier_rey

Maybe I'm doing something wrong. If I try setting the “Icon Class Name” field, the icon on the map does not show the class I have saved.

I have tested this on “https://simplytest.me/”, with Leaflet version 10.2.25.

🇪🇸Spain javier_rey

I think that the patch #44 has a bug. If you set a field with “Number of items to display = 0”, when you reach to the second "if”, the condition will be FALSE and will not hide unwanted fields.

if ($items_to_display = (int) $block_configuration['items_to_display']) {

      // If this is a multi-value block configured to not display all values,
      // remove those field items from the render array.
      $block_configuration = $block->getConfiguration();
      if (!$is_content_empty && isset($block_configuration['display_items']) && $block_configuration['display_items'] == 'display_some') {
        if ($items_to_display = (int) $block_configuration['items_to_display']) {
          $offset = (int) $block_configuration['offset'];
          $range = range(0, $content[0]['#items']->count());
          foreach ($range as $key) {
            $top_range = $offset + $items_to_display - 1;
            if ($key < $offset || $key > $top_range) {
              $content[0][$key]['#access'] = FALSE;
            }
          }
        }
      }
🇪🇸Spain javier_rey

After implementing this change, when installing a fresh install in a language other than English and using the “standard” installation profile, for example”, I get the following error:

the configuration objects have different language codes so they cannot be translated
🇪🇸Spain javier_rey

Without patch number 27, I get the warning mentioned in the issue.
But when applying it I don't get any "value" in the method "public function alterView(ViewExecutable $view, $value)" of my "
ViewsReferenceSetting custom setting.

My version is 2.0-beta7.

🇪🇸Spain javier_rey

I've been testing, and seems like this issue solves the problem: Library order asset weights do not work properly when a large number of javascript files is loaded between two jQuery UI libraries 🐛 Library order asset weights do not work properly when a large number of javascript files is loaded between two jQuery UI libraries Fixed

🇪🇸Spain javier_rey

This happens to me too and I don't see exactly what the problem is. As administrator it doesn't happen to me, but with a user with less permissions, it fails.

🇪🇸Spain javier_rey

Works fine in 8.x-2.9 and 9.5.5 core.

🇪🇸Spain javier_rey

Hi! I think there is a bug in the patch, as it is defined, in line 163, the variable "$render_array" is overwritten, losing the title of the view.

if ($plugin_types) {
        // Add a custom template if the title is available.
        $title = $view->getTitle();
        if (!empty($title)) {
          // If the title contains tokens, we need to render the view to
          // populate the rowTokens.
          if (strpos($title, '{{') !== FALSE) {
            $view->render();
            $title = $view->getTitle();
          }
          $render_array['title'] = [
            '#theme' => 'viewsreference__view_title',
            '#title' => $title,
          ];
        }
      }
      $render_array = $view->buildRenderable($display_id, $view->args, FALSE);

Also, when we return an empty array and we have the "Internal Page Cache" module enabled, the page cache is not being refreshed.

  1. Create a view block that lists basic pages with the "tag based" option.
  2. Insert the block as a field inside another type of content, such as a landing page.
  3. Open the landing page as anonymous and as a registered user.
  4. Create a basic page and reload the landing page as anonymous and as a registered user.

I've added a patch which imo fixes these two cases. I am not an expert, so if there are any problems any help is welcome.

🇪🇸Spain javier_rey

Adding a patch for the 10.1.x branch.

Production build 0.71.5 2024