Account created on 18 July 2006, about 18 years ago
#

Recent comments

🇳🇱Netherlands cmseasy

Patch #11 works for me too on php 8.1.
Changed to RTBC.

🇳🇱Netherlands cmseasy

The rendering of the active items is back and ok now :).

In php8.1 I still have a log warning:

Warning: CurrentSearchItemActiveLinks::{closure}(): Argument #1 ($item) must be passed by reference, value given in CurrentSearchItemActiveLinks->execute() (regel 126 van ../modules/patched/current_search_links/plugins/item_active_links.inc).

This is my/your code with line 126 marked

      return [
        '#theme' => 'item_list',
        '#items' => array_map(function (&$item) {
          return drupal_render($item);
        }, $items),               //line 126
        '#attributes' => ['class' => $classes],
      ];

    }
  }
🇳🇱Netherlands cmseasy

And the screenshots

🇳🇱Netherlands cmseasy

I used the patch from MR.

I noticed that the active items are gone, not rendered after the patch.
To render the active items I changed some lines:

return [
        '#theme' => 'item_list',
        '#items' => array_map(function (&$item) {
          return $item;
        }, $items),
        '#attributes' => ['class' => $classes],
      ];
    }
  }

to

return [
        '#theme' => 'item_list',
        '#items' => array_map('drupal_render', array_map(function (&$item) {
          return $item;
        }, $items)),   //line136
        '#attributes' => ['class' => $classes],
      ];
    }
  }

The active links are rendered now, see screenshots.
This part of the code '#items' => array_map('drupal_render', array_map(function (&$item) { is in the origin code in my module, I don't know why, I think the original builders changed it to render the active links.

In the logs I have now:
Warning: drupal_render(): Argument #1 ($elements) must be passed by reference, value given in CurrentSearchItemActiveLinks->execute() (regel 136 van ../modules/patched/current_search_links/plugins/item_active_links.inc).
I marked line 136 above.

Sorry, I am a websitebuilder not a php coder. Hope you can help here.

🇳🇱Netherlands cmseasy

Hi abhishek_virasat, thanks for bug fixing this php8 issue.

After patching with #5 and a CC: on a search page I have two PHP warnings in the logs:

	Warning: drupal_render(): Argument #1 ($elements) must be passed by reference, value given in CurrentSearchItemActiveLinks->execute() (regel 127 van ../modules/patched/current_search_links/plugins/item_active_links.inc).


	Warning: CurrentSearchItemActiveLinks::{closure}(): Argument #1 ($item) must be passed by reference, value given in CurrentSearchItemActiveLinks->execute() (regel 127 van ../modules/patched/current_search_links/plugins/item_active_links.inc).

🇳🇱Netherlands cmseasy

Could someone create a patch for Drupal 7.98.
I am not a coder but would like to patch my site with the correct patch.
Thanks.

🇳🇱Netherlands cmseasy

Patch #35 does not apply to the latest drupal-7.98.

🇳🇱Netherlands cmseasy

I have a Dutch language site.
The patch did work for custum roles.
Not for anonymous (anonieme gebruiker) and authenticated (geverifieerde gebruiker).

Production build 0.71.5 2024