Event Submission Form is Broken

Home Forums Calendar Products Community Events Event Submission Form is Broken

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #631751
    hc2ca
    Participant

    The community submission form is not functioning. Users may not submit events as the submit button has disappeared. Furthermore, the css for the page is beyond sparse. No new plugins have been added/updated save for the update to the most recent version of Modern Tribe. Disabling plugins, reverting to default theme do not correct the errors.

    #640689
    Barry
    Member

    How unusual.

    Can you confirm if you have any custom templates in place (ie, within a tribe-events folder inside your theme) and if so can you temporarily remove those or rename the folder so they cannot be loaded and see if that makes any difference in the first instance?

    Thanks!

    #649015
    hc2ca
    Participant

    Amazing! It worked, but isn’t that strange? We’d already tried to revert to the default theme, which does not have a tribe-events folder inside, and that did not fix the issue. But keeping the same theme active and simply renaming the tribe-events folder did. As I said, strange.

    It’s been so long since I’ve touched that tribe-events folder, I can’t really remember what it does. Everything on our site appears the way it should, I’ve copied/pasted below so you can take a look at what was there.

    #649018
    hc2ca
    Participant

    <?php
    /**
    * Event Submission Form
    * The wrapper template for the event submission form.
    *
    * Override this template in your own theme by creating a file at
    * [your-theme]/tribe-events/community/edit-event.php
    *
    * @package TribeCommunityEvents
    * @since 3.1
    * @author Modern Tribe Inc.
    *
    */

    if ( !defined(‘ABSPATH’) ) { die(‘-1’); } ?>

    <?php tribe_get_template_part(‘modules/header-links’); ?>

    <?php do_action( ‘tribe_events_community_form_before_template’ ); ?>

    <form method=”post” enctype=”multipart/form-data”>

    <?php wp_nonce_field( ‘ecp_event_submission’ ); ?>

    <!– Event Title –>
    <?php do_action( ‘tribe_events_community_before_the_event_title’ ) ?>

    <div class=”events-community-post-title”>
    <?php // Validation
    $class = ( $_POST && empty( $event->post_title ) ) ? ‘error’ : ”; ?>
    <label for=”post_title” class=”<?php echo $class; ?>”><?php _e( ‘Event Title:’, ‘tribe-events-community’ ); ?><small class=”req”><?php _e( ‘(required)’, ‘tribe-events-community’ ); ?></small></label>
    <?php tribe_community_events_form_title(); ?>
    </div><!– .events-community-post-title –>

    <?php do_action( ‘tribe_events_community_after_the_event_title’ ) ?>

    <!– Event Description –>
    <?php do_action( ‘tribe_events_community_before_the_content’ ); ?>

    <div class=”events-community-post-content”>
    <?php // Validation
    $class = ( $_POST && empty($event->post_content ) ) ? ‘error’ : ”; ?>
    <label for=”post_content” class=”<?php echo $class; ?>”><?php _e( ‘Event Description:’, ‘tribe-events-community’ ); ?><small class=”req”><?php _e( ‘(required)’, ‘tribe-events-community’ ); ?></small></label>
    <?php tribe_community_events_form_content(); ?>
    </div><!– .tribe-events-community-post-content –>

    <?php do_action( ‘tribe_events_community_after_the_content’ ); ?>

    <?php tribe_get_template_part(‘modules/taxonomy’); ?>

    <?php //tribe_get_template_part(‘modules/image’); ?>

    <?php tribe_get_template_part(‘modules/datepickers’); ?>

    <?php tribe_get_template_part(‘modules/venue’); ?>

    <?php tribe_get_template_part(‘modules/organizer’); ?>

    <?php tribe_get_template_part(‘modules/website’); ?>

    <?php tribe_get_template_part(‘modules/custom’); ?>

    <?php tribe_get_template_part(‘modules/cost’); ?>

    <!– Spam Control –>
    <?php $this->formSpamControl(); ?>

    <!– Form Submit –>
    <?php do_action( ‘tribe_events_community_before_form_submit’ ); ?>
    <div class=”tribe-events-community-footer”>
    <input type=”submit” id=”post” class=”button submit events-community-submit” value=”<?php

    if( isset( $post_id ) && $post_id )
    echo apply_filters( ‘tribe_ce_event_update_button_text’, __( ‘Update Event’, ‘tribe-events-community’ ) );
    else
    echo apply_filters( ‘tribe_ce_event_submit_button_text’, __( ‘Submit Event’, ‘tribe-events-community’ ) );

    ?>” name=”community-event” />
    </div><!– .tribe-events-community-footer –>
    <?php do_action( ‘tribe_events_community_after_form_submit’ ); ?>

    </form>
    <?php do_action( ‘tribe_events_community_form_after_template’ ); ?>

    #649027
    hc2ca
    Participant

    Should I be replacing this with another file. Do I need to preserve anything… or should I simply stay the course and see how things work out?

    #649104
    hc2ca
    Participant

    Upon further inspection, it appears as though that file helped me disable the image upload feature on the community form. Is there a way I can keep that disabled?

    #650781
    Barry
    Member

    So you mean your custom community/edit-event.php template was the problem? Could you simply replace it with the default one and – just as in your custom version – find the following line:

    <?php tribe_get_template_part( 'community/modules/image' ); ?>

    Then comment it out by doing this?

    <?php // tribe_get_template_part( 'community/modules/image' ); ?>

    Would that work?

    (As an aside, it’s often best to share larger chunks of code by using a service like Pastebin or Gist … simply because the forum currently is not well equipped to handle code and periodically sections of pasted code are stripped out, which can confuse things a little at times 😉 )

    #653479
    hc2ca
    Participant

    Correct, the community/edit-event.php template was the problem. It was the only file in the custom templates folder within the theme folder.

    I’ve edited the default edit-event.php as you suggested and it worked just fine. My only concern with that approach is that the change could revert during future upgrades. Correct me if I’m wrong, but I was under the impression that was why it was originally suggested to go the other route and place that file within the theme directory.

    Totally ack the comment about Pastebin. Was in a hurry this AM to get on with other things. Appreciate your help.

    #654648
    Barry
    Member

    Hi!

    I’ve edited the default edit-event.php as you suggested and it worked just fine. My only concern with that approach is that the change could revert during future upgrades. Correct me if I’m wrong, but I was under the impression that was why it was originally suggested to go the other route and place that file within the theme directory.

    Sorry for any confusion – I didn’t actually mean that you should edit the default template file itself, rather when I suggested replacing it with the (current) default one I meant you should make a fresh copy and then re-apply the change.

    In other words, this should still be done from within your theme’s tribe-events directory and not by modifying the original plugin template itself.

    Does that clarify things?

    #668173
    hc2ca
    Participant

    Absolutely. Problem solved. Guess I have to keep an eye on that file for future upgrades. Something to note for others who have custom templates within their theme folder.

    #668209
    Barry
    Member

    Awesome, glad it’s fixed 🙂

    One thing to note is we often publish a blog post covering “things to be aware of” when new releases roll out over in our products news stream so that’s definitely worth monitoring (I don’t honestly recall if the changes pertinent in this case were noted or not – but we do try our best to cover most things that have potential to cause disruption).

    In any case since it looks like we’re all good at this point I will go ahead and close the thread, but if we can assist with anything else please don’t hesitate to create new threads as needed and one of the team will be only too happy to help 🙂

    Last but not least, we’re always on the look out for further feedback and welcome anything you might add with regards to The Events Calendar over on our plugin review page – thanks again!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Event Submission Form is Broken’ is closed to new replies.