I want to make some changes to the “Content” page. The ID of the form is views_form_content_page_1
, so I made a quick test (after drush cr of course):
function my_module_form_views_form_content_page_1_alter(&$form, FormStateInterface $form_state) { kint($form); }
When I go to the page, the $form is being printed twice by the devel. I checked, all of the array items are the same. If I do kint('cat');
, then it will print cat two times.
Why is this happening? Of course I could make it work, that my action will run only once (eventho drupal tries to run it twice) but I would like to rather solve this one, and understand if it’s a bug, and why it is happening.