4 years, 6 months ago
I am trying to use bp_core_add_message to show when an Xprofile field is in error.
Following through the code, the template notices exist in the function bp_core_add_message.
Anywhere after this point, they do not appear to be saved in the $bp global, nor do the cookies write in the browser.
Any help would be appreciated.
Are you sure bp_core_add_message() is being executed?
Yes, I used wp_mail to send me the relevant error message and message type that was set during the bp_core_add_message
It was the same as sent to the function.
The site is on https, would that make a difference?
It shouldn’t because setcookie() is passed is_ssl() as the 6th argument.
Found a couple of unncessary plugins that were throwing “Cannot modify header information” errors – have removed those now.
I look to have fixed my cookie issues, where should these messages appear, in a template_notices div?
See also: WordPress.org •
Follow BuddyPress on Twitter •
Contact Us •
Terms of Service