• Resolved imramugh

    (@imramugh)


    Wondering if there are any other options for exporting data from the 12 Step Plugin?

    I’m having trouble with the default CSV export. This is because folks in our intergroup office keep using multiple lines in the location and meeting notes. Since both fields are “memo” fields from a wordpress perspective, they allow multiple carriage returns.

    This means that because CSV records are terminated by a newline, upon import the record get’s broken. I currently have 73 meetings that get “broken” each time we refresh the data.

    Wondering if we can have an export that produces a SQL statement that can be loaded up pretty much anywhere for manipulation, or XML, JSON, etc.

    That said, the plug-in is simply excellent and does exactly what we need for the Toronto Intergroup.

    https://ww.wp.xz.cn/plugins/12-step-meeting-list/

Viewing 1 replies (of 1 total)
  • Plugin Author AA Web Servant

    (@aasanjose)

    I’m going to close this ticket per our emails offline.

    Thanks for identifying the CSV issue, it turns out the plugin had some bugs related to multi-line exports and imports. These should all be fixed as of version 2.1.8.

    Between the CSV now working properly, and the availability of the JSON feed, it sounds like the SQL statement is no longer needed. But as I mentioned over email, there’s actually a fair amount of PHP that helps format the results properly, so raw SQL doesn’t do a very good job at grabbing the data. That said, here is the foundation of a SQL query one could use to fetch one’s meeting data out of WordPress if the regular methods weren’t an option:

    SELECT
    	m.id meeting_id,
    	m.post_title meeting_name,
    	m.post_name meeting_slug,
    	m.post_content meeting_notes,
    	m.post_modified_gmt meeting_updated,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = m.id AND meta_key = 'day') day,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = m.id AND meta_key = 'time') time,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = m.id AND meta_key = 'types') types,
    	l.post_title location_name,
    	l.post_content location_notes,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = l.id AND meta_key = 'address') address,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = l.id AND meta_key = 'city') city,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = l.id AND meta_key = 'state') state,
    	(SELECT meta_value FROM wp_postmeta WHERE post_id = l.id AND meta_key = 'postal_code') postal_code
    FROM wp_posts m
    JOIN wp_posts l ON m.post_parent = l.id
    WHERE m.post_type = ‘meetings’
Viewing 1 replies (of 1 total)

The topic ‘Export Meeting List’ is closed to new replies.