Page MenuHomePhabricator

Errore nella procedura di iscrizione, "Si è verificato un errore inatteso": problema sul rinnovo del socio
Open, Needs TriagePublic

Description

Il prolema si verifica rinnovando la quota associativa:

Nel log di Apache ho trovato questo

[Sat Dec 30 09:12:12.053903 2023] [proxy_fcgi:error] [pid 1532013] [client 93.34.238.25:47495] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "'Attiva' is not a valid option for field status_id" at /var/www/crm/production/sostieni.wikimedia.it/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 815', referer: https://sostieni.wikimedia.it/diventa-socio
[Sat Dec 30 09:13:08.529259 2023] [proxy_fcgi:error] [pid 1532013] [client 93.34.238.25:47507] AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "'Attiva' is not a valid option for field status_id" at /var/www/crm/production/sostieni.wikimedia.it/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 815', referer: https://sostieni.wikimedia.it/diventa-socio

Sembra che venga fatto l'aggiornamento dello stato della membership non usando il civicrm_membership_status.name ma civicrm_membership_status.label, che è in italiano.

Come prima cosa bisognerebbe aggiornare il modulo "webform_civicrm" alla versione 6.2.5 (https://www.drupal.org/project/webform_civicrm/releases/6.2.5), poi aggiornare il CiviCRM anche se non ho trovato issues che riguardano questo errore.

Per ora, per sistemare subito ho fatto questa attività. Poi, siccome la manutenzione è programmata per il 18/23 gennaio, credo sia meglio attendere quella data per ritestare con i componenti aggiornati ricordandosi di ripristinare le "labels" della tabella "civicrm_membership_status" con le query scritte qui in fondo.

Ho eseguito questa query per uniformare le labels come il name:

UPDATE civicrm_membership_status set label = name;

Per ripristinare le labels com'erano prima eseguire queste query:

UPDATE civicrm_membership_status SET name = 'New', label = 'Attivata negli ultimi 3 mesi', start_event = 'join_date', start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = 'join_date', end_event_adjust_unit = 'month', end_event_adjust_interval = 3, is_current_member = 1, is_admin = 0, weight = 1, is_default = 0, is_active = 1, is_reserved = 0 WHERE id = 1;
UPDATE civicrm_membership_status SET name = 'Current', label = 'Attiva', start_event = 'start_date', start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = 'end_date', end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 1, is_admin = 0, weight = 2, is_default = 1, is_active = 1, is_reserved = 0 WHERE id = 2;
UPDATE civicrm_membership_status SET name = 'Grace', label = 'in Tolleranza (ritardo di 1 mese)', start_event = 'end_date', start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = 'end_date', end_event_adjust_unit = 'month', end_event_adjust_interval = 1, is_current_member = 1, is_admin = 0, weight = 3, is_default = 0, is_active = 1, is_reserved = 0 WHERE id = 3;
UPDATE civicrm_membership_status SET name = 'Expired', label = 'Scaduta (oltre la tolleranza di 1 mese)', start_event = 'end_date', start_event_adjust_unit = 'month', start_event_adjust_interval = 1, end_event = NULL, end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 0, is_admin = 0, weight = 4, is_default = 0, is_active = 1, is_reserved = 0 WHERE id = 4;
UPDATE civicrm_membership_status SET name = 'Pending', label = 'In attesa del pagamento', start_event = 'join_date', start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = 'join_date', end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 0, is_admin = 0, weight = 5, is_default = 0, is_active = 1, is_reserved = 1 WHERE id = 5;
UPDATE civicrm_membership_status SET name = 'Cancelled', label = 'Cancellata', start_event = 'join_date', start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = 'join_date', end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 0, is_admin = 0, weight = 6, is_default = 0, is_active = 1, is_reserved = 1 WHERE id = 6;
UPDATE civicrm_membership_status SET name = 'Deceased', label = 'Estinta', start_event = NULL, start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = NULL, end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 0, is_admin = 1, weight = 7, is_default = 0, is_active = 1, is_reserved = 1 WHERE id = 7;
UPDATE civicrm_membership_status SET name = 'GDPR_Cancelled', label = 'GDPR Cancelled', start_event = NULL, start_event_adjust_unit = NULL, start_event_adjust_interval = NULL, end_event = NULL, end_event_adjust_unit = NULL, end_event_adjust_interval = NULL, is_current_member = 0, is_admin = 1, weight = 8, is_default = 0, is_active = 1, is_reserved = 1 WHERE id = 8;

Event Timeline

@Francesca_Lissoni_WMIT @stefano.cannillo ho creato questo task.
@Francesca_Lissoni_WMIT ora l'unico effetto che trovate nel CRM è che la colonna status della membership ha l'etichetta in inglese. Mi è parsa la soluzione più rapida.