Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • adminnetwork

    (@adminnetwork)

    Thank you Tim! Resolved on this end… I think it was a result of other work I was trying to do in the plugin.

    adminnetwork

    (@adminnetwork)

    Still stuck on this one, but I do appreciate that you posted your code that’s working. Just no idea why it’s not working on this particular site.

    example of one event…
    https://freespirityoga.ca/schedule/trx-express-2-2019-09-19/

    adminnetwork

    (@adminnetwork)

    Hi Patrick,

    Yes, I cleared my cache. It’s not loading an old version; the change to the code didn’t affect change. :-/

    adminnetwork

    (@adminnetwork)

    Hi Patrick,
    Thanks so much for your response. I did as you suggested, but it’s made no change whatsoever to the bookings page and how it handles messages post submission.
    Not sure how to post a screenshot here…but here’s the code post-editing…did I miss something?

    var em_booking_doing_ajax = false;
    $(‘#em-booking-form’).addClass(’em-booking-form’); //backward compatability
    $(document).on(‘submit’, ‘.em-booking-form’, function(e){
    e.preventDefault();
    var em_booking_form = $(this);
    $.ajax({
    url: EM.bookingajaxurl,
    data: em_booking_form.serializeArray(),
    dataType: ‘jsonp’,
    type:’post’,
    beforeSend: function(formData, jqForm, options) {
    if(em_booking_doing_ajax){
    alert(EM.bookingInProgress);
    return false;
    }
    em_booking_doing_ajax = true;
    $(‘.em-booking-message’).remove();
    em_booking_form.parent().append(‘<div id=”em-loading”></div>’);
    },
    success : function(response, statusText, xhr, $form) {
    $(‘#em-loading’).remove();
    $(‘.em-booking-message’).remove();
    //show error or success message
    if(response.result){
    $(‘<div class=”em-booking-message-success em-booking-message”>’+response.message+'</div>’).insertAfter(em_booking_form);
    em_booking_form.hide();
    $(‘.em-booking-login’).hide();
    $(document).trigger(’em_booking_success’, [response]);
    if( response.redirect ){ //custom redirect hook
    window.location.href = response.redirect;
    }
    }else{
    if( response.errors != null ){
    if( $.isArray(response.errors) && response.errors.length > 0 ){
    var error_msg;
    response.errors.each(function(i, el){
    error_msg = error_msg + el;
    });
    $(‘<div class=”em-booking-message-error em-booking-message”>’+error_msg.errors+'</div>’).insertAfter(em_booking_form);
    }else{
    $(‘<div class=”em-booking-message-error em-booking-message”>’+response.errors+'</div>’).insertAfter(em_booking_form);
    }
    }else{
    $(‘<div class=”em-booking-message-error em-booking-message”>’+response.message+'</div>’).insertAfter(em_booking_form);
    }
    $(document).trigger(’em_booking_error’, [response]);
    }
    $(‘html, body’).animate({ scrollTop: $(‘.em-booking-message’).offset().top – EM.booking_offset }); //sends user back to top of form
    em_booking_doing_ajax = false;
    //run extra actions after showing the message here
    if( response.gateway != null ){
    $(document).trigger(’em_booking_gateway_add_’+response.gateway, [response]);
    }
    if( !response.result && typeof Recaptcha != ‘undefined’ && typeof RecaptchaState != ‘undefined’){
    Recaptcha.reload();
    }else if( !response.result && typeof grecaptcha != ‘undefined’ ){
    grecaptcha.reset();
    }
    $(document).trigger(’em_booking_complete’, [response]);
    },
    error : function(jqXHR, textStatus, errorThrown){
    $(document).trigger(’em_booking_ajax_error’, [jqXHR, textStatus, errorThrown]);
    },
    complete : function(jqXHR, textStatus){
    em_booking_doing_ajax = false;
    $(‘#em-loading’).remove();
    $(document).trigger(’em_booking_ajax_complete’, [jqXHR, textStatus]);
    }
    });
    return false;
    });

    Hi Emma,

    Thank you so much for your quick reply – we actually got the pages to load after after repeated attempts by multiple systems. I manage 8 different WP websites, and this is the first time I’ve had this kind of difficulty getting .PDFs to load properly.

    However, yesterday, I did try with another, larger .PDF and generated a .HTTP error (replicated on Chrome, Firefox, and IE; on two separate Windows 10 machines), and I’ve seen several chats, forums, and online guides to resolving a .HTTP error when loading .PDF files. I do think it has to do with our servers or PHP setup on this particular website, but I need to sleuth out a bit more why.

    Here’s a link to one page where you can see the failed .PDF upload. This should be a 3 page document – but when I upload to WP it looks like this:

    https://new.stpatsschool.org/parents/celtics-club

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