🇧🇾Belarus @---Runa---

Account created on 2 February 2017, almost 8 years ago
#

Recent comments

🇧🇾Belarus ---Runa---

Hello.
I think you already had the answer, but I put my version here, because I found this page when was resolving a similar issue.
Drupal.ajax(ajax_settings).execute();
It executes the request in the same moment as it called. The only problem here is as the callback has been executed, the behaviour attached again and all ajax calls executed again. So it should be something like.

if ($(.selector.ajax-executed).length == 0) {  
Drupal.ajax(ajax_settings).execute().done($('.selector').addClass('ajax-executed'));
}
🇧🇾Belarus ---Runa---
$query = \Drupal::entityTypeManager()->getStorage('node')->getQuery()
    ->accessCheck(TRUE)
    ->condition('type', 'gestione_sedute')
    ->condition('status', 1)
	->condition('field_pomeriggio', 1, '=')
    ->count()->execute();
Production build 0.71.5 2024