Cornwell
Forum Replies Created
-
After the upgrade to php 8.0 I was getting over 1,000 warnings logged per hour, saying
ob_get_clean(): failed to discard buffer of zlib output compression (0) @ [obfuscated]/wp-content/plugins/all-in-one-event-calendar/lib/global-functions.php:38 #8
Stack Overflow provided the answer and I added this code to global-functions.php right after the comments block at the start
/* Hack for php 8.0 see https://stackoverflow.com/questions/74650983/php-output-buffer-not-working-after-php-7-4-to-php-8-1-upgrade */ use function OutputControl\ob_start; use function OutputControl\ob_end_flush; use function OutputControl\ob_get_clean;
Since I made that change the warnings have stopped.
I’m sorry, I cannot now remember where I made that change, and I have spent too long looking for it. What I can say, however, is that my .htaccess file includes
# Allow Cross-Domain AJAX with AJAX withCredentials=false (cookies NOT sent) Header always set Access-Control-Allow-Origin "https://[redacted].co.uk" Header always set Access-Control-Allow-Methods "POST, GET"
Forum: Reviews
In reply to: [Sign Me Up] Works on release 5.9, but two matters needed resolvingAt the time I wrote the post it was 3.6.6 but earlier this week I upgraded to 3.6.7 and the plugin still works, at least for me.
Forum: Fixing WordPress
In reply to: My plugin is not displaying the dollar sign $Closing as partially resolved, with a work-round.
Forum: Fixing WordPress
In reply to: My plugin is not displaying the dollar sign $Hello moderator:
My repeated editing is because I am trying to include HTML entities in the above code and these are being rendered as the character not the code. So I wanted to enter this (with spaces between the characters so you can see them)
& # 3 6 ;
and I ended up with $Forum: Fixing WordPress
In reply to: My plugin is not displaying the dollar sign $Solution found, but not an explanation for the behaviour. Changing the key line to
echo "<p>$Number. <label for=\"Q$Number\">" . str_replace('$', '$', $Question) . "</label></p>\n";
and it works.I have proved it is nothing to do with reading the database by setting up a test plugin, where this is the entire code:
<?php /* This code is included by the WordPress quiz plugin when the text includes [quiz]dollar[/quiz] */ /* It outputs a page with three versions of a test sentence including a dollar sign. */ echo "<p>With dollar sign: Francoise Bettencourt-Meyers with a fortune of $83bn is thought to be the richest woman in the world.</p>\n"; echo "<p>With HTML code: Francoise Bettencourt-Meyers with a fortune of $83bn is thought to be the richest woman in the world.</p>\n"; echo "<p>With HTML entity: Francoise Bettencourt-Meyers with a fortune of $83bn is thought to be the richest woman in the world.</p>\n"; ?>
You can see the result at https://lovedurham.co.uk/dollar-test/. As you can see, the first test fails but the following two succeed.
This still leaves the question of what is happening in the first case.
- This reply was modified 3 years, 3 months ago by Cornwell.
Forum: Fixing WordPress
In reply to: My plugin is not displaying the dollar sign $Thanks for the quick reply. Here are the answers to your questions:
I use extract($row) as an easy way to assign the variables $Number and $Question
esc_html is a late addition to the code, I should probably remove it
There is no HTML stored in the Question. I have added
if (($quiz == 44377) && ($round == 7)) print_r($result);
to the code just after the } else { and you can see the results in the link. The dollar sign does not display. It should say $43bn but it just says bn.The GBP sign £ displays correctly.
I tried using str_replace(‘$’, ‘$’, $Question) and that displayed as $ because WordPress has changed it to $Forum: Plugins
In reply to: [Contact Form 7] Contcat form fails after reCAPTCHA (v3) integrationThanks to thewomb I seem to have resolved this problem too.
There was a Google reCaptcha V2 set of keys as well as the V3 ones. When I deleted the V2 keys it started to work.Forum: Plugins
In reply to: [Contact Form 7] Contcat form fails after reCAPTCHA (v3) integrationI get something similar, but the error message is “Failed to send your message. Please try later or contact the administrator by another method.”
I suspect the problem is that Google thinks I am a spammer. On other sites with reCaptcha 2 I have to click the pictures. I have tried lowering the threshold by
public function get_threshold() {
/* Threshold lowered to 0.30 */
return apply_filters( ‘wpcf7_recaptcha_threshold’, 0.30 );
}
but it still doesn’t like me.Any thoughts? I cannot log the reject messages as my WordPress installation cannot be upgraded and it is at too low a level to permit the installation of Flamingo.
Just to say I have exactly the same issue, in my case (obfuscating the site name) the error message is
Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /home/sitename/public_html/wp-includes/Requests/Transport/cURL.php on line 508
The site is running WordPress 4.7.3 which is, I believe, the latest. The underlying software is Linux/Apache/mySQL/PHP with PHP being at Version 5.4.27.
Forum: Fixing WordPress
In reply to: After 4.4 Upgrade: Unable to Upgrade or Install Themes and PluginsThere is a possible fix on the core.trac.www.ads-software.com site, but this may not work for all configurations, all I know is that it worked for me and some other people. The bug seems to be in /wp-admin/includes/class-wp-filesystem-ftpext.php around line 333.
Forum: Fixing WordPress
In reply to: After 4.4 Upgrade: Unable to Upgrade or Install Themes and PluginsI’m seeing the same thing, in my case trying to update the All In One WP Security and MailChimp for WordPress plugins and the Twenty Ten and Twenty Thirteen themes. The error looks like the WordPress Updates code is trying to create a directory when that directory already exists.
Forum: Fixing WordPress
In reply to: Updates not workingI have had this problem, but not with Divi, but with Aksimet and the Email Encode Bundle. However I may have found a workaround.
The problem only occurs when I use FTPS (SSL). If I switch to FTP the plugins update successfully.
Does this work for anybody else? And does it point the way to a resolution? (I would rather use FTPS for obvious security reasons.)
Forum: Fixing WordPress
In reply to: Updates count incorrect on dashboardSpecific example: on a site where the only update pending is to theme Twenty Ten from version 1.6 to 1.7, the dashboard number is 4 and on hovering on that number, it says 4 Theme Updates.
When I tick the box to apply the update it moves to the action=do-theme-upgrade screen and the number changes to 1 (which is correct at this point) and when the upgrade is completed the number disappears (as it should).Forum: Plugins
In reply to: [All-In-One Security (AIOS) – Security and Firewall] Hide wp-adminMake that a redirect to 127.0.0.1