Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
i get these warnings:
Warning: array_filter() expects parameter 1 to be array, null given in exitpopup_preprocess_page() (line 16 of modules/contrib/exitpopup/exitpopup.module).
Warning: array_intersect(): Expected parameter 1 to be an array, null given in exitpopup_preprocess_page() (line 16 of modules/contrib/exitpopup/exitpopup.module).
and the popup doesnt work
Comments
Comment #2
dianacastillo CreditAttribution: dianacastillo as a volunteer and commentedI got rid of this warning by adding this code in the module
$config = \Drupal::config('exitpopup.settings');
$current_user = User::load(\Drupal::currentUser()->id());
if ($config->get('roles')== NULL){
$checkRole = TRUE;
}else{
$checkRole = !empty(array_intersect(array_filter($config->get('roles')), $current_user->getRoles()));
}
Comment #3
dianacastillo CreditAttribution: dianacastillo as a volunteer and commentedi got rid of the warning and i have the javascript library installed. but no popup. is it possible that this doesnt work because modern browsers dont allow popups?
Comment #5
gaurav.kapoor CreditAttribution: gaurav.kapoor at Axelerant for Drupal India Association commented@dianacastillo Thanks for identifying the issue, to suppress the warnings suggested code has been pushed. I am using latest release and the module is working fine for me. Can you confirm if it is working for you?
Comment #6
gaurav.kapoor CreditAttribution: gaurav.kapoor at Axelerant for Drupal India Association commented