Skip Navigation

[Resolved] Strange behavior from Post Form using custom code you provided for notifications

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by lesleeM 5 months, 1 week ago.

Assisted by: Waqar.

Author
Posts
#2667381

We have a new problem with the Registration system your support team has assisted us with extensively. On each Ride page on our site, we have a Registration form for that Ride using a post form. There is a Relationship between Ride and Registration.

The problem we're having is with the Notification that goes out when this Registration Form is submitted. The Body of the Notification is as follows:

[types field='name' item="%%POST_ID%%"][/types] has registered for your %%PARENT_POST_TITLE%% ride.

The problem we're having is this code is working perfectly when the end-user submitting the form is logged in, but when the end-user is logged out the notification received is like this:

User Name has registered for your CRED Auto Draft0d58439cc9229a96cdfe27c49d805b9b ride.

Instead of showing the Ride title, it is showing that instead. But it works fine showing the correct Ride title when the user submitting the form is logged in.

Any suggestions for fixing this?

#2667627

Nigel
Supporter

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

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

I'm not sure what the custom code is that you refer to. I guess it probably relates to registering %%PARENT_POST_TITLE%% as a custom placeholder, and it is not a placeholder that is offered by default.

I used an alternative to output the post title of the parent post in my local test site, where I didn't suffer the same problem that you report.

In my notification I output the parent post title with this shortcode:

The parent post is [wpv-post-title item="@project-task.parent"]

(My site has a project-task one-to-many relationship; you would need to change the slugs to match your relationship.)

That worked whether I was logged-in or not.

#2667685

Am I just changing the code I provided previously with this instead?

[types field='name' item="%%POST_ID%%"][/types] has registered for your [wpv-post-title item="@project-task.parent"] ride.

Where am I changing the slugs?

#2667797

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thanks for writing back.

You've updated the code correctly. The only thing left is that the slug of the relationship i.e. the part 'project-task' will need to be replaced, with the slug of the relationship used on your website.

regards,
Waqar

#2668295

That looks like it worked perfectly. I tested with both logged in and not logged in user accounts and the ride title displayed properly in the notification e-mails.

Thanks a bunch.

lesleeM confirmed that the issue was resolved on 2023-11-27 02:34:46.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.