Events Manager
[resolved] Events Manager Database (9 posts)

  1. jpatlakas
    Posted 2 years ago #

    Hello everyone,
    I have implemented a totally new event submition form and I wanted to write an event using the wpdb utility, by writting to the tables needed.

    More precisely I am writting to the wp_posts, wp_em_events, wp_em_tickets, wp_term_relationships (for the categories).

    So, I am giving a slug of my choise but when I try to access the event using the link e.g. mydomain.com/events/myevent the page is not found, while for an event that is added through the normal form that link works, where myevent is the slug (in my case both of the post and the event).

    Did I missed writting to another table or is it something wrong on using the slug that way? What can I do?



  2. angelo_nwl
    NetWebLogic Support
    Posted 2 years ago #

    how about hooking into em_event_save filter instead ?

  3. jpatlakas
    Posted 2 years ago #

    $event = new EM_Event();
     ... // passing the data to $event
     $aa = apply_filters('em_event_save', true, $event);

    Do you mean something like that?
    It is not working(i.e. now new event is created).

  4. jpatlakas
    Posted 2 years ago #

    I also tried
    with no result

  5. caimin_nwl
    NetWebLogic Support
    Posted 2 years ago #

    Is the problem that your event info isn't being saved or just that the permalink isn't working?

  6. jpatlakas
    Posted 2 years ago #

    The second. The permalink is not working.
    Moreover, I am writting to the database in the tables I mentioned, and I can see my event in the category that I saved it, but I the link to the event is not working.

    Also I cannot see it in the wp-admin as an event, but it appears in the category page when I search for it in my site.

  7. jpatlakas
    Posted 2 years ago #

    To give some more info, I am doing inserts like:

    INSERT INTO  wp_posts (post_author,post_title,post_status,post_name,post_type,guid)
    VALUES ('2',  'Basketball',  'publish',  'Basketball',  'event', 'http://mydomain/events/basketball' );
    INSERT INTO  wp_term_relationships (object_id,term_taxonomy_id)
    VALUES ('156','6');
    INSERT INTO  wp_em_events (post_id,event_slug,event_owner,event_status,event_name,event_start_time,event_start_date,location_id)
    VALUES ('156','Basketball','2','1','Basketball','00:00:00','2014-11-05','3');

    with those I can see the event on the category basketball, but the link to it results to "Page not found".
    I will appriciate any help.

  8. caimin_nwl
    NetWebLogic Support
    Posted 2 years ago #

    If you take look at the wp_em_events table, do you see anything under event_slug for the events you're saving?

    I think that's where it's going wrong, the slug is either not being saved or is being saved incorrectly. In your example above, it should be basketball rather than Basketball, for example.

  9. writegnj
    Posted 2 years ago #

    Did u solve this problem? I'm having the same issue.

    I made a custom front-end form and save event/location data with wpdb.
    I checked all data stored in below tables.
    Browse wp_em_locations

    But it does not show up in back-end under events(or posts) and the event page(contains correct slug) goes to page not found. On the back-end tho, It counts the event I submitted with my custom form(All event number) but not displaying it on the page.

    Please let me know if u did solve this problem.. thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic