Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Agreed with graftedin. Make the excerpt customizable by either adding … after X amount of length, or by breaking word.

    Thread Starter matthewgfc

    (@matthewgfc)

    Thanks for telling me that, I wasn’t aware of that intent of that function call. I’ll make those adjustments. Again, thanks for all your help! Love your plugin.

    Thread Starter matthewgfc

    (@matthewgfc)

    Hey Barry nevermind! I solved my own problem. After reviewing the source code more, I modified my filter to use this:

    add_filter( 'tribe_events_single_event_after_the_meta', 'rsvp_store_additional_data', 20 );

    Data is now being saved. Not sure if that’s what it needs to be, but it works.

    Thanks for all your help!

    Thread Starter matthewgfc

    (@matthewgfc)

    Hey Barry,

    Thanks! You’ve been very helpful. So I have also been following this topic here: https://ww.wp.xz.cn/support/topic/rsvp-fields?replies=4

    I can’t seem to get my meta data to ever be created. I have my form field set up within the rsvp-form.php form. It has a unique name/id of “rvsp_additional_attendees”. Also see below for the code that should be capturing this.

    add_filter( 'eventrocket_rsvp_accept_anon_submission', 'rsvp_store_additional_data', 20 );
    function rsvp_store_additional_data() {
        $event_id  = get_the_ID();
        $anon_user = get_current_user_id();
    
        if( ! add_post_meta( $event_id, "_RSVP_Field_{$anon_user}_Additional_Attendees", $_POST['rvsp_additional_attendees'], true))
        {
          update_post_meta( $event_id, "_RSVP_Field_{$anon_user}_Additional_Attendees", $_POST['rvsp_additional_attendees'] );
        }
    }

    I’m expecting that after I hit submit on my form:

    <button class="eventrocket attendees" name="additional_attendees" value="__anon" type="submit">
    						<?php _ex( 'Update Additional Attendees List', 'anon attendance button', 'eventrocket' ) ?>
    					</button>

    That the meta data field would be created in the postmeta table. But it isn’t. I’ve checked the headers and verified that the form data is in fact being passed through properly.

    Any ideas on what I’m doing wrong?

    Thanks!

    Thread Starter matthewgfc

    (@matthewgfc)

    Hey Barry,

    Thank you! I just needed a point in the right direction. I think this should work out. I’ll let you know otherwise!

    Matt

    It wasn’t for me. Perhaps my setup is different in some way? I analyzed the headers and my _icl_current_language was set correctly to ‘fr’ everywhere except the [jobs] page. Once an AJAX call was made, the response headers reset the _icl_current_language cookie back to en.

    Modifying the AJAX endpoint was the only permanent (until update) solution that fixed it for me. Any ideas? It seems to work fine now.

    Hi Mike,

    I solved my own problem temporarily. This is by no means a great fix, but at the very least fixed my issue for now.

    Under the get_endpoint() method in wp-class-job-manager-ajax, I added a conditional to check the current language. After which I change the $endpoint var.

    /**
    	 * Get JM Ajax Endpoint
    	 * @param  string $request Optional
    	 * @param  string $ssl     Optional
    	 * @return string
    	 */
    	public static function get_endpoint( $request = '', $ssl = null ) {
    
    		/* Temporary workaround for WPML */
    		$current_lang = get_locale();
    		if($current_lang == 'fr_FR')
    		{
    			$endpoint_prefix = '/fr/';
    		}else
    		{
    			$endpoint_prefix = '';
    		}
    
    		if ( strstr( get_option( 'permalink_structure' ), '/index.php/' ) ) {
    			$endpoint = trailingslashit( home_url( '/index.php/'. $endpoint_prefix . 'jm-ajax/' . $request, 'relative' ) );
    		} elseif ( get_option( 'permalink_structure' ) ) {
    			$endpoint = trailingslashit( home_url( $endpoint_prefix . '/jm-ajax/' . $request, 'relative' ) );
    		} else {
    			$endpoint = add_query_arg( 'jm-ajax=', $request, trailingslashit( home_url( '', 'relative' ) ) );
    		}
    		return esc_url_raw( $endpoint );
    	}

    This is again a temporary fix for all who suffer from this issue currently.

    Hey Mike,

    I’m in the same situation here. Running latest WPML and using English and French. I have all taxonomies and categories translated. When viewing the French [jobs] page, only English jobs show up even when French taxonomies are selected.

    Have you heard anything back from WPML on this? Do you know of a temporary workaround to get this off the ground in the meantime?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)