Good morning,
I need to send notifications when a user update a specific custom fields on an intermediary post.
I'm using plugin " Better Notifications for WP" . In the demo innovenetorir.qweb.eu the notification worked and I had the toolset type 3.4.16. While in production site I have toolset type 3.4.17 and it doesn't work.
If I insert this shortcode [custom_field field="wpcf-data-associazione-1" type="timestamp" format="YY/m/d"] the mail does not start.
If I delete the text string [custom_field field="wpcf-data-associazione-1" type="timestamp" format="YY/m/d"] from the body messagge, the mail is sent.
Could you tell me how to insert the custom field in the message in another way?
The difference between the notification being sent and not being sent is simply whether you include that particular custom_field shortcode in the body of the email?
That suggests that the inclusion of the shortcode is likely triggering an error, but you are not seeing the error.
Can you please check your debug.log to see if that is the case?
If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:
That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor. Try triggering the notification again and then inspect the log.
Goog morning.
I made the change and enabled debugging. This is what I found in the log:
[02-Mar-2023 08:01:11 UTC] PHP Notice: Trying to access array offset on value of type bool in /home/innoveneto/public_html/wp-content/plugins/bnfw-custom-fields/includes/class-bnfw-custom-field-notification.php on line 525
[02-Mar-2023 08:01:11 UTC] PHP Notice: WP_Block_Type_Registry::register è stato richiamato in maniera scorretta. I nomi del blocco devono contenere un prefisso namespace. Per esempio: mio-plugin/mio-blocco-personalizzato Leggi Debugging in WordPress per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 5.0.0.) in /home/innoveneto/public_html/wp-includes/functions.php on line 5231
It looks like you would need the premium add-on for custom fields to be able to see this issue. We don't have access to that. We could request our compatibility team contact the plugin authors, but it would be quicker and easier if you reproduced the problem on a test server.
You can access the back end with this link: hidden link
I would suggest you first check on your site whether the issue occurs more generally, when a custom field of some custom post type is updated, or does it specifically require that the custom field belongs to an intermediate post type?
Can I check the steps needed to reproduce the issue on that site?
I just tried editing an intermediate post (the only one) and changing one of the date fields, and that triggered the notification. (I'm using a mail logging plugin to catch outgoing emails, and you can see the results at Tools > WP Mail Log, where there are resulting notification emails.
The topic ‘[Closed] Notification when update custom field in the intermediary post’ is closed to new replies.