I have created my form to try to allow visitors to attach WEBP files if they want
This is how the tag in my Form tab looks … [file add-file limit:1024kb filetypes:gif|png|jpg|webp]
During my testing, after completed the form, including adding a WEBP file (size under 1024kb) and then using the Submit button … my form displays an error “There was an error trying to send your message”.
The only situation in which I have configured (via the Messages tab) the form to display that message is … Sender’s message failed to send
BUT (unknown the the user) it seems the form is submitted successfully anyway (because my SMTP plugin creates & tries to send the admin notification email (although it fails, due to a SMTP plugin msg saying there is no attachment)) & there is a copy of the info that was entered into the form in my Contact Entries (database) plugin (INCLUDING the file attachment!)
Please can you tell me how to ensure that my form will not display the send error (and the autoresponse mails will not fail due to msg saying there is no attachment) when visitors use the Submit button … ?
What email settings do you have in the Mail tab panel?
To protect personal data, hiding email addresses in the settings or replacing them with dummy addresses is strongly advised. You can also include screenshots.
My theme GeneratePress and my site is based on their “Prime” template
Here is a list of my active plugins …
Contact Form 7 (contact-form-7) – Version 6.0.6
Contact Form Entries (contact-form-entries) – Version 1.4.0
Flexible Checkout Fields (flexible-checkout-fields) – Version 4.1.15
Flexible Checkout Fields PRO (flexible-checkout-fields-pro) – Version 4.0.12
FluentSMTP (fluent-smtp) – Version 2.2.90
GenerateBlocks (generateblocks) – Version 2.0.2
GP Premium (gp-premium) – Version 2.5.2
Imagify (imagify) – Version 2.2.5
Preview E-mails for WooCommerce (woo-preview-emails) – Version 2.2.13
Real Media Library (Free) (real-media-library-lite) – Version 4.22.38
Simple Cloudflare Turnstile (simple-cloudflare-turnstile) – Version 1.30.0
Stripe Payment Plugin for WooCommerce (payment-gateway-stripe-and-woocommerce-integration) – Version 4.0.4
UpdraftPlus – Backup/Restore (updraftplus) – Version 1.25.5
Widgets for Google Reviews (wp-reviews-plugin-for-google) – Version 12.7.2
Wishlist for WooCommerce (wish-list-for-woocommerce) – Version 3.2.1
WooCommerce (woocommerce) – Version 9.8.1
WooCommerce AJAX Products Filter (woocommerce-ajax-filters) – Version 3.1.8.2
WooCommerce PayPal Payments (woocommerce-paypal-payments) – Version 3.0.3
Wordfence Security (wordfence) – Version 8.0.5
WPCode Lite (insert-headers-and-footers) – Version 2.2.7
WPS Hide Login (wps-hide-login) – Version 1.9.17.2
I have also hardened WordPress by adding code manually into the .htaccess file in the root of my domain
# Protect wp-config.php # This rule restricts visitors from accessing your wp-config.php file, which # contains sensitive database information, including name, host, username # and password. It also defines advanced settings, security keys and developer # options. <Files wp-config\.php> order allow,deny deny from all </Files>
# Prevent directory browsing # This rule prevents attackers from viewing the folder contents of your # website, restricting the information they have to exploit your website. Options All -Indexes
# Protect .htaccess # This rule prevents attackers from accessing any files that start with # “hta” – this ensures that .htaccess files are protected in all of # the directories of your server. <Files ~ "^.*\.([Hh][Tt][Aa])"> order allow,deny deny from all satisfy all </Files>
# Disable script injections # Disallow script injections to prevent hackers from injecting # malicious code into existing PHP documents. Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR] RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2}) RewriteRule ^(.*)$ index.php [F,L]
The there is fairly standard other code added by WordPress in the same .htaccess file …
# BEGIN WordPress # The directives (lines) between "BEGIN WordPress" and "END WordPress" are # dynamically generated, and should only be modified via WordPress filters. # Any changes to the directives between these markers will be overwritten. <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access plus 24 hours" ExpiresByType image/jpeg "access plus 24 hours" ExpiresByType image/gif "access plus 24 hours" ExpiresByType image/png "access plus 24 hours" ExpiresByType text/css "access plus 24 hours" ExpiresByType application/pdf "access plus 1 week" ExpiresByType text/javascript "access plus 24 hours" ExpiresByType text/html "access plus 2 hours" ExpiresByType image/x-icon "access plus 1 year" ExpiresDefault "access plus 24 hours" </IfModule> Options -Indexes <IfModule mod_headers.c> Header set X-Endurance-Cache-Level "2" Header set X-nginx-cache "WordPress" </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^/wp-content/endurance-page-cache/ - [L] RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} !.*=.* RewriteCond %{HTTP_COOKIE} !(wordpress_test_cookie|comment_author|wp\-postpass|wordpress_logged_in|wptouch_switch_toggle|wp_woocommerce_session_) [NC] RewriteCond %{DOCUMENT_ROOT}/wp-content/endurance-page-cache/$1/_index.html -f RewriteRule ^(.*)$ /wp-content/endurance-page-cache/$1/_index.html [L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
# END WordPress
Appreciating your help …
This reply was modified 1 year, 1 month ago by WPinThai. Reason: adding my theme name
I deactivated all plugins excluding Contact Form 7 and Wordfence Security BUT kept my theme, did not clear all cache & kept my WordPress hardening code in the .htaccess file
… and the form submitted with a WEBP attachment successfully
I added back the plugins, one by one until the form failed
When added back the Fluent SMTP plugin, the form failed The only plugin left to re-enable was … Simple Cloudflare Turnstile plugin …
On my LIVE site, deactivated the Fluent SMTP plugin & the Simple Cloudflare Turnstile plugin … When I tested the form the page just hung with the progress symbol constantly revolving Above issue kept happening, even when no files were attached before submitting the form.
So now even simple form submissions do not work I have tried disabling & re-activating all plugins, including CF7
I have also noticed …
the form has changed appearance … (the acceptance/privacy policy text is no longer indented)
when I try to submit the form with no fields completed, “missing field” validation errors appear twice for each field & in different places than before (once at the top of the page + once at the end of each empty field)
each time I refresh the page, a browser message appears saying …
Confirm Form Resubmission The page that you’re looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?
Please can you tell me how I can try to fix this (at least get back to how it was before, with just the WEBP issue)?
I have an update for you since yesterday, Takayuki …
My website and staging sites are today looking and functioning the same as a few days ago! (The appearance, validation error & refresh page issues have gone away, some some reason). I have not done anything to the website to fix it!
I have continued to test the WEBP issue. I can now confirm that I believe it is a conflict with the FluentSMTP plugin, because the issue does not happen when FluentSMTP plugin is disabled and Cloudflare Turnstile and all my other plugins are enabled.
I have tried two different SMTP providers (Sendingblue/Brevo & Gmail) with the FluentSMTP plugin and the WEBP issue happens with both.
I will open a support ticket with FluentSMTP, but in the meantime …
can you reproduce the issue on your test machine?
can you recommend a solution?
do you know why my contact form had those appearance, validation error & refresh page issues?
Viewing 9 replies - 1 through 9 (of 9 total)
The topic ‘Issue submitting with WEBP attachment’ is closed to new replies.