Development issueshttps://lab.civicrm.org/groups/dev/-/issues2020-06-06T14:13:05Zhttps://lab.civicrm.org/dev/wordpress/-/issues/53CiviMail doesn&#39;t send to full recipient list with merge of REST API wrapper code2020-06-06T14:13:05ZandyburnsCiviMail doesn't send to full recipient list with merge of REST API wrapper codeWith these changes https://github.com/civicrm/civicrm-wordpress/pull/160 and the [filter](https://docs.civicrm.org/dev/en/latest/api/v3/wp-rest/#settings) in place a mailing that was intended for 1605 recipients stopped sending at 399 recipients. Typically a mailing of this size would complete in 5-7 minutes. This is using Sparkpost 1.3.
The mailing status was stuck in running and did not change after a new cron run time 15 min later. When we tried to manually execute the Send Scheduled Mailings job that resulted in this error from WP debugging:
```Notice: Undefined index: html in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109Fatal error: Uncaught TypeError: Argument 1 passed to CiviCRM_WP_REST\Civi\Mailing_Hooks::is_mail_tracking_url_alterable() must be of the type string, null given, called in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109 and defined in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php:191 Stack trace: #0 /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php(109): CiviCRM_WP_REST\Civi\Mailing_Hooks->is_mail_tracking_url_alterable(NULL) #1 /var/www/lporg/wp-includes/class-wp-hook.php(287): CiviCRM_WP_REST\Civi\Mailing_Hooks->do_mailing_urls(Array, 'civimail') #2 /var/www/lporg/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #3 /var/www/lporg/wp-includes/plugin.php(544): WP_Hook->do_action(Array) #4 /var/www/lporg/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php(108): do_action_ref_array('civicrm_alterMa...', Array) #5 /var/www/lporg/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(90): CRM_ in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 19```
We removed the filter and executed the scheduled job and the mailing started again and finished successfully.
Ref: #47With these changes https://github.com/civicrm/civicrm-wordpress/pull/160 and the [filter](https://docs.civicrm.org/dev/en/latest/api/v3/wp-rest/#settings) in place a mailing that was intended for 1605 recipients stopped sending at 399 recipients. Typically a mailing of this size would complete in 5-7 minutes. This is using Sparkpost 1.3.
The mailing status was stuck in running and did not change after a new cron run time 15 min later. When we tried to manually execute the Send Scheduled Mailings job that resulted in this error from WP debugging:
```Notice: Undefined index: html in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109Fatal error: Uncaught TypeError: Argument 1 passed to CiviCRM_WP_REST\Civi\Mailing_Hooks::is_mail_tracking_url_alterable() must be of the type string, null given, called in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 109 and defined in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php:191 Stack trace: #0 /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php(109): CiviCRM_WP_REST\Civi\Mailing_Hooks->is_mail_tracking_url_alterable(NULL) #1 /var/www/lporg/wp-includes/class-wp-hook.php(287): CiviCRM_WP_REST\Civi\Mailing_Hooks->do_mailing_urls(Array, 'civimail') #2 /var/www/lporg/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #3 /var/www/lporg/wp-includes/plugin.php(544): WP_Hook->do_action(Array) #4 /var/www/lporg/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php(108): do_action_ref_array('civicrm_alterMa...', Array) #5 /var/www/lporg/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(90): CRM_ in /var/www/lporg/wp-content/plugins/civicrm/wp-rest/Civi/Mailing-Hooks.php on line 19```
We removed the filter and executed the scheduled job and the mailing started again and finished successfully.
Ref: #47comp:CiviMailgit:civicrm-coresig:bugtriagedhttps://lab.civicrm.org/dev/wordpress/-/issues/2WordPress Version Update2020-06-06T13:37:55ZkcristianoWordPress Version UpdateCiviCRM files are set to 4.7 in the header blocks on:
- uninstall.php
- civicrm.php
- assets/templates/civicrm.shortcode.php
- includes/civicrm.shortcodes.php
- includes/civicrm.users.php
- includes/civicrm.shortcodes.modal.php
- includes/civicrm.basepage.php
- wp-cli/civicrm.php
Is a PR in order or is there a better way to update?
Also
```
// set version here: when it changes, will force JS to reload
define( 'CIVICRM_PLUGIN_VERSION', '4.7' );
```
Needs updating - if a PR is in order we can include this change.CiviCRM files are set to 4.7 in the header blocks on:
- uninstall.php
- civicrm.php
- assets/templates/civicrm.shortcode.php
- includes/civicrm.shortcodes.php
- includes/civicrm.users.php
- includes/civicrm.shortcodes.modal.php
- includes/civicrm.basepage.php
- wp-cli/civicrm.php
Is a PR in order or is there a better way to update?
Also
```
// set version here: when it changes, will force JS to reload
define( 'CIVICRM_PLUGIN_VERSION', '4.7' );
```
Needs updating - if a PR is in order we can include this change.git:civicrm-wordpressneeds:concept approvaltriagedtype:proposalhttps://lab.civicrm.org/dev/wordpress/-/issues/17CiviCRM shortcode button not working if pop ups are off in display settings2020-06-06T13:05:58ZkcristianoCiviCRM shortcode button not working if pop ups are off in display settingsIf pop Ups are disabled in [Display preferences](https://wpmaster.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fpreferences%2Fdisplay&reset=1) the CiviCRM shortcode button does not render properly.
![image](/uploads/1160b5a86a17a46fa073b40cb359801b/image.png)
This is the result:
![image](/uploads/6145a145d06561a9dfe5f2bfec65b038/image.png)
Instead of:
![image](/uploads/f915b8bbf5b7f1a19e8232023d42333b/image.png)
[Discussed in Mattermost](https://chat.civicrm.org/civicrm/pl/bj65j3gyi3by9e4yd94t6h3mjr)
cc @haystackIf pop Ups are disabled in [Display preferences](https://wpmaster.demo.civicrm.org/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fpreferences%2Fdisplay&reset=1) the CiviCRM shortcode button does not render properly.
![image](/uploads/1160b5a86a17a46fa073b40cb359801b/image.png)
This is the result:
![image](/uploads/6145a145d06561a9dfe5f2bfec65b038/image.png)
Instead of:
![image](/uploads/f915b8bbf5b7f1a19e8232023d42333b/image.png)
[Discussed in Mattermost](https://chat.civicrm.org/civicrm/pl/bj65j3gyi3by9e4yd94t6h3mjr)
cc @haystackneeds:concept approvalsig:bugtriagedhttps://lab.civicrm.org/dev/wordpress/-/issues/41Scheduled Reminder - Error message: DB Error: unknown error2020-06-06T12:59:00ZlandbryoScheduled Reminder - Error message: DB Error: unknown errorOther CiviCRM scheduled jobs appear to be working correctly, but as of 12/30 the following error message appears for this one job. Any help would be greatly appreciated.
WordPress v 5.2.5
CiviCRM v5.13.2
![Scheduled Reminder Error](/uploads/e443b1e442167385ed6eaf8eddb9cdd1/image.png)
```
Jan 01 00:30:03 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']"]
)
Jan 01 00:30:03 [info] $backTrace = #0 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(952): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#3 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#4 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "DB_Error", TRUE)
#5 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "1292 ** Truncated incorrect DOUBLE value: '1�5'")
#7 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#9 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#10 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#11 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#12 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", TRUE)
#13 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(215): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#14 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(156): Civi\ActionSchedule\RecipientBuilder->buildRelFirstPass()
#15 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(360): Civi\ActionSchedule\RecipientBuilder->build()
#16 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(375): CRM_Core_BAO_ActionSchedule::buildRecipientContacts(2, "20200101003003", (Array:2))
#17 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(221): CRM_Core_BAO_ActionSchedule::processQueue("20200101003003", (Array:2))
#18 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_job_send_reminder((Array:2))
#19 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#20 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#21 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "send_reminder", (Array:1), NULL)
#22 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(145): civicrm_api("Job", "send_reminder", (Array:1))
#23 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(78): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#24 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(134): CRM_Core_JobManager->execute(FALSE)
#25 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_job_execute((Array:2))
#26 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#27 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#28 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "execute", (Array:2), NULL)
#29 /home/username/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(122): civicrm_api("Job", "execute", (Array:2))
#30 /home/username/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()
#31 {main}
```Other CiviCRM scheduled jobs appear to be working correctly, but as of 12/30 the following error message appears for this one job. Any help would be greatly appreciated.
WordPress v 5.2.5
CiviCRM v5.13.2
![Scheduled Reminder Error](/uploads/e443b1e442167385ed6eaf8eddb9cdd1/image.png)
```
Jan 01 00:30:03 [info] $Fatal Error Details = Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => exceptionHandler
)
[code] => -1
[message] => DB Error: unknown error
[mode] => 16
[debug_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']
[type] => DB_Error
[user_info] => INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']
[to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_schedule_id)
SELECT e.contact_id as contact_id, e.id as entity_id, "civicrm_participant" as entity_table, 5 as action_schedule_id
FROM civicrm_participant e
INNER JOIN civicrm_event r ON e.event_id = r.id
INNER JOIN civicrm_contact c ON c.id = e.contact_id AND c.is_deleted = 0 AND c.is_deceased = 0
LEFT JOIN civicrm_action_log reminder ON reminder.contact_id = e.contact_id AND
reminder.entity_id = e.id AND
reminder.entity_table = 'civicrm_participant' AND
reminder.action_schedule_id = 5
WHERE (e.role_id IN (6)) AND (r.event_type_id IN ("8")) AND (r.is_active = 1) AND (r.is_template = 0) AND (e.status_id IN (1)) AND (reminder.id IS NULL) AND ('20200101003003' >= DATE_SUB(start_date, INTERVAL 14 day)) AND (DATE_SUB(20200101003003, INTERVAL 1 DAY ) <= start_date)
[nativecode=1292 ** Truncated incorrect DOUBLE value: '1�5']"]
)
Jan 01 00:30:03 [info] $backTrace = #0 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(952): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: unknown error", -1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#3 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#4 /home/username/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, (Array:2), "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "DB_Error", TRUE)
#5 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1907): PEAR->__call("raiseError", (Array:7))
#6 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-1, NULL, NULL, "INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", "1292 ** Truncated incorrect DOUBLE value: '1�5'")
#7 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#9 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2415): DB_common->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#10 /home/username/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1607): DB_DataObject->_query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#11 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(439): DB_DataObject->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#12 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(1414): CRM_Core_DAO->query("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...", TRUE)
#13 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(215): CRM_Core_DAO::executeQuery("INSERT INTO civicrm_action_log (contact_id, entity_id, entity_table, action_s...")
#14 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/ActionSchedule/RecipientBuilder.php(156): Civi\ActionSchedule\RecipientBuilder->buildRelFirstPass()
#15 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(360): Civi\ActionSchedule\RecipientBuilder->build()
#16 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/ActionSchedule.php(375): CRM_Core_BAO_ActionSchedule::buildRecipientContacts(2, "20200101003003", (Array:2))
#17 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(221): CRM_Core_BAO_ActionSchedule::processQueue("20200101003003", (Array:2))
#18 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_job_send_reminder((Array:2))
#19 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#20 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#21 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "send_reminder", (Array:1), NULL)
#22 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(145): civicrm_api("Job", "send_reminder", (Array:1))
#23 /home/username/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php(78): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#24 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/v3/Job.php(134): CRM_Core_JobManager->execute(FALSE)
#25 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Provider/MagicFunctionProvider.php(101): civicrm_api3_job_execute((Array:2))
#26 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(168): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#27 /home/username/public_html/wp-content/plugins/civicrm/civicrm/Civi/API/Kernel.php(99): Civi\API\Kernel->runRequest((Array:9))
#28 /home/username/public_html/wp-content/plugins/civicrm/civicrm/api/api.php(23): Civi\API\Kernel->runSafe("Job", "execute", (Array:2), NULL)
#29 /home/username/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.class.php(122): civicrm_api("Job", "execute", (Array:2))
#30 /home/username/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php(32): civicrm_cli->callApi()
#31 {main}
```comp:CiviEventgit:civicrm-coregit:civicrm-wordpresssig:unverified-bugtriagedhttps://lab.civicrm.org/dev/wordpress/-/issues/39Refactor WordPress Code2020-06-06T12:58:42ZGhost UserRefactor WordPress CodeThe entire project could benefit from more modern coding practices I’d recommend the WordPress maintainers consider checking out https://phptherightway.com/
Performance is still a major issue with CiviCRM and WordPress.The entire project could benefit from more modern coding practices I’d recommend the WordPress maintainers consider checking out https://phptherightway.com/
Performance is still a major issue with CiviCRM and WordPress.git:civicrm-wordpresssig:maintainabilitytriagedtype:proposalhttps://lab.civicrm.org/dev/wordpress/-/issues/44Unable to see the top menu bar after upgrade to version 5.21.22020-06-06T12:57:57ZkysecularUnable to see the top menu bar after upgrade to version 5.21.2I updated to 5.21.2, and now I am unable to see the top CiviCRM menu. I do not know how to access the functions outside the home page without it. I have attached a screenshot.
![Capture](/uploads/7f9b3554be0eb7874ef0548e1e029bd5/Capture.PNG)I updated to 5.21.2, and now I am unable to see the top CiviCRM menu. I do not know how to access the functions outside the home page without it. I have attached a screenshot.
![Capture](/uploads/7f9b3554be0eb7874ef0548e1e029bd5/Capture.PNG)git:civicrm-coresig:unverified-bugtriagedhttps://lab.civicrm.org/dev/wordpress/-/issues/49CiviCRM front end pages broken on WP Latest (master)2020-06-06T12:57:18ZkcristianoCiviCRM front end pages broken on WP Latest (master)WordPress just committed bug fixes `redirect_canonical()` in their master branch. The history is as follows:
Original redirect_canonical issues and patches :
[ticket 11694](https://core.trac.wordpress.org/ticket/11694)
[svn 34492](https://core.trac.wordpress.org/changeset/34492)
2020 redirect_canonical issues :
[ticket 45337](https://core.trac.wordpress.org/ticket/45337)
[ticket 40773](https://core.trac.wordpress.org/ticket/40773)
[ticket 28081](https://core.trac.wordpress.org/ticket/28081)
2020 redirect_canonical svn patches:
[svn 47727](https://core.trac.wordpress.org/changeset/47727)
[svn 47760](https://core.trac.wordpress.org/changeset/47760)
[svn 47761](https://core.trac.wordpress.org/changeset/47761)
[svn 47759](https://core.trac.wordpress.org/changeset/47759)
2020 redirect_canonical Git patches:
[47727](https://github.com/WordPress/wordpress-develop/commit/af596bcc5b37b259982b3e7af4a8c5ab41b8e27e)
[47760](https://github.com/WordPress/wordpress-develop/commit/de14ea86bfe7b34cf99276ae356da43cec088c5c)
[47761](https://github.com/WordPress/wordpress-develop/commit/0206900cfff1b44af94f33f95510b18a77f5dd60)
[47759](https://github.com/WordPress/wordpress-develop/commit/54c8470bd625c843a00f1ecca328c22d279b9632)
[changelog for canonical.php](https://github.com/WordPress/WordPress/commits/master/wp-includes/canonical.php)
These WP changes are correct, the root of the issue is that CiviCRM used `page=CiviCRM` was used on the front end. It should only have been used on the back end. We've gotten away with this for 8 years, it's now time to fix.
The issue is that `canonical_redirect()` now properly strips `page=CiviCRM` from front end pages.
https://wplatest.tadpole.cc is an example site running master of both WP and CiviCRM. CiviCRM pages built with shortcode pages load, but if you take action - try and contribute, submit a profile, click on a link to register on an event info page - 404.
Pages that are linbked to directly - cleanurls or ugly urls, 404.
We need to remove `page=CiviCRM` from the front end pages.
We need to do this before WP updates and we need to backport to ESR as this will break all WP CiviCRM sites.
There is no way understate that if we do dont fix ALL WP Sites will break on update. And if WP does this as aminor release that gets pushed out via auto-update :boom: :bomb:WordPress just committed bug fixes `redirect_canonical()` in their master branch. The history is as follows:
Original redirect_canonical issues and patches :
[ticket 11694](https://core.trac.wordpress.org/ticket/11694)
[svn 34492](https://core.trac.wordpress.org/changeset/34492)
2020 redirect_canonical issues :
[ticket 45337](https://core.trac.wordpress.org/ticket/45337)
[ticket 40773](https://core.trac.wordpress.org/ticket/40773)
[ticket 28081](https://core.trac.wordpress.org/ticket/28081)
2020 redirect_canonical svn patches:
[svn 47727](https://core.trac.wordpress.org/changeset/47727)
[svn 47760](https://core.trac.wordpress.org/changeset/47760)
[svn 47761](https://core.trac.wordpress.org/changeset/47761)
[svn 47759](https://core.trac.wordpress.org/changeset/47759)
2020 redirect_canonical Git patches:
[47727](https://github.com/WordPress/wordpress-develop/commit/af596bcc5b37b259982b3e7af4a8c5ab41b8e27e)
[47760](https://github.com/WordPress/wordpress-develop/commit/de14ea86bfe7b34cf99276ae356da43cec088c5c)
[47761](https://github.com/WordPress/wordpress-develop/commit/0206900cfff1b44af94f33f95510b18a77f5dd60)
[47759](https://github.com/WordPress/wordpress-develop/commit/54c8470bd625c843a00f1ecca328c22d279b9632)
[changelog for canonical.php](https://github.com/WordPress/WordPress/commits/master/wp-includes/canonical.php)
These WP changes are correct, the root of the issue is that CiviCRM used `page=CiviCRM` was used on the front end. It should only have been used on the back end. We've gotten away with this for 8 years, it's now time to fix.
The issue is that `canonical_redirect()` now properly strips `page=CiviCRM` from front end pages.
https://wplatest.tadpole.cc is an example site running master of both WP and CiviCRM. CiviCRM pages built with shortcode pages load, but if you take action - try and contribute, submit a profile, click on a link to register on an event info page - 404.
Pages that are linbked to directly - cleanurls or ugly urls, 404.
We need to remove `page=CiviCRM` from the front end pages.
We need to do this before WP updates and we need to backport to ESR as this will break all WP CiviCRM sites.
There is no way understate that if we do dont fix ALL WP Sites will break on update. And if WP does this as aminor release that gets pushed out via auto-update :boom: :bomb:5.26.0Concept approvedprioritisedsig:bugtriagedhttps://lab.civicrm.org/dev/wordpress/-/issues/36REST API calls using json param do not work in Wordpress context --backslashe...2020-06-06T12:56:59ZeileenREST API calls using json param do not work in Wordpress context --backslashes are addedThere is a long discussion on this on this PR but the approach still appears to be unresolved. I have closed the PR to track through gitlab
https://github.com/civicrm/civicrm-core/pull/12813
---
The issue:
When CiviCRM receives an API request through `extern/rest.php` with a `json` parameter, and the CMS is WordPress, an error will result.
This is because Civi bootstraps WordPress to authenticate the API user, and WordPress escapes all quotation marks in `$_POST` variables whether or not PHP's `magic_quotes_gpc` is enabled. CiviCRM is not expecting an escaped string, and JSON decoding fails due to the extra backslashes. See `wp_magic_quotes()` which is called by `wp-settings.php` during bootstrap.There is a long discussion on this on this PR but the approach still appears to be unresolved. I have closed the PR to track through gitlab
https://github.com/civicrm/civicrm-core/pull/12813
---
The issue:
When CiviCRM receives an API request through `extern/rest.php` with a `json` parameter, and the CMS is WordPress, an error will result.
This is because Civi bootstraps WordPress to authenticate the API user, and WordPress escapes all quotation marks in `$_POST` variables whether or not PHP's `magic_quotes_gpc` is enabled. CiviCRM is not expecting an escaped string, and JSON decoding fails due to the extra backslashes. See `wp_magic_quotes()` which is called by `wp-settings.php` during bootstrap.needs:concept approvaltriagedtype:proposalhttps://lab.civicrm.org/dev/core/-/issues/1797jquery validation type error on the credit card field2020-06-06T01:16:36Zalicefruminjquery validation type error on the credit card fieldOverview
----------------------------------------
On front end contribution forms with Credit Card Processing enabled, the [jQuery Validation Plugin](https://jqueryvalidation.org/creditcard-method/) is choking on the credit card field and throwing the following error in the console: `TypeError: a.validator.methods[d] is undefined. Exception occurred when checking element credit_card_number, check the 'creditcard' method. jquery.validate.min.js:4:11231`
I think this broke when the jQuery Validation Plugin was updated with this [commit](https://github.com/civicrm/civicrm-core/pull/16625) in CiviCRM 5.25.
Reproduction steps
----------------------------------------
1. go to a front end contribution form with credit card processing set up
1. Enter a 1 into the credit card number field
Current behaviour
----------------------------------------
an error is thrown in the console.
NO validation error is thrown
SCREENSHOT FROM CiviCRM v5.25
![typeerror](/uploads/92a9c0bba3c9fd0f036e2178740f34b2/typeerror.png)
Expected behaviour
----------------------------------------
no error should appear in the console
an "Invalid credit card number" message should appear next to the field
SCREENSHOT FROM CiviCRM v5.24
![error](/uploads/310bda7df2cc96594ee8e53628537d3a/error.png)
Environment information
----------------------------------------
I was able to recreate this on http://wpmaster.demo.civicrm.org/ (CiviCRM v5.27) and (CiviCRM v5.25)Overview
----------------------------------------
On front end contribution forms with Credit Card Processing enabled, the [jQuery Validation Plugin](https://jqueryvalidation.org/creditcard-method/) is choking on the credit card field and throwing the following error in the console: `TypeError: a.validator.methods[d] is undefined. Exception occurred when checking element credit_card_number, check the 'creditcard' method. jquery.validate.min.js:4:11231`
I think this broke when the jQuery Validation Plugin was updated with this [commit](https://github.com/civicrm/civicrm-core/pull/16625) in CiviCRM 5.25.
Reproduction steps
----------------------------------------
1. go to a front end contribution form with credit card processing set up
1. Enter a 1 into the credit card number field
Current behaviour
----------------------------------------
an error is thrown in the console.
NO validation error is thrown
SCREENSHOT FROM CiviCRM v5.25
![typeerror](/uploads/92a9c0bba3c9fd0f036e2178740f34b2/typeerror.png)
Expected behaviour
----------------------------------------
no error should appear in the console
an "Invalid credit card number" message should appear next to the field
SCREENSHOT FROM CiviCRM v5.24
![error](/uploads/310bda7df2cc96594ee8e53628537d3a/error.png)
Environment information
----------------------------------------
I was able to recreate this on http://wpmaster.demo.civicrm.org/ (CiviCRM v5.27) and (CiviCRM v5.25)5.26.1comp:CiviContributegit:civicrm-coreregressiontriagedhttps://lab.civicrm.org/dev/core/-/issues/1794Deselected checkbox settings are not saved2020-06-06T01:16:09ZaydunsDeselected checkbox settings are not savedOverview
----------------------------------------
See https://civicrm.stackexchange.com/questions/35803/some-checkbox-settings-not-applying
Reproduction steps
----------------------------------------
1. Click on **Administer > Customize Data and Screens > Custom Fields**.
1. Choose a custom field set, **more > Settings**
1. Choose one of the selected tickboxes and deselect.
1. Save
1. Re-open the settings page and observe that the checkbox is still selected
Current behaviour
----------------------------------------
Deselected value is not saved
Expected behaviour
----------------------------------------
Deselected value is saved
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
Confirmed on dmaster.demo.civicrm.orgOverview
----------------------------------------
See https://civicrm.stackexchange.com/questions/35803/some-checkbox-settings-not-applying
Reproduction steps
----------------------------------------
1. Click on **Administer > Customize Data and Screens > Custom Fields**.
1. Choose a custom field set, **more > Settings**
1. Choose one of the selected tickboxes and deselect.
1. Save
1. Re-open the settings page and observe that the checkbox is still selected
Current behaviour
----------------------------------------
Deselected value is not saved
Expected behaviour
----------------------------------------
Deselected value is saved
Environment information
----------------------------------------
* __CiviCRM:__ _Master_ <!-- If this problem relates to an upgrade, then specify both old and new versions -->
Confirmed on dmaster.demo.civicrm.org5.26.1regressionhttps://lab.civicrm.org/dev/core/-/issues/1Allow to search for &quot;in progress&quot; contributions2020-06-05T18:55:23ZxavierAllow to search for "in progress" contributionsThe search is hiding the status "in progress". However, some payment processor do use this status (eg the sepa one), so it is in effect hiding contributions, and therefore makes the users very sad and confused
Fix:
allow to search on status "in progress". Worse case scenario, no contributions have this status, and it will return an empty listThe search is hiding the status "in progress". However, some payment processor do use this status (eg the sepa one), so it is in effect hiding contributions, and therefore makes the users very sad and confused
Fix:
allow to search on status "in progress". Worse case scenario, no contributions have this status, and it will return an empty list4.7.31comp:CiviContributeimprovementhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/4kcfinder libraries is missing files2020-06-05T13:41:12Zkarunadevkcfinder libraries is missing filesI notice there are far more files and directories for kcfinder ./vendor/civicrm/civicrm-packages/kcfinder/ compared to ./web/libraries/civicrm/packages/kcfinder. For example the browse.php file is not present in libraries path, which explains why the functionality to find and upload images in CiviMail or CiviEvent does not work and produces a 'page not found' error in the logs
`/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=crmUiId_1&CKEditorFuncNum=0&langCode=en-ca. `
Copying the kcfinder contents from /vendor path to the /libraries path does not help, so there is more to this.
BTW, test case summary is:
#installed with
`
composer create-project drupal/recommended-project <path>
composer require civicrm/civicrm-asset-plugin civicrm/civicrm-drupal-8 civicrm/civicrm-packages
`
Also occurs with
`
composer create-project roundearth/drupal-civicrm-project:8.x-dev www-cmnty-drupal --no-interaction
`
#set permissions (Cpanel machine) run with root
`
cd ./web
chown -R user:nobody .
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
find . -type f -exec chmod u=rw,g=r,o= '{}' \;
cd /sites
find . -type d -name files -exec chmod ug=rwx,o= '{}' \;
for d in ./*/files
do
find $d -type d -exec chmod ug=rwx,o= '{}' \;
find $d -type f -exec chmod ug=rw,o= '{}' \;
done
`
#enable
`chmod +w web/sites/default
vendor/drush/drush/drush pm-enable -y civicrm`
I notice there are far more files and directories for kcfinder ./vendor/civicrm/civicrm-packages/kcfinder/ compared to ./web/libraries/civicrm/packages/kcfinder. For example the browse.php file is not present in libraries path, which explains why the functionality to find and upload images in CiviMail or CiviEvent does not work and produces a 'page not found' error in the logs
`/libraries/civicrm/packages/kcfinder/browse.php?cms=civicrm&type=images&CKEditor=crmUiId_1&CKEditorFuncNum=0&langCode=en-ca. `
Copying the kcfinder contents from /vendor path to the /libraries path does not help, so there is more to this.
BTW, test case summary is:
#installed with
`
composer create-project drupal/recommended-project <path>
composer require civicrm/civicrm-asset-plugin civicrm/civicrm-drupal-8 civicrm/civicrm-packages
`
Also occurs with
`
composer create-project roundearth/drupal-civicrm-project:8.x-dev www-cmnty-drupal --no-interaction
`
#set permissions (Cpanel machine) run with root
`
cd ./web
chown -R user:nobody .
find . -type d -exec chmod u=rwx,g=rx,o= '{}' \;
find . -type f -exec chmod u=rw,g=r,o= '{}' \;
cd /sites
find . -type d -name files -exec chmod ug=rwx,o= '{}' \;
for d in ./*/files
do
find $d -type d -exec chmod ug=rwx,o= '{}' \;
find $d -type f -exec chmod ug=rw,o= '{}' \;
done
`
#enable
`chmod +w web/sites/default
vendor/drush/drush/drush pm-enable -y civicrm`
https://lab.civicrm.org/dev/report/-/issues/20Contribution Detail Report gives incorrect results when `force=1`2020-06-04T16:57:21ZJonGoldContribution Detail Report gives incorrect results when `force=1`To replicate:
* Have at least one soft credit in your database.
* Load a Contribution Detail report instance with `force=1`. In a demo database, you can do this with: http://mysite.org/civicrm/report/instance/8?force=1.
* Note the number of records returned.
* Press **View Results**.
* Note that the number of records has decreased.
As most of us know, the Contribution Detail report has several unfortunate code paths to add soft credits as a special case. [This if statement](https://github.com/civicrm/civicrm-core/blob/04d81658df2682d4cc42386554cbbfbd6cc6ba2e/CRM/Report/Form/Contribute/Detail.php#L533-L535) is one of them, and it suppresses soft credit display if the `contribution_or_soft_value` param is set to `contributions_only`, which is the default.
However, the defaults are not loaded when using `force=1` - which means that the default isn't loaded, so soft credits are displayed.
PR incoming that will ensure that if the `contribution_or_soft_value` param is empty, then we assume `contributions_only` as the default.To replicate:
* Have at least one soft credit in your database.
* Load a Contribution Detail report instance with `force=1`. In a demo database, you can do this with: http://mysite.org/civicrm/report/instance/8?force=1.
* Note the number of records returned.
* Press **View Results**.
* Note that the number of records has decreased.
As most of us know, the Contribution Detail report has several unfortunate code paths to add soft credits as a special case. [This if statement](https://github.com/civicrm/civicrm-core/blob/04d81658df2682d4cc42386554cbbfbd6cc6ba2e/CRM/Report/Form/Contribute/Detail.php#L533-L535) is one of them, and it suppresses soft credit display if the `contribution_or_soft_value` param is set to `contributions_only`, which is the default.
However, the defaults are not loaded when using `force=1` - which means that the default isn't loaded, so soft credits are displayed.
PR incoming that will ensure that if the `contribution_or_soft_value` param is empty, then we assume `contributions_only` as the default.5.26.0sig:bugtriagedJonGoldJonGoldhttps://lab.civicrm.org/dev/core/-/issues/1780Export selected fields doesn&#39;t export related contacts if related info is pre...2020-06-04T04:12:51ZyashodhaExport selected fields doesn't export related contacts if related info is present in mappingSteps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields for Export* with some fields as related fields like employer, spouse of id etc
* *DO NOT MERGE*
* Export > only X-N contact records where N is the contacts that appeared in related contacts fields
I replicated this on dmaster and seems to be a regression when compared it with 4.7 site where no. of contacts exported was X regardless related fields are used in mapping or primary fields are used.Steps to replicate
* Search > *Find Contacts*
* Click the *Search* button > results in X contacts
* Select All contacts
* Actions > *Export Contacts*
* Use *Export PRIMARY fields*, all X contacts are exported
* Now try *Select Fields for Export* with some fields as related fields like employer, spouse of id etc
* *DO NOT MERGE*
* Export > only X-N contact records where N is the contacts that appeared in related contacts fields
I replicated this on dmaster and seems to be a regression when compared it with 4.7 site where no. of contacts exported was X regardless related fields are used in mapping or primary fields are used.5.26.0regressionhttps://lab.civicrm.org/dev/core/-/issues/1753Deleting an activity with attachments doesn&#39;t delete the file or entries in c...2020-06-02T06:07:11ZDaveDDeleting an activity with attachments doesn't delete the file or entries in civicrm_file/civicrm_entity_fileThis might be an old issue but I did a quick look and didn't see anything. If a file is shared between two entities, then I could understand if it leaves civicrm_file and the file itself and just removes civicrm_entity_file, but it doesn't seem to remove anything, and even when there's no sharing (i.e. zero reference count).
1. Create e.g. an email activity. Add an attachment.
2. Delete the activity, e.g. from your contact's activity tab.
3. Look in sites/default/files/civicrm/custom. The attachment file is still there.
4. Also the entries are still there in civicrm_file and civicrm_entity_file even though the entry in civicrm_activity isn't there anymore.This might be an old issue but I did a quick look and didn't see anything. If a file is shared between two entities, then I could understand if it leaves civicrm_file and the file itself and just removes civicrm_entity_file, but it doesn't seem to remove anything, and even when there's no sharing (i.e. zero reference count).
1. Create e.g. an email activity. Add an attachment.
2. Delete the activity, e.g. from your contact's activity tab.
3. Look in sites/default/files/civicrm/custom. The attachment file is still there.
4. Also the entries are still there in civicrm_file and civicrm_entity_file even though the entry in civicrm_activity isn't there anymore.5.27.0git:civicrm-coresig:bugtriagedhttps://lab.civicrm.org/dev/core/-/issues/1786Report Dashlets and My Reports: Values are not being saved on Access tab2020-06-02T04:47:38Zlottielottie@openflows.comReport Dashlets and My Reports: Values are not being saved on Access tabOverview
----------------------------------------
I am experiencing an issue where I am unable to generate new report dashlets and unable to add reports to My Reports.
I've tried it on two client sites after another client reported the issue on their site with the same result. I also tried it on this demo site: https://demo.circle-interactive.co.uk. These are all 5.24.x sites. Since two people reported they were able to generate new dashlets using 5.25.0 (https://civicrm.stackexchange.com/questions/35704/what-happened-to-saving-reports-as-dashlets), I updated one of the sites to 5.25.0 to see if this would solve the issue. It did not.
1. Choose a report that does not have a dashlet already. I used *Contribution Report - Top Donors*.
2. On the *Top Donors >> Access tab*, I enable **Add to My Reports** and **Available for Dashboard** and then **Refresh Results**.
3. Under *Reports >> My Reports*, Top Donor is not shown. Nor is it shown as a dashlet when I view **Configure Your Dashboard**.
What I did discover, is that the values for **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** are not being saved. (I've tried this in two browsers: Chrome and Firefox updated to the latest versions.)
Reproduction steps
----------------------------------------
1. Load a report and view the *Access tab*.
2. Update values for **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** fields and click **Refresh Results/View Results**.
3. Return to the *Access tab* for the same report and verify that the values are what you set in step 2.
4. Load a different Civi page (such as Report Listing)
5. Return to the *Access tab* for the report where you set you new values. In my case they have reverted to my original values. And no dashlet/no my reports have been added.
What's also strange is that I thought that using the browser's Developer Tool reload option **Empty Cache and Hard Reload** would revert the values; but it did not. It seems that this only happens when I load a new Civi page and then return to the Access tab of the report.
Current behaviour
----------------------------------------
Attempting to assign new values to **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** fields fails. They are not saved.
Expected behaviour
----------------------------------------
Values should be saved and if **Add to My Reports** and **Available for Dashboard** are enabled the report should appear in My Reports and as a dashlet.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ _Firefox 76.0.1 (64-bit)/Chrome 83.0.4103.61 (Official Build) (64-bit)
* __CiviCRM:__ _Master 5.25.0 and 5.24.3
* __PHP:__ _7.1, 7.2, & 7.3
* __CMS:__ _Drupal 7.70
* __Database:__ _MySQL 5.7.30 and MariaDB 10.1.44
* __Web Server:__ _Apache/2.4.25
Comments
----------------------------------------
_Anything else you would like the reviewer to note._Overview
----------------------------------------
I am experiencing an issue where I am unable to generate new report dashlets and unable to add reports to My Reports.
I've tried it on two client sites after another client reported the issue on their site with the same result. I also tried it on this demo site: https://demo.circle-interactive.co.uk. These are all 5.24.x sites. Since two people reported they were able to generate new dashlets using 5.25.0 (https://civicrm.stackexchange.com/questions/35704/what-happened-to-saving-reports-as-dashlets), I updated one of the sites to 5.25.0 to see if this would solve the issue. It did not.
1. Choose a report that does not have a dashlet already. I used *Contribution Report - Top Donors*.
2. On the *Top Donors >> Access tab*, I enable **Add to My Reports** and **Available for Dashboard** and then **Refresh Results**.
3. Under *Reports >> My Reports*, Top Donor is not shown. Nor is it shown as a dashlet when I view **Configure Your Dashboard**.
What I did discover, is that the values for **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** are not being saved. (I've tried this in two browsers: Chrome and Firefox updated to the latest versions.)
Reproduction steps
----------------------------------------
1. Load a report and view the *Access tab*.
2. Update values for **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** fields and click **Refresh Results/View Results**.
3. Return to the *Access tab* for the same report and verify that the values are what you set in step 2.
4. Load a different Civi page (such as Report Listing)
5. Return to the *Access tab* for the report where you set you new values. In my case they have reverted to my original values. And no dashlet/no my reports have been added.
What's also strange is that I thought that using the browser's Developer Tool reload option **Empty Cache and Hard Reload** would revert the values; but it did not. It seems that this only happens when I load a new Civi page and then return to the Access tab of the report.
Current behaviour
----------------------------------------
Attempting to assign new values to **Add to My Reports, Available for Dashboard, Limit Dashboard Results and Cache dashlet for** fields fails. They are not saved.
Expected behaviour
----------------------------------------
Values should be saved and if **Add to My Reports** and **Available for Dashboard** are enabled the report should appear in My Reports and as a dashlet.
Environment information
----------------------------------------
<!-- Some of the items below may not be relevant for every bug - if in doubt please include more information than you think is neccessary. -->
* __Browser:__ _Firefox 76.0.1 (64-bit)/Chrome 83.0.4103.61 (Official Build) (64-bit)
* __CiviCRM:__ _Master 5.25.0 and 5.24.3
* __PHP:__ _7.1, 7.2, & 7.3
* __CMS:__ _Drupal 7.70
* __Database:__ _MySQL 5.7.30 and MariaDB 10.1.44
* __Web Server:__ _Apache/2.4.25
Comments
----------------------------------------
_Anything else you would like the reviewer to note._git:civicrm-coresig:unverified-bugtriagedhttps://lab.civicrm.org/dev/core/-/issues/1747Regression: Fails to create smartgroup or refresh count of group2020-06-02T01:16:03ZPradeep Nayakpradpnayak@gmail.comRegression: Fails to create smartgroup or refresh count of groupOverview
----------------------------------------
Since upgrading to 5.24 creating smart group using 'Date Added to CiviCRM' fails with DB Error: no such table. Also when a smart group is based on 'Date Added to CiviCRM' and try to refresh the count it fails with same error message
Reproduction steps
----------------------------------------
1. Navigate to CiviCRM >> Search >> Custom Searches >> Date Added to CiviCRM
1. Do a search on date and include in group.
1. Select all contact and try adding to smart group.
1. Got an error "**Fatal error: DB error**".
![smartGroupError](/uploads/3ea50e38bccd47141831b4990f6f6b0a/smartGroupError.gif)
Current behaviour
----------------------------------------
Get DB error 'Database Error Code: Table 'dmastercivi_g5lis.civicrm_tmp_e_ig_6f1e2d3b300d50a856f5cb9140996451' doesn't exist, 1146' when trying to create smart group or refresh count
Expected behaviour
----------------------------------------
smart should be created with correct contacts in it and also when refreshing the group count, the group should show correct count
Environment information
----------------------------------------
https://dmaster.demo.civicrm.org/Overview
----------------------------------------
Since upgrading to 5.24 creating smart group using 'Date Added to CiviCRM' fails with DB Error: no such table. Also when a smart group is based on 'Date Added to CiviCRM' and try to refresh the count it fails with same error message
Reproduction steps
----------------------------------------
1. Navigate to CiviCRM >> Search >> Custom Searches >> Date Added to CiviCRM
1. Do a search on date and include in group.
1. Select all contact and try adding to smart group.
1. Got an error "**Fatal error: DB error**".
![smartGroupError](/uploads/3ea50e38bccd47141831b4990f6f6b0a/smartGroupError.gif)
Current behaviour
----------------------------------------
Get DB error 'Database Error Code: Table 'dmastercivi_g5lis.civicrm_tmp_e_ig_6f1e2d3b300d50a856f5cb9140996451' doesn't exist, 1146' when trying to create smart group or refresh count
Expected behaviour
----------------------------------------
smart should be created with correct contacts in it and also when refreshing the group count, the group should show correct count
Environment information
----------------------------------------
https://dmaster.demo.civicrm.org/5.26.0regressionhttps://lab.civicrm.org/dev/core/-/issues/1784Contact restore from trash not working2020-06-01T00:07:09ZDaveDContact restore from trash not workingSee also https://civicrm.stackexchange.com/questions/35766/restore-from-trash-not-working-no-related-log-entries
Seems to be from here: https://github.com/civicrm/civicrm-core/commit/8e12bf072fe613c29da39614c8999a4041d7e1d2
In contactTrashRestore() it used to fall through to the code below which does the save(). Then by just copying that block to deleteContact() and calling self::create() it doesn't work because it's expecting `contact_id` not `id`.
So would have started in 5.25.
The quick fix would be to use contact_id. But it sounds like there's a desire to deprecate this entire path of calling deleteContact in order to restore.See also https://civicrm.stackexchange.com/questions/35766/restore-from-trash-not-working-no-related-log-entries
Seems to be from here: https://github.com/civicrm/civicrm-core/commit/8e12bf072fe613c29da39614c8999a4041d7e1d2
In contactTrashRestore() it used to fall through to the code below which does the save(). Then by just copying that block to deleteContact() and calling self::create() it doesn't work because it's expecting `contact_id` not `id`.
So would have started in 5.25.
The quick fix would be to use contact_id. But it sounds like there's a desire to deprecate this entire path of calling deleteContact in order to restore.5.26.0regressionhttps://lab.civicrm.org/dev/core/-/issues/1791E_WARNINGS when viewing list of pledge payments2020-05-31T22:32:29ZDaveDE_WARNINGS when viewing list of pledge payments1. Add a pledge for a contact. The details don't matter much, e.g. put in an amount and leave all the rest as defaults.
2. On the contact's pledges tab, right-click on the triangle to the left of the table that expands the pledge payment sequence and choose Open in New Tab.
3. Screen fills with E_WARNINGS.
4. You can also see it if you click the triangle normally and then check drupal watchdog.
The cause is some missing quotes here: https://github.com/civicrm/civicrm-core/blob/5.25.0/templates/CRM/Pledge/Page/Payment.tpl#L341. Add a pledge for a contact. The details don't matter much, e.g. put in an amount and leave all the rest as defaults.
2. On the contact's pledges tab, right-click on the triangle to the left of the table that expands the pledge payment sequence and choose Open in New Tab.
3. Screen fills with E_WARNINGS.
4. You can also see it if you click the triangle normally and then check drupal watchdog.
The cause is some missing quotes here: https://github.com/civicrm/civicrm-core/blob/5.25.0/templates/CRM/Pledge/Page/Payment.tpl#L345.27.0https://lab.civicrm.org/dev/core/-/issues/1100Proposal to add a new hook_civicrm_alterExternUrl2020-05-30T01:02:26ZAndrei Mondocandreimondoc@gmail.comProposal to add a new hook_civicrm_alterExternUrlThere's been talks about deprecating all `extern` scripts in favour of CMS REST endpoints or use [CiviCRM's routing](https://lab.civicrm.org/dev/cloud-native/issues/16), and along the way helping other issues like CMS bootstrapping, base paths, and session management.
[Drupal 8](https://www.drupal.org/docs/8/api/restful-web-services-api) and [WordPress](https://developer.wordpress.org/rest-api/) offer the possibility of extending their REST endpoints, and it seems Joomla does so too although unofficially? ([REST API for Joomla!](https://extensions.joomla.org/extension/rest-api/) and [cAPI Core REST API for Joomla!](https://extensions.joomla.org/extension/capi-core-rest-api/))
This seems to me like a sensible way forward, hence my proposal to add a `hook_civicrm_alterExternUrl` something along the lines of:
``` php
// Create an event object.
$event = GenericHookEvent::create(array(
'type' => 'cxn', // replacing with ipn|extern|soap|pxIPN|etc.
'civiURL' => &$civiUrl,
'url' => rtrim($civiUrl, '/') . '/extern/cxn.php',
);
/**
* Allow filtering of extern URL.
*
* @since ...
*
* @param string $hook_name The dispatched hook name.
* @param object $hook_event The dispatched hook event object.
*/
Civi::service('dispatcher')->dispatch('hook_alterExternUrl', $event);
return $event->url;
```
I have completed the [REST endpoints integration for WordPress](https://github.com/civicrm/civicrm-wordpress/pull/160) and I remember someone (in Mattermost) mentioning they were/are doing the same for Drupal 8. In order to start testing and integrating those endpoints this hook would a good transition.
Any feedback is appreciated, thanks.There's been talks about deprecating all `extern` scripts in favour of CMS REST endpoints or use [CiviCRM's routing](https://lab.civicrm.org/dev/cloud-native/issues/16), and along the way helping other issues like CMS bootstrapping, base paths, and session management.
[Drupal 8](https://www.drupal.org/docs/8/api/restful-web-services-api) and [WordPress](https://developer.wordpress.org/rest-api/) offer the possibility of extending their REST endpoints, and it seems Joomla does so too although unofficially? ([REST API for Joomla!](https://extensions.joomla.org/extension/rest-api/) and [cAPI Core REST API for Joomla!](https://extensions.joomla.org/extension/capi-core-rest-api/))
This seems to me like a sensible way forward, hence my proposal to add a `hook_civicrm_alterExternUrl` something along the lines of:
``` php
// Create an event object.
$event = GenericHookEvent::create(array(
'type' => 'cxn', // replacing with ipn|extern|soap|pxIPN|etc.
'civiURL' => &$civiUrl,
'url' => rtrim($civiUrl, '/') . '/extern/cxn.php',
);
/**
* Allow filtering of extern URL.
*
* @since ...
*
* @param string $hook_name The dispatched hook name.
* @param object $hook_event The dispatched hook event object.
*/
Civi::service('dispatcher')->dispatch('hook_alterExternUrl', $event);
return $event->url;
```
I have completed the [REST endpoints integration for WordPress](https://github.com/civicrm/civicrm-wordpress/pull/160) and I remember someone (in Mattermost) mentioning they were/are doing the same for Drupal 8. In order to start testing and integrating those endpoints this hook would a good transition.
Any feedback is appreciated, thanks.5.23.0improvementtriagedtype:proposal