Forum Replies Created

Viewing 15 replies - 16 through 30 (of 100 total)
  • Thread Starter fastasleep

    (@fastasleep)

    Thanks. They have posts every so often that have ~20 images β€” it’s a home decor shop/blog, so they do a fair number of these. I think in that one instance, there were a few in the feed that were of the longer variety, causing the timeout.

    Do you think this would this be a PHP memory limit issue perhaps? Or at least something that might be mitigated by more resources provided on the hosting end? We plan to move from their current host as they’re terrible, and will probably be able to allocate more memory for them as well. I suppose I can test that out when we get to that point and report back, if that’s helpful. πŸ™‚

    The summary idea is a welcome suggestion but probably not what they’re going to want to do. So far it seems to be working fine with 2 items in the feed since they never have more than one post a day, and MailChimp checks daily for new posts to scrape.

    Thread Starter fastasleep

    (@fastasleep)

    Hi, Robin β€”

    I figured it out, after a lot of trial and error β€”Β and you were indeed on the right path. The RSS was set on 5. It worked fine up til this past post, which happened to be a rather long one with a lot of images. The main RSS feed still worked, but the plugin’s custom feed did NOT. So after checking a bunch of other things, I came back to the reading settings and reduced it down to 2 posts, and it no longer timed out. Seems to be okay now.

    However, it’d be nice to know what the issue is. Is the number of images? Length of combined posts in the most recent feed items? I assume leaving it at 2 will be fine for MailChimp checking the RSS feed every day as long as we have no more than 1 or 2 posts per day. But it’d be nice to allow a longer RSS feed for other users outside of our custom feed. Or maybe that doesn’t really matter. πŸ™‚

    Things I looked at were PHP versions, plugin conflicts, so on… our host currently limits 64M for PHP for so not sure if that has anything to do with timing out.

    Thanks!

    You’re basically bypassing the plugin altogether then. See this thread where I figured out how to intercept the URL and alter it:
    https://wordpress.org/support/topic/append-cf7-form-value-as-variable-to-redirect-url-on-submit/

    Try something like this maybe:

    if ( form.use_external_url && form.external_url ) { 
    	if (document.getElementById('textboxId').value != '') {
        form.external_url = 'http://www.example.com';
    }
    }
    
    Thread Starter fastasleep

    (@fastasleep)

    Nice, thank you! Will my existing scripts break if I update the plugin though, or should they continue to work ok?

    Thread Starter fastasleep

    (@fastasleep)

    Oh, is that working? Then use whatever works. I thought you were saying you still needed help.

    Thread Starter fastasleep

    (@fastasleep)

    So, you just need to find each field value and insert them into the URL string. Are your field names actually ‘name1’ etc? So it’d be something like this (replace name# with whatever your field names actually are so jQuery can find them):

    var n1 = jQuery('#' + event.detail.unitTag).find('input[name="name1"]').val();
    var n2 = jQuery('#' + event.detail.unitTag).find('input[name="name2"]').val();
    var n3 = jQuery('#' + event.detail.unitTag).find('input[name="name3"]').val();
    
    if ( form.use_external_url && form.external_url ) { 
    	form.external_url = form.external_url + "?name1=" + n1 + "&name2=" + n2 + "&name3=" + n3;
    }
    else if ( form.thankyou_page_url ) {
    	form.external_url = form.external_url + "?name1=" + n1 + "&name2=" + n2 + "&name3=" + n3;
    }
    

    First off, you should go over to that thread and post your questions since this plugin is not what you need. Maybe I can help you.

    Did you look at the thread I sent you to, where I posted my code? You could adapt it for your needs with a little work.

    Your last link there is creating its own solution separate from this plugin.

    Happy to help in small amounts, otherwise I charge $80/hour. πŸ™‚

    This plugin doesn’t do that, it’s meant to pass stuff to an API that can handle that data, not a redirect with GET parameters.

    I ended up having to use https://wordpress.org/plugins/wpcf7-redirect/ but then add my own javascript to pass the form value I needed. You’ll need to do something like this.

    https://wordpress.org/support/topic/append-cf7-form-value-as-variable-to-redirect-url-on-submit/

    Ideally, this developer would merge some of the features on these plugins. One plugin that does redirect AND passing form values would be amazing – but at least there’s a way to DIY as I did. πŸ™‚

    It’s probably your GA script β€” you can see right there in the javascript console it’s reporting ‘gtag’ is undefined, and it’s at line 11 of the script which is:

    eval( form.after_sent_script );

    So you should post your script and black out any user IDs or whatever.

    You could maybe set hidden field(s) in the form itself with the value you need?

    https://contactform7.com/hidden-field/

    Which version of iOS are you on, out of curiosity? iPad 2/3 can only go up to iOS 9, so that may be the issue.

    Here’s a fix to try which could confirm if my suspicion is correct, and if so maybe the plugin author can roll this into the next update. Open /plugins/wpcf7-redirect/js/wpc7-redirect-script.js or go to Plugins > Editor > Contact Form 7 Redirection and click on wpc7-redirect-script.js and replace:

    line 26:
    location = form.thankyou_page_url;
    
    with:
    location.href = form.thankyou_page_url;

    and if you’re using any external URLs, also replace:

    line 17:
    location = form.external_url;
    
    with:
    location.href = form.external_url;

    Then reload your form page and try again, see if that fixes the redirect issue.

    Hmm, I just tested on my iPad as I’m currently working on a bunch of redirects and it worked fine for me. I think there used to be an issue with using “location =” to redirect versus “location.href =” but that doesn’t seem to be an issue now. Are you on an older version of iOS?

    Thread Starter fastasleep

    (@fastasleep)

    Okay, I figured it out after a lot of trial and error. Used this in your additional script field, instead of modifying the plugin … for now anyway πŸ™‚

    var em = jQuery('#' + event.detail.unitTag).find('input[name="your-email"]').val();
    if ( form.use_external_url && form.external_url ) { 
    	form.external_url = form.external_url + "?pi_list_email=" + em;
    }
    else if ( form.thankyou_page_url ) {
    	form.thankyou_page_url = form.thankyou_page_url + "?pi_list_email=" + em;
    }

    So basically I’m using CF7’s ‘event.detail.unitTag’ to identify the form wrapper ID which returns something like ‘wpcf7-f21287-p669-o1’, and within that div, finding the email field named ‘your-email’, grabbing the value from that field, then appending it to the end of both your form.external_url and form.thankyou_page_url with the Pardot email variable I needed in there.

    The CF7 to API basically has this function built in as you can map form values to whatever API keys, it just doesn’t work for me as I needed the var appended browser-side with the redirect URL. Obviously this could all be done without your plugin, but we started with it and already had 30 or so forms mapped to redirect pages, so it was easier to just go in and paste the code in all forms for now anyway. πŸ™‚

    Thanks

    Thread Starter fastasleep

    (@fastasleep)

    Yeah, so sorry, butΒ that’s not what I need, I’ve tested the other plugin out and it doesn’t work for my purposes β€”Β it sends stuff in the background, and I need to append a form field as a variable in the user’s browser’s URL. I’m hoping to achieve appending a form value to the redirect URL in this plugin as a GET variable. I’ll see if I can figure out how to make it work in the “Here you can add scripts to run after form sent successfully” field.

    • This reply was modified 8 years, 7 months ago by fastasleep.
Viewing 15 replies - 16 through 30 (of 100 total)