Filter – transfer of a variable array to the add_filter of the plugins

I have this filter in a plugin

// Let the extensions add any menu before action buttons.
            $extended_tab_listings = apply_filters('rm_after_front_tabtitle_listing',array()); 
            foreach($extended_tab_listings as $tab){ ?>

I tried to merge the array to the filter as follows. Use a multi-dimensional array with filter and However, it doesn't work properly.

function nj_add_rm_after_front_tabtitle_listing() {
    // Add the titles of tabs we want

    $array = 
        'label' => "TEST",       
        'class' => "my-class",    
        'icon' => 'my-icon',   
        'id'  => '123',  

    return $array;
add_filter('rm_after_front_tabtitle_listing', 'nj_add_rm_after_front_tabtitle_listing');

What is the right way to pass the variables?

magento2.3.0 – Error filter template: Warning:> getimagesize

I really need help. For two days I tried to fix this, but nothing.

I try almost everything I know and everything I find a solution.

Error filtering template: Warning: getimagesize(http://xxx:8099/pub/media/sm/imageslider/images/nophoto.jpg):failed to open stream: Connection refused in /var/www/html/vendor/magento/framework/Image/Adapter/AbstractAdapter.php on line 305

I have nophoto.jpg I have image in this repository 777 permissions to all folders and 755 to I try to change all files etc/view.xml File. Nothing gives a result. Thanks a lot

7 – How can we display active filter values ​​in exposed views?

I need to display selected filter values ​​from views that show filters.

For example: If I choose OptionA from Filter-1(Select list) and OptionB from Filter-2(Select list), the results are sure to be filtered out, but together with that I want to display something like:

Active Filters: OptionA, OptionB, Reset

I tried using the display form as a block and another option available in views, but did not meet expectations. Can someone help me here?

8 – Hide items when loading, then show and reset when you click the filter to hide them with the general data filter

Maybe the title is not very clear, I will try to explain it better.
I have an isotope view where taxonomies (as a link) are filters and nodes are elements. In addition, I have to display the taxonomy descriptions (shown as full entities) when clicking on the appropriate taxonomy filter. The taxonomy description appears when I click the Taxonomy Filter link, and related nodes are filtered.
If I click on the general (*) data filter text, I have to hide the taxonomy description again.

I was able to find a way in an HTML demo and am trying to reproduce it in drupal8, but that doesn't seem to work, so I need help.

What I did:
I have assigned the general (*) data filter a class with the name "delete filter" and other filters a class "Filter Show" for Javascript selectors.
I have assigned two classes to the elements that I need to hide (the taxonomy descriptions) called "Categories" and "Elements to Hide". I also created a "Items to Show" class that replaces the "Items to Hide" when a filter is clicked and the JavaScript code is executed.

Here is the HTML code of the filters:

Then the code for the default hidden items (or page loading):

  • Casa

    Esistono innumerevoli variazioni dei passaggi del Lorem Ipsum, ma la maggior parte hanno subito delle variazioni del tempo, a causa dell’inserimento di passaggi ironici, o di sequenze casuali di caratteri palesemente poco verosimili.

  • Residenze speciali

    Il brano standard del Lorem Ipsum usato sin dal sedicesimo secolo è riprodotto qui di seguito per coloro che fossero interessati. Anche le sezioni 1.10.32 e 1.10.33 del "de Finibus Bonorum et Malorum" di Cicerone sono riprodotte nella loro forma originale, accompagnate dalla traduzione inglese del 1914 di H. Rackham.

And here is my simple custom JS code:

  $(".filters-show a").click(function(){

jQuery(document).ready(function($) {
    $(".clear-filters").click(function () {

The first part of the code works. If you click on a filter of my view, the link given above shows the taxonomy description and the associated nodes. But when I click on the "Tutte" link (filter with data attribute = *), the class is not added.
Note that I wrote the CSS lines so that the "elements to be hidden" overwrite the "elements to be displayed".
In an earlier version of the script, I also removed the items-to-show class, which seems to work in HTML but not in Live Drupal, which means:


I tried to split the code into two JS library declarations, but to no avail: the second JS doesn't load at all, can't understand why.

Any help is appreciated.
Thank you so much!

Collection – How to create a filter group for the query to search by search criteria

I am trying to create the following query using filter groups

SELECT `main_table`.* FROM `sales_order` AS `main_table` WHERE(
 (`updated_at` > '2020-04-01 15:11:31') AND (`updated_at` <= '2020-04-02 15:11:31')
(`created_at` > '2020-04-01 15:11:31') AND (`created_at` <= '2020-04-02 15:11:31') AND (`store_id` = '1')
(`status` = 'active')

8 – Custom node access control doesn't work with view access filter?

In some of my content types, I have the "Content Protection" checkbox. If this option is activated, this node should only be visible to registered users. If not marked – visible to everyone:

function hook_node_access($node, $op, $account) {

  // If $node is a string, the node has not yet been created. We don't care
  // about that case.
  if (is_string($node)) {
    return new AccessResultNeutral();
  if ($node->hasField('field_content_protect')) {
    $protected = ($node->field_content_protect->value == 1) ? TRUE : FALSE;
    $userId = $account->id();
    if ($protected && $userId == 0) {
      return new AccessResultForbidden();
  return new AccessResultNeutral();

And that works well when I try to access the node directly. If it is protected, anonymous users cannot access it.

Now I have a view that lists some of these nodes. I want to apply the same logic and do not exclude protected nodes for anonymous users. So I added filters from my point of view:

Content access: Access

But it doesn't work as expected. There is content for authenticated users, but for anonymous users the entire block content is simply missing?!? Nodes for which the "Content protection" field is not activated are also not listed?!? Why this? This filter has no options / settings.

I have another option to duplicate the view display, check the field directly, and display the first or second block view depending on the user, but this solution with content access filter looks more elegant.

Views – Change the value of the exposed filter programmatically based on another exposed filter

I have 2 exposed filters in my Drupal 8 view – both are selected dropdowns. I want the value of the 2nd filter to change based on the selection of the first filter
Here are the filters
$filters = $view->display_handler->getOption('filters');

$filters('country') and $filters('states').

The problem is that I always get an empty value when I try to access the country filter in my views_pre_view hook.

dpm($filters('country')('value')) always prints blank.

How do I solve this please?

Magento2 TextRange Filter – Magento Stack Exchange

I have inserted the filter in my expansion grid. My filter is text range, so it will appear in the raster filter from time to time when I have inserted something into product ID filter data that was not reflected as before. My filter below doesn't work, but when I change textRange to text it worked. but I want textRange to work. What will be the problem?

                Product Id

Socket type filter

Introduce company:
We are the professional manufacturer of reactors, power supply filters, electric heaters and inductors. Products are widely used for air conditioners, refrigerators, washing machines, UPS power supplies, communication devices, automatic control circuits and a variety of electronic devices.
We have already established a long-term partnership with Midea, Galanz, Hisense, Kelon, Aux and Astrodyne Corporation. Our excellent quality, reasonable price, the perfect service system to win the trust of customers and the consistently high praise of social networks. After years of technical accumulation and research, our company has developed positively and has a technical innovation team that has achieved great success in scientific research.
Our company has a perfect management system. First-class production facilities, quality testing devices, strong engineering teams and a group of professional managers as well as a set to confirm the international standards of the quality management system. Our company has passed the ISO9001 quality management system and CQC, TÜV, UL, S product certification. The company is constantly developing and growing every day.
Quality first, customer first is our eternal goal. The company will be the spirit of "Innovation Endless" thinking to further absorb domestic and foreign progress technology, the synchronous reform trend, the creation of an international brand and the expansion at home and abroad markets, commitment to working with customers, to create a better future.
Product application:
• Electrical and electronic devices
• Office automation equipment
• Data communication equipment
• Household equipment
• Medical equipment
• consumer goods
• Industrial applications
• Building automation
• Various noisy applications that require good filter performance
Technical parameters:
Technical specifications
Rated voltage 250VAC
Operating frequency 50 / 60Hz
Rated current 1A20A
H1 pot : (1 min) 1500VAC (line / ground)
Climate category 25/085/21
Mechanical dimensions
Packaging and Transport:
What can we do for you?
1. We can offer free samples.
2. OEM / ODM orders are welcome
3. Wide range of products at competitive prices
4. Protection of your sales area, your design ideas and all your private data
5. Strict quality inspection and control procedures to ensure superior quality
6. With efficient and professional customer service. Base filter
Website: http: //