timothyf
Forum Replies Created
-
Aha! Eventually the error message cleared and the form is working as expected.
I disconnected the plugin from CC and followed the steps on https://knowledgebase.constantcontact.com/email-digital-marketing/articles/KnowledgeBase/10054-WordPress-Integration-with-Constant-Contact?lang=en_US
The plugin says that it is connected, but I still get the message that “Constant Contact Forms has experienced issues that may need addressed and functionality may be missing.?…”
Additional log entries:
[2023-11-17T01:13:03.882845+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:13:03.920187+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:13:04.117118+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:13:55.523199+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:13:55.540823+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:14:02.661127+00:00] Error: .INFO: Invalid state or auth code! [] []
[2023-11-17T01:14:03.366949+00:00] Refresh Token:.INFO: Old Refresh Token: *** [] []
[2023-11-17T01:14:03.367794+00:00] Access Token:.INFO: Old Access Token: *** [] []
[2023-11-17T01:14:03.372318+00:00] Refresh Token:.INFO: Refresh token successfully received [] []
[2023-11-17T01:14:03.372570+00:00] Refresh Token:.INFO: New Refresh Token: YgupicJj* [] [] [2023-11-17T01:14:03.372727+00:00] Access Token:.INFO: New Access Token: eyJraWQi* [] []
[2023-11-17T01:14:03.372877+00:00] Expires in:.INFO: Expiry: 86400 [] []
[2023-11-17T01:14:04.110216+00:00] Refresh Token:.INFO: Refresh token triggered [] []
[2023-11-17T01:14:04.527845+00:00] Refresh Token:.INFO: Old Refresh Token: YgupicJj* [] [] [2023-11-17T01:14:04.528011+00:00] Access Token:.INFO: Old Access Token: eyJraWQi* [] []
[2023-11-17T01:14:04.531427+00:00] Refresh Token:.INFO: Refresh token successfully received [] []
[2023-11-17T01:14:04.531576+00:00] Refresh Token:.INFO: New Refresh Token: KLM9KqC9* [] [] [2023-11-17T01:14:04.531653+00:00] Access Token:.INFO: New Access Token: eyJraWQi* [] []
[2023-11-17T01:14:04.531728+00:00] Expires in:.INFO: Expiry: 86400 [] []I’m running into the same issue–please provide details on how you fixed it.
My client purchased a license for Scheduled Triggers along with support. I submitted a support ticket at bracketspace.com to request the snippet of code.
Thank you!
That’s exactly how I would want it to work! Step 1 is to buy the Scheduled Triggers extension. Step 2: Create the custom snippet. Step 3: Hire you to write the snippet if I can’t figure it out. Approximately how much would Step 3 cost, if required?
Forum: Plugins
In reply to: [Popups - WordPress Popup] Box Position: Centered not workingOk, it looks like the issue is with my site. When I tried the same popup on a slightly out-of-date clone of the site, Centered worked as expected. I have some investigating to do on my part.
Forum: Plugins
In reply to: [Email Before Download] Titles break at commasIn the old version, I could use commas in the titles and have them appear properly in a list of multiple downloads. My recollection is that I used commas to separate the document numbers there, too.
Forum: Plugins
In reply to: [Email Before Download] Download titles are lower case in emailWonderful!
Thanks,
TimForum: Plugins
In reply to: [Email Before Download] Output of the [file_urls]Great! I look forward to this reimplemented in the next release.
Thanks,
TimPerfect! Checking a constant works great, and it was definitely easier than a cookie. Thank you so much for adding the |count| functionality, explaining how the calls work, and then suggesting a constant. I appreciate your helpfulness.
Tim
Ah, thanks for explaining that each insertion point calls the function in the AI code block–that was a point that I had misunderstood.
To return a consistent order for all AI calls, my first thought is setting a cookie in functions.php with the randomized order and then using the AI code block to pull the data from the cookie. Do you have any suggestions for a technique that would work better?
I’m continuing to have trouble with the |count| feature. It doesn’t work as expected when I randomize the ad order, which I need to do. This problem occurs a) when my query args includes ‘orderby’ => ‘rand’, b) when I run shuffle($the_query) after the query is made, or c) use a custom function to randomize the array order while creating a new array.
To double check that my code works outside Ad Inserter, I set up a shortcode that I use in an Ad Inserter code block and on a separate page without Ad Inserter. For my query, I’m using a custom post type, selecting for ad position and meeting conditions for start date and end date. Here is my code:
function ad_template(){ $ad_date = date('Ymd'); $return_string = ''; $args = array( 'posts_per_page' => 3, 'orderby' => 'rand', 'post_type' => 'aj-ads', 'meta_query' => array( 'relation' => 'AND', array( 'key' => 'ad_position', 'value' => 'general', 'compare' => '=' ), array( 'key' => 'start_date', 'value' => $ad_date , 'compare' => '<=' ), array( 'key' => 'stop_date', 'value' => $ad_date , 'compare' => '>=' ) ) ); // query $the_query = get_posts( $args ); $ad_counter = 1 ; foreach( $the_query as $the_post ) { $postid = $the_post->ID ; $target = get_field('target_url', $postid); debug_to_console($ad_counter); // output counter to console debug_to_console($postid); // output associated postid to console debug_to_console($target); // output associated target URL to console $return_string .= '<div class="general-ad shortcode-ad ad-counter-' . $ad_counter .'"><a href="' . get_field('target_url', $postid) . '" target="_blank" class="href-counter-'. $ad_counter . '">' get_the_post_thumbnail($postid) . '</a></div>|count|'; } $ad_counter ++ ; } wp_reset_query(); // Restore global post data stomped by the_post(). return $return_string; } add_shortcode( 'ad-query', 'ad_template' );
I’m testing with 3 ads.
– With no randomization: When orderby and shuffle and the custom shuffle function are all disabled, the query works perfectly with |count|–the ads appear in order as 1-2-3
– With randomization: When any one of orderby, shuffle, and the custom shuffle function is enabled, |count| does not work correctly. The first AI ad matches the first ad in the randomized array, but the second and third appear to be random and duplicates often appear. As the foreach goes through its cycles, the code sends the $postid and $target to console and I can see that my query has been randomized. The AI output on the page doesn’t match the console output.
Making this more confusing is that the classes using $ad_counter in the div wrapper and the a element are correct–they are consistently 1-2-3 even though the target_url and the post_thumbnail in the AI output don’t correspond to the $postid and $target that appear in the console. (The target_url and the post_thumbnail in the AI output do come from the same post, although often not from the expected $postid.)
The shortcode is not working correctly in an Ad Inserter code block, but on the separate page, the shortcode always works fine with or without randomization–there’s never duplication and the console output matches the order visible on the page.
What else I’ve tried:
– new WP_query instead of get_posts
– echoing output instead of return $return_string
– an additional div wrapper
– outputting only the post_thumbnail with no div wrapper and no a elementI’ve tried to troubleshoot this to the best of my ability, and I’m stuck.
Thanks,
TimThank you for adding support for ad counting! For what I see in my initial test, the |count| feature is working fine. My testing, however, showed that I have an error in my code that I need to fix before I can be sure it works for me.
Thanks,
TimForum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Removing button from TinyMCE editorPerfect! Thanks!
Forum: Plugins
In reply to: [MailPoet Newsletters (Previous)] Cron not workingWhen I click on the link beside “Enable MailPoet’s Cron,” I get this error:
The connection has timed out The server at mysite2.org is taking too long to respond. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
———–
When I set up a cron job using the same string, I get an email saying:
Could not open input file: /home/myusername/public_html/wordpress/wp-cron.php?19fa0a72e8c315aaaeb26c7e309640bd
mysite2 is an add-on domain for my hosting plan. I’ve also tried using my primary domain with the complete path to wp-cron.php with the same reults. The other cron jobs I’ve set up for mysite2.org are working as expected.
Thanks,
Tim