Skip Navigation

[Closed] Notification when update custom field in the intermediary post

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 5 replies, has 2 voices.

Last updated by Nigel 1 year, 8 months ago.

Assisted by: Nigel.

Author
Posts
#2563779
screencapture-innoveneto-org-wp-admin-post-php-2023-03-01-12_57_42.png

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?

Thank you

#2563823

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

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.

Let us know what you find.

#2565131

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

I await your kind indications

#2565365

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Thanks for that.

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?

#2566701

good morning,
we reproduced the specific case on the demo site and install the Notification add-ons.

Thank

#2566877

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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.