BlogLogistics
Forum Replies Created
-
Sorry, I posted to the wrong place. It should be: https://wordpress.org/support/plugin/contact-form-7/
I don’t see an option to move this. Can a moderator help out here please?
Thanks.
For anyone finding this thread, and needing fast help to get this done. Here is the updated code to the …/contact-form7/modules/turnstile/turnstile.php
/**
* The Turnstile form-tag handler.
*/
function wpcf7_turnstile_form_tag_handler( $tag ) {
$service = WPCF7_Turnstile::get_instance();
if ( ! $service->is_active() ) {
return;
}
return sprintf(
'<div %s></div>',
wpcf7_format_atts( array(
'class' => 'wpcf7-turnstile cf-turnstile',
'data-sitekey' => $service->get_sitekey(),
'data-action' =>
$tag->get_option( 'action', '[-0-9a-zA-Z_]{1,32}', true ),
'data-size' =>
$tag->get_option( 'size', '(normal|flexible|compact)', true ),
// Add the following line for the theme option
'data-theme' =>
$tag->get_option( 'theme', '(light|dark|auto)', true ),
'data-response-field-name' => '_wpcf7_turnstile_response',
) )
);
}How to Use the New Option…
With this change in place, you can now use the
themeoption in your Contact Form 7 form editor like this:- For a dark theme:
[turnstile theme:dark] - For a light theme:
[turnstile theme:light]
I hope in some small way this helps someone.
Update: Make a backup of the original, before editing 😉
- This reply was modified 10 months, 2 weeks ago by BlogLogistics. Reason: Added note to backup before editing CF7 files
@permafrost06 You asked for my input, that you’re looking at both issues. I’m replying here as you requested.
WordPress 6.8.1
PHP 8.3.22
WPTB plugin: 2.0.7For caching (don’t think this is of issue, but just in case):
SQLite: 3.34.1
APCu 5.1.24
igbinary 3.2.16
SQLite Object Cache plugin 1.5.6Note: WPTB Plugin has edited code that still does not match repository. As per this thread: https://wordpress.org/support/topic/assets-php-causes-headers-already-sent-error/ these were the peritinent instructions:
“…Can you please replace the content of the file: /wp-content/plugins/wp-table-builder/v2/inc/Utils/Assets.php with WP Table builder v2.0.7 headers already sent fix – Pastebin.com…” (https://pastebin.com/vGCdVWqU)
The input from @rumpel2116 makes a lot of sense. I’ve not had the time to edit and test at my end just yet, to see fix in action, but looking forward to doing that.
If I understand correctly (I’m still learning), the old approach that @rumpel2116 pointed out results in the script being output immediately, often before WordPress has started sending the
<html>tag or<!DOCTYPE>which can trigger rendering issues due to Quirks mode.The updated method works better because WordPress waits until the appropriate point in the page load to output the
<script>, after the<!DOCTYPE>and<html>have already been sent, preventing quirks mode from being triggered.Any chance @protibimbok might be able to apply these changes to the plugin?
Okay Saad @protibimbok
That worked.
Terrific!I’m not seeing new errors posted to the log.
Thank you 🙂
Thanks Saad @protibimbok
Sorry, still getting the issue.
[26-May-2025 15:49:28 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxxxx/public_html/wp-content/plugins/wp-table-builder/v2/inc/Utils/Assets.php:82) in /home/xxxxxxxxxx/public_html/wp-admin/admin-header.php on line 14This only happens when in the backend, duplicating tables and then editing them. I see no such log entries when surfing front-end pages containing tables.
Based on the log entry, it suggests a redirect or setting cookies occured, but it was too late, output had already been sent to the browser. It could be a space, newline, or echo that’s the cause? – Since PHP sends HTTP headers before any actual content (like HTML or echo output).
Update…
At line 82 of /wp-content/plugins/wp-table-builder/v2/inc/Utils/Assets.php, we see this:
echo '<script type="text/javascript">var WPTB_CFG = ' . json_encode($data) . ';</script>';The echo sends output to the browser. Once that happens, PHP can no longer send HTTP headers, which are needed for things like redirects, setting cookies, or any call to header().
So later, when admin-header.php (called by WordPress core) tries to send headers, which it always does – PHP throws a warning because it’s too late.
- This reply was modified 11 months, 2 weeks ago by BlogLogistics.
- This reply was modified 11 months, 2 weeks ago by BlogLogistics. Reason: Typo
Thanks Saad @protibimbok
I restored the original plugin files then completed the suggested single edit.
Then the log get’s populated with:
[23-May-2025 15:07:48 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxxxx/public_html/wp-content/plugins/wp-table-builder/v2/inc/Utils/Assets.php:79) in /home/xxxxxxxxxx/public_html/wp-admin/admin-header.php on line 14I observed this error gets repeatedly logged only when duplicating, editing, etc. tables in wp-admin. It does not log when viewing front-end content.
I hope this information helps out! 🙂
In case this helps, we had the same issue (cannot delete plugin) and the PHP error log provided this:
[25-Nov-2024 17:53:19 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WpMatomo\matomo_filter_incompatible_plugins() in /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php:75
Stack trace:
#0 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(118): WpMatomo\Bootstrap::bootstrap_environment()
#1 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php(148): WpMatomo\Bootstrap->bootstrap()
#2 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Uninstaller.php(151): WpMatomo\Bootstrap::do_bootstrap()
#3 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Uninstaller.php(73): WpMatomo\Uninstaller->drop_tables()
#4 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Uninstaller.php(46): WpMatomo\Uninstaller->uninstall_blog(true)
#5 /home/xxxxxxxx/public_html/wp-content/plugins/matomo/uninstall.php(22): WpMatomo\Uninstaller->uninstall(true)
#6 /home/xxxxxxxx/public_html/wp-admin/includes/plugin.php(1314): include_once('/home/xxxxxxxx/...')
#7 /home/xxxxxxxx/public_html/wp-admin/includes/plugin.php(970): uninstall_plugin('matomo/matomo.p...')
#8 /home/xxxxxxxx/public_html/wp-admin/includes/ajax-actions.php(4771): delete_plugins(Array)
#9 /home/xxxxxxxx/public_html/wp-includes/class-wp-hook.php(324): wp_ajax_delete_plugin('')
#10 /home/xxxxxxxx/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array)
#11 /home/xxxxxxxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /home/xxxxxxxx/public_html/wp-admin/admin-ajax.php(192): do_action('wp_ajax_delete-...')
#13 {main}
thrown in /home/xxxxxxxx/public_html/wp-content/plugins/matomo/classes/WpMatomo/Bootstrap.php on line 75When removing all plugins and reverting to the TwentyTwentyFive theme, we still were unable to delete the plugin. Maybe this error code above can help narrow down where this issue might come from? Fortunately we restored from backups to avoid extraneous data being left in the database.
- This reply was modified 1 year, 5 months ago by BlogLogistics. Reason: Spelling
Forum: Plugins
In reply to: [WP Super Cache] Preload has been restarted (no email notification marked)Same issue here! After the update, even with “No Email” set, the email messages are now suddenly being sent. My guess is something in the update ignores this setting now.
- For a dark theme: