Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Merv

    (@mervforneyerolscom)

    Update ….
    I just determined event-tickets select2.js is impacting many WooCommerce admin functions using js. The latest is Products. Click to show hide admin functions do not work anywhere on a product edit page.

    Disabling event-tickets select2.js brings Woo admin back to life.

    When was select2.js added to the plugin? What is latest version that does not have it. I need to roll back to get my client site Woo admin working again!!

    HELP!!
    Merv

    Thread Starter Merv

    (@mervforneyerolscom)

    An added note:
    1. The Events Calendar also has select2 in common/vendor/tribe-select2 but is not getting loaded in my woo membership admin

    2. Is the solution to restrict when event-tickets enqueues JS. Don’t need it when the free version isn’t using ticket sales.

    Merv

    Thread Starter Merv

    (@mervforneyerolscom)

    Here is what I found in wp-plugins\event-tickets\common\vendor\select2\select2.js starting at line 1834 (not 928):

    if ( select ) {
        // these options are not allowed when attached to a select because they are picked up off the element itself
        $.each( [ "id", "multiple", "ajax", "query", "createSearchChoice", "initSelection", "data", "tags" ], function () {
            if ( this in opts ) {
            throw new Error( "Option '" + this + "' is not allowed for Select2 when attached to a <select> element." );
            }
        } );
    }

    Also, your suggestion needs to be in select2.min.js.

    Taking ajax out of select2.min.js removed the error but the admin membership select fields were disabled. Therefore, Woo is somehow getting to event-tickets select2.

    I dumped the source of the admin page in question and found these references to select2:

    IN THE HEADER

    <link rel='stylesheet' id='custom-select2-css-css'  href='http://sellwithsoul.com/wp-content/themes/howes/inc/custom-select2/custom-select2.css?ver=1510658863' type='text/css' media='all' />
    
    <script type='text/javascript'>
    /* <![CDATA[ */
    var wc_memberships_admin = {"ajax_url":"http:\/\/sellwithsoul.com\/wp-admin\/admin-ajax.php","new_membership_url":"http:\/\/sellwithsoul.com\/wp-admin\/post-new.php?post_type=wc_user_membership","select2_version":"4.0.3","search_products_nonce":"970c8f35d0","search_posts_nonce":"95e2f0a885","search_terms_nonce":"9ccc486ef8","wc_plugin_url":"http:\/\/sellwithsoul.com\/wp-content\/plugins\/woocommerce","calendar_image":"http:\/\/sellwithsoul.com\/wp-content\/plugins\/woocommerce\/assets\/images\/calendar.png","user_membership_url":"http:\/\/sellwithsoul.com\/wp-admin\/edit.php?post_type=wc_user_membership","new_user_membership_url":"http:\/\/sellwithsoul.com\/wp-admin\/post-new.php?post_type=wc_user_membership","get_membership_date_nonce":"c2f94b400e","search_customers_nonce":"acfab841c7","add_user_membership_note_nonce":"3970e822b5","create_user_for_membership_nonce":"13b8033667","transfer_user_membership_nonce":"9b9d129b34","delete_user_membership_note_nonce":"288dd47909","delete_user_membership_subscription_nonce":"84facb7f07","restrictable_post_types":["post","page","product","portfolio","team_member","testimonial","client","tribe_events","tribe-ea-record","slide"],"i18n":{"delete_membership_confirm":"Are you sure that you want to permanently delete this membership?","delete_memberships_confirm":"Are you sure that you want to permanently delete these memberships?","please_select_user":"Please select a user."}};
    /* ]]> */
    </script>
    
    <script type='text/javascript' src='http://sellwithsoul.com/wp-content/plugins/woocommerce/assets/js/select2/select2.full.min.js?ver=4.0.3'></script>

    IN THE FOOTER

    <script type='text/javascript' src='http://sellwithsoul.com/wp-content/plugins/event-tickets/common/vendor/tribe-select2/select2.min.js?ver=4.7'>
    
    <script type='text/javascript' src='http://sellwithsoul.com/wp-content/themes/howes/inc/custom-select2/custom-select2.js?ver=1510658863'></script>

    I don’t see name conflicts. Do you?

    Thanks for your help.
    Merv

    Thread Starter Merv

    (@mervforneyerolscom)

    Hi Clifford,
    I found the code for the messages in question:
    event_tickets => src => Tribe = Tickets.php about line 1288 in version 2.4.7:

    		/**
    		 * Returns a tickets unavailable message based on the availability slug of a collection of tickets
    		 *
    		 * @since 4.2
    		 *
    		 * @param array $tickets Collection of tickets
    		 *
    		 * @return string
    		 */
    		public function get_tickets_unavailable_message( $tickets ) {
    
    			$availability_slug = $this->get_availability_slug_by_collection( $tickets );
    			$message           = null;
    			$post_type = get_post_type();
    
    			if ( 'tribe_events' == $post_type && function_exists( 'tribe_is_past_event' ) && tribe_is_past_event() ) {
    				$events_label_singular_lowercase = tribe_get_event_label_singular_lowercase();
    				$message = sprintf( esc_html__( 'Tickets are not available as this %s has passed.', 'event-tickets' ), $events_label_singular_lowercase );
    			} elseif ( 'availability-future' === $availability_slug ) {
    				$message = __( 'Tickets are not yet available.', 'event-tickets' );
    			} elseif ( 'availability-past' === $availability_slug ) {
    				$message = __( 'Tickets are no longer available.', 'event-tickets' );
    			} elseif ( 'availability-mixed' === $availability_slug ) {
    				$message = __( 'There are no tickets available at this time.', 'event-tickets' );
    			}
    
    			/**
    			 * Filters the unavailability message for a ticket collection
    			 *
    			 * @var string Unavailability message
    			 * @var array Collection of tickets
    			 */
    			$message = apply_filters( 'event_tickets_unvailable_message', $message, $tickets );
    
    			return $message;
    		}
    

    I would love to be able to modify these messages in my child theme for my client who refers to Tickets as Registrations.

    Merv

    Thread Starter Merv

    (@mervforneyerolscom)

    BTW,
    I just saw this in the Release notes for 4.2.7:
    Fix – Stop logic for dealing with recurring events from impacting other post types (Originally reported by @ryan on the support forums. Thanks!)

    Could this be what we are seeing impacting postmeta even though my events are not recurring?
    Merv

    Thread Starter Merv

    (@mervforneyerolscom)

    Hi Clifford,
    I haven’t deleted the extraneous tribe postmeta but am watching activity.
    Here’s a new snapshot as of 9/23/2016. I included post_date in the SELECT and only tribe timeouts: https://drive.google.com/open?id=0B_PI5RZVOe0QUEs1enVVX2xKNlE

    I converted the date of the transient on the first record and it is:
    1474663526 = Friday, September 23, 2016 4:45:26 PM GMT-4:00 DST

    So, it appears these are being generated on new posts, products, pages, etc. If I delete them they will come back on new posts.
    Merv

    Merv

    (@mervforneyerolscom)

    Just installed and everything works great with one exception I have found.
    Admin view on an events page and select ticket attendees then send email.
    Email HTML format is broken. Something is inserting cr/lf at 75 characters in the HTML text string generated from attendees-email.php. Generated rsvp.php and mail.php seem to work perfectly.

    Thanks in advance for you guidance.

    Merv

    (@mervforneyerolscom)

    Upgraded from 1.6.2 and get “headers already sent” errors. Error occurs in wp includes => pluggable.php in a redirect script. Error message refers to async social sharing making the call. WP 3.5.1 installed.

    Thread Starter Merv

    (@mervforneyerolscom)

    I’m going into production so my css overrides are back in. Still a little issue with IE.

    Love the plugin. May be the only one that really works.

    Thanks,
    Merv

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