Forum Replies Created
-
AuthorPosts
-
Dan
ParticipantCasey. Definitely the frontend, not sure if it’s happening on the backend. I noticed that the two $false arrays were different though and that the second one held a few more keys (http://pastebin.com/nnUwP2DZ). For the mean time I am doing a quick fix by only targeting the second action based on a conditional for a key in the second array that’s not in the first.
Dan
ParticipantCasey,
All seems to be working fine so far. It may have been a result of updating to the most recent versions that fixed everything. Thanks again for your help.Dan
ParticipantCasey. Not sure what has changed… I must have moved something around, but it seems to be working. I plan to do more testing tonight. I will report back if I have any more errors or can put this to rest.
Thanks so much for your help and sticking with me.
Dan
ParticipantNo. triggered in backend and in frontend only when adding a new event. When updating an event on the frontend, it’s not being triggered.
Thanks
Dan
ParticipantCasey,
When adding a new event from the front end, the tribe_events_update_meta action is triggered.Dan
ParticipantCasey,
That is correct. I am not able to see the output of var_dump on the frontend. I have updated to 2.0.11 and 1.0.5. In the backend, I see the var_dump and exit() triggered.From the source code, it looks like the only problem could be with the file tribe-event-api.class.php. In the updateEvent function saveEventMeta is only triggered if wp_update_post($args) returns true…
Thanks.Dan
ParticipantCasey,
Unfortunately, it doesn’t appear that the tribe_events_update_meta hook is triggered when events are saved via community events. The meta is saved when on the backend, however.add_action( ‘tribe_events_update_meta’, ‘pcs_save_trash_meta’, 10, 1 );
function pcs_save_trash_meta($post_id) {
global $post;
$post_id = (int) $post_id;
var_dump($post_id); exit();
}With the above code in my functions.php file, the “Event submitted.” page shows up after submission with no exit() command called. The database also has not been updated.
Dan
ParticipantCasey,
So I looked into it. Will this action also trigger when saving an event in the backend? Currently I am using ‘save_post’ action to trigger my function to save the post meta in the backend. Can I remove that hook and still have my function triggered from tribe_events_update_meta?
Thank!Dan
ParticipantCasey,
Thanks for your quick responses. I was recently pulled onto another project and haven’t had a chance to investigate your suggestion. I will let you know how it goes when I can try it out.Thanks!
Dan
ParticipantBarry. Thanks for the quick reply. It’s true, additional field feature could work, but then it wouldn’t have datepicker functionality.
-
AuthorPosts
