Marcus J Wilson

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • in reply to: WordPress Search and Recurring Events #477821
    Marcus J Wilson
    Participant

    Hi –

    I’m opening up this issue again, as we’ve encountered this same issue on a new site running up to date versions of EC/ECP.
    A WordPress search fails to return more than one instance of an event with the same name. For instance, we have three events in EC entitled “The Bridge Rising”, with slugs of “the-bridge-rising”, “the-bridge-rising-1” and “the-bridge-rising-2”. Only the first is returned in WP searches.

    Do you have an idea why this might be? Recurring events in EC do seem to be showing all instances in search results, but events with the same Title seem to show only one instance in WP searches.

    Thanks
    Marcus

    in reply to: Fatal error: Class 'Tribe_Template_Factory' not found #120925
    Marcus J Wilson
    Participant

    Thanks for the help with this Barry. I *THINK* we’ve managed to fix this problem through a combination of updating WP, Events Calendar and ECP to latest versions. My suspicion is that there was some conflict between EC/ECP and another plugin on the site that caused fatal errors in the Cron, but we’ve not been able to pinpoint exactly which. Will let you know if we ever find out!
    Thanks again
    Marcus

    in reply to: Fatal error: Class 'Tribe_Template_Factory' not found #117302
    Marcus J Wilson
    Participant

    Yes, CiviCRM is a plugin, Barry… although, yes, as you say it does seem to take a non-standard approach to hooking in to cron. However, it does seem that the cron runs fine with just CiviCRM and The Events Calendar enabled in WordPress – it’s ECP that seems to trigger the error (that is, ECP as we have ECP settings on our site… vanilla ECP seems to work fine).

    in reply to: Fatal error: Class 'Tribe_Template_Factory' not found #116833
    Marcus J Wilson
    Participant

    Thanks Barry –

    Civi Cron is the CiviCRM Client Relationship Management system Cron job. It needs to run without errors in order to perform any cron functions for the CRM, and at the moment ECP is causing it to fail.

    There’s some info here of another user with the same issue: https://forum.civicrm.org/index.php?topic=30379.0

    The key line from the CiviCRM developer in this thread is: “Civi Cron job bootsraps WordPress so we can call hooks and other neat stuff”. So, Civi Cron seems to be calling in the function that is throwing a fatal error in ECP and causing the cron to fail (“Fatal error: Class ‘Tribe_Template_Factory’ not found).

    I asked the developer about the “stack trace” (I’m not quite sure what this refers to), but he didn’t reference this in his diagnosis.

    It would be really helpful if you could help us pinpoint the problem here…

    Best wishes and thanks for your continued help.
    Marcus

    in reply to: Fatal error: Class 'Tribe_Template_Factory' not found #116727
    Marcus J Wilson
    Participant

    Thanks, Barry – A developer looked into this for us, and we have narrowed down the problem now:

    When we disable all plugins on our site and use the Default WP theme: Our Cron job works

    When we enabled all plugins with Default WP Theme: Cron job fails

    When we disabled plugins one by one with Default WP Theme: Cron job fails until Events Calendar Pro is disabled, then Cron job succeeds.

    Using our own theme: Cron fails as soon as Events Calendar Pro is enabled.

    Using our own theme with all Plugins enabled except The Event Calendar (Event Calendar Pro disabled): Cron succeeds

    Using our own theme with all Plugins disabled except The Event Calendar (Event Calendar Pro disabled): Cron succeeds

    Using our own theme with only The Events Calendar and Events Calendar pro enabled: Cron fails

    There is something about The Events Calendar Pro (or our settings) that is causing Cron to fail. On a simple install with a basic, unconfigured Events Calendar Pro, Civi cron works, so there must be something unique with our configuration of the plugin.

    Can you help us further to resolve what this might be?

    Thanks
    Marcus

    in reply to: Fatal error: Class 'Tribe_Template_Factory' not found #115892
    Marcus J Wilson
    Participant

    Many thanks, Barry –

    There’s some info on someone else having the same issue at:
    https://forum.civicrm.org/index.php?topic=30379.0

    Best
    Marcus

    in reply to: Add link to book tickets from Event list #106034
    Marcus J Wilson
    Participant

    Great, Barry – thanks.
    So, if we used the conditional if (!woot_has_soldout()) against the Event ID within the loop, would this be sufficient logic to assume that (a) the event is an event for which tickets exist in Woo, and (b) there are still tickets left for purchase? If so, that would suffice for our requirements.
    Thanks
    Marcus

    Marcus J Wilson
    Participant

    For info… to resolve the issue of submitting Organizer (or Venue) titles from a Gravity Form (+Custom Post Types) into Events Calendar Pro, we ended up adding a hook to our site’s functions.php. This hooks takes the value of the Organizer (as it is submitted in the field from Gravity Forms) and change it into the value expected by Events Calendar Pro:

    add_action( ‘save_post’, ‘dx_prepare_organization’, 15 );
    function dx_prepare_organization() {
    if( ! empty( $_POST[‘gform_submit’] ) && $_POST[‘gform_submit’] == ‘8’ ) {
    $_POST[‘organizer’][‘Organizer’] = $_POST[‘input_1’];
    }
    }

    This hook fires immediately before ECP’s own hook, so it prepares the data before it is passed to ECP.

    $_POST[‘gform_submit’] == ‘8’ should be set to your Gravity Form ID.
    $_POST[‘input_1’] should be set to the name of the field in the Gravity Forms that is used to record the Organizer title.

    I hope this helps others!

    Many thanks for your help with this, Brook.

    Best
    Marcus

    Marcus J Wilson
    Participant

    Ah yes – Thanks, Brook – this looks like we’re getting close now.

    So… at the moment, we’re using the “Gravity Forms + Custom Post Types” functionality to create a new tribe_organizer post from the front end in the usual way.

    However, it seems like ECP is then hijacking the submitted post and running its createOrganizer function on the data, which replaces our Title from the Gravity form with “Unnamed Organizer”… probably because it is expecting the Title data in a different format than how Gravity Forms is presenting it.

    http://docs.tri.be/Events-Calendar/source-class-TribeEventsAPI.html#226

    Does that sound likely? If so, I guess we may need to tweak the createOrganizer function, or to stop it running on our Gravity Form submission? Does that sound about right? If so, where does createOrganizer get hooked in to the post creation process?

    Thanks for your help!
    Marcus

    Marcus J Wilson
    Participant

    Many thanks, Barry –

    This is useful to know. However, even if we populate the post Title and _OrganizerOrganizer fields from our front end form, the post is still showing up with a Title of “Unnamed Organizer” in ECP.

    There’s a fuller description of the problem at https://theeventscalendar.com/support/forums/topic/organizer-and-venue-custom-post-types-mapping-title-from-frontend-form/#post-88323, so you may want to close this thread down rather than duplicate.

    Thanks!
    Marcus

    Marcus J Wilson
    Participant

    Thanks, Barry – That helps us with regard to a front end Events submission form.

    However, I think you misunderstand my question. We’re actually building a front end form to submit Organizers to the Custom Post Type tribe_organizer, independent of any event submission.

    We are finding that, using Gravity forms, we can create a tribe_organizer custom post, populate all its fields (as well as some additional fields we’ve added). However, we can’t get the front end form to populate the tribe_organizer post Title… The post shows up in Events Calendar Pro’s Organizer’s post list as “Unnamed Organizer”.

    We’re tried populating both the custom post Title and the field _OrganizerOrganizer (which Barry tells us is a duplicate of the post title). However, we’re still seeing the post come in to Events Calendar Pro as “Unnamed Organizer”.

    We see the same issue when we try to populate tribe_venue custom post type from a front end form.

    My question therefore is: Is there something special about the way ECP creates these Venues and Organizers custom post types that is preventing us from populating their Titles correctly from a front end form, or is there some function called when posts are created for these custom post types that mean that our Title value gets lost along the way.

    We have a really simple test form at http://takeoneaction.org.uk.dev.pooka.info/add-org-title-field/ that we are using to test population of the Title and _OrganizerOrganizer fields, and we can give you access to the website admin if you like.

    Many thanks!
    Marcus

    Marcus J Wilson
    Participant

    We’ve got Gravity forms working in part to submit an Organizer to ECP. All fields – standard WP fields, Tribe custom fields, and our own custom fields – get populated, apart from the Title of the post, which is coming over as “Unnamed Organizer” even though we’re mapping the Gravity Title field to the tribe_organizer post title. I’ve yet to understand why this is – hence my question about what the _OrganizerOrganizer field in Tribe is for.

    Marcus

    Marcus J Wilson
    Participant

    Many thanks, Casey –

    In terms of Events and links into WooCommerce, ECP does about 90% of what we need it to, so I’d be keen to avoid rebuilding a lot of functionality from scratch. We will probably try to extend the ECP Organizers custom post type to handle the additional Organisations functionality we’ll need.

    However, from quickly checking the Organizer post type in ECP, it looks like the tribe_organizer post type doesn’t support Authors just now, so we would need to add that to the plugin, I guess.

    Also, we’ve noticed that the name of the Organizer seems to be duplicated in ECP in the post Title and within the custom field _OrganizerOrganizer. Can you explain the logic behind when the post Title is used, and when this custom field is used?

    Let me get back to you if we run into any specific questions as we make these additions.

    Best wishes and thanks
    Marcus

    in reply to: WordPress Search and Recurring Events #52868
    Marcus J Wilson
    Participant

    Thanks, Neill –

    Yes, indeed – I meant tribe_events custom post type. Sorry – a long day yesterday!

    We’re actually looking to fix this issue quite quickly for a client, so it would be good to know the logic behind which of the recurring event series WordPress search would return so we can try and override this.

    WordPress search currently returns what seems a generic URL for the recurring event:
    i.e. http://toonspeak.floatspace.net/event/lockdown/

    …rather than a specific instance…
    i.e. http://toonspeak.floatspace.net/event/lockdown/2013-07-16/

    However, that generic URL returned in the post (i.e. http://toonspeak.floatspace.net/event/lockdown/) then seems to list one instance on the event… but not necessarily the first instance. Just one event from the series – which is quite confusing.

    Any ideas gratefully received!

    Best wishes
    Marcus

Viewing 14 posts - 1 through 14 (of 14 total)