• Resolved jpatlakas

    (@jpatlakas)


    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?

    Thanks,

    http://wordpress.org/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    how about hooking into em_event_save filter instead ?

    Thread Starter jpatlakas

    (@jpatlakas)

    $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).

    Thread Starter jpatlakas

    (@jpatlakas)

    I also tried
    $event->save();
    with no result

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

    Thread Starter jpatlakas

    (@jpatlakas)

    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.

    Thread Starter jpatlakas

    (@jpatlakas)

    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.
    Thanks

    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.

    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.
    wp_posts
    wp_em_events
    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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Events Manager Database’ is closed to new replies.