• Hello there!

    Hope you are doing well!

    We had conversed on https://www.ads-software.com/support/topic/display-a-custom-column-on-inbound-messages-table-2/

    I finally found the time to get to your plugin!

    My local setup:
    WordPress version: 5.8
    WooCommerce version: 5.6.0
    Contact Form 7 by Takayuki Miyoshi – 5.4.2
    AntiSpam for Contact Form 7 by Codekraft – 0.2.5

    Flamingo was missing on this instance.

    On my local installation with debug.log enabled, I saw the below errors in my log file:

    [06-Sep-2021 12:52:58 UTC] WordPress database error Specified key was too long; max key length is 767 bytes for query CREATE TABLE IF NOT EXISTS wp_cf7a_blacklist (
    			 <code>id</code> int(10) unsigned NOT NULL AUTO_INCREMENT,
    			 <code>ip</code> varchar(255) NOT NULL,
    			 <code>status</code> int(10) unsigned DEFAULT NULL,
    			 <code>meta</code> longtext,
    			 PRIMARY KEY (<code>id</code>),
                 UNIQUE KEY <code>id</code> (<code>ip</code>)
    		) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci made by activate_plugin, do_action('activate_cf7-antispam/cf7-antispam.php'), WP_Hook->do_action, WP_Hook->apply_filters, activate_cf7_antispam, CF7_AntiSpam_Activator::activate, CF7_AntiSpam_Activator::install, dbDelta
    [06-Sep-2021 12:53:25 UTC] WordPress database error Table 'prehugged.wp_cf7a_blacklist' doesn't exist for query SELECT * FROM wp_cf7a_blacklist ORDER BY <code>status</code> DESC LIMIT 1000 made by do_action('contact_page_cf7-antispam'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin->cf7a_admin_dashboard, CF7_AntiSpam_Admin_Display->display_dashboard, do_action('cf7a_dashboard'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin_Display->cf7a_display_debug, CF7_AntiSpam_Admin_Tools::cf7a_get_blacklisted_table
    [06-Sep-2021 12:55:23 UTC] WordPress database error Table 'prehugged.wp_cf7a_blacklist' doesn't exist for query SELECT * FROM wp_cf7a_blacklist ORDER BY <code>status</code> DESC LIMIT 1000 made by do_action('contact_page_cf7-antispam'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin->cf7a_admin_dashboard, CF7_AntiSpam_Admin_Display->display_dashboard, do_action('cf7a_dashboard'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin_Display->cf7a_display_debug, CF7_AntiSpam_Admin_Tools::cf7a_get_blacklisted_table

    Please review and guide.

    Thanks

    Take care, stay safe!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Erik

    (@codekraft)

    Ciao @koolpal,
    sure of course I remember you! And I’m sorry I haven’t yet put in place a way to filter users by nationality as you requested but I need to decide on an effective method… Because using geoip is accurate but isn’t easy to configure for users (api registration etc) and, on the other hand, detecting an user by keyboard or browser language may be too much imprecise (and I don’t want to use external services)!

    Back to your issue seems related to this:https://stackoverflow.com/questions/1814532/mysql-error-1071-specified-key-was-too-long-max-key-length-is-767-bytes

    i’ve set varchar(254) but your default collation (utf8mb4) allows only 190 characters (767 / 4 = 191).

    thanks for pointing this out, I’ll fix it as soon as possible!


    the fix (if you are a dev) is to change the plugins/cf7-antispam/includes/cf7a-activator.php line 126 and 137 replacing varchar(254) with varchar(190) or if you are handy with github you can find the pre-release over there

    • This reply was modified 3 years, 2 months ago by Erik.
    Plugin Author Erik

    (@codekraft)

    Hi @koolpal

    I hope this update fixes your problem. thank you very much for reporting and if there are still any problems let me know!

    in this update you will find a couple of new features: the antispam “security” presets, a totally revised js scripts (jquery no longer used) and an updated fingerprinting for old browsers.

    Thread Starter KoolPal

    (@koolpal)

    @codekraft Hi! Thanks a lot for your prompt replies and actions.

    Sorry I could not reply earlier. I was a bit busy in managing my business!

    I updated your plugin to Version 0.2.6 and upon visiting my home page, I observed:

    1. Debug.log shows
    [09-Sep-2021 08:37:53 UTC] WordPress database error Table 'prehugged.wp_cf7a_blacklist' doesn't exist for query SELECT * FROM wp_cf7a_blacklist ORDER BYstatusDESC LIMIT 1000 made by do_action('contact_page_cf7-antispam'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin->cf7a_admin_dashboard, CF7_AntiSpam_Admin_Display->display_dashboard, do_action('cf7a_dashboard'), WP_Hook->do_action, WP_Hook->apply_filters, CF7_AntiSpam_Admin_Display->cf7a_display_debug, CF7_AntiSpam_Admin_Tools::cf7a_get_blacklisted_table

    2. Browser console shows:

    Uncaught ReferenceError: wpcf7 is not defined
        at window.onload (script.js?ver=0.2.6:1)

    Please review and guide me on this.

    Thanks

    Plugin Author Erik

    (@codekraft)

    hello @koolpal and thank you for the detailed feedback! i’ll try to explain how to solve:

    1) This happens because the plugin has failed the activation with v0.2.5 and, to get the it working you need to uninstall and install it again. The uninstall script will reset any data created with cf7-antispam plugin, so after that you can perform a clean installation.

    2) “wpcf7 is not defined” means that contact form 7 isn’t enabled or the wpcf7 script isn’t loaded. do you load the contact form script in a customised way in the frontend? (anyway thanks also for this I will make an alert for admins in the next version)

    thank you again and ask me if you need anything. Erik

    • This reply was modified 3 years, 2 months ago by Erik.
    Thread Starter KoolPal

    (@koolpal)

    Hi @codekraft Thank you for your prompt replies

    1) This happens because the plugin has failed the activation with v0.2.5 and, to get the it working you need to uninstall and install it again. The uninstall script will reset any data created with cf7-antispam plugin, so after that you can perform a clean installation.

    Thanks! I deactivated the plugin, deleted it and then reinstalled and activated it again. Saw only [12-Sep-2021 07:06:55 UTC] CF7A: plugin uninstalled when uninstalled. No other notices. Good to go!

    2) “wpcf7 is not defined” means that contact form 7 isn’t enabled or the wpcf7 script isn’t loaded. do you load the contact form script in a customised way in the frontend? (anyway thanks also for this I will make an alert for admins in the next version)

    On one of my websites A, I think the theme developer has cleverly prevented CF7 css/js on pages where the form is not loaded. I found no such error in another website B with a different theme.

    But I will be using code on my website B to prevent loading of CF7 css/js on pages where the form is not loaded. Can you please make changes to handle this?

    I will now check your plugin settings and report issues, if any.

    Thanks a lot

    Take care, stay safe

    Thread Starter KoolPal

    (@koolpal)

    Hi,

    It’s me again.

    This time on website B – local install – where I am trying to work with Contact Form CFDB7 by Arshid – 1.2.5.9

    CF7 Relevant plugins:
    WooCommerce version: 5.6.0
    WordPress version: 5.8.1
    AntiSpam for Contact Form 7 by Codekraft – 0.2.6 (not yet configured)
    Cf7 Fields Repeater by Naji Amer – @n-for-all – 2.1.0
    Contact Form 7 by Takayuki Miyoshi – 5.4.2
    Contact Form CFDB7 by Arshid – 1.2.5.9
    Flamingo by Takayuki Miyoshi – 2.2.2
    YITH WooCommerce Request A Quote Premium by YITH – 3.2.0 (On a page by this plugin I am using a CF7 form)

    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : style in Entity, line: 34 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : span in Entity, line: 37 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : span in Entity, line: 38 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : label in Entity, line: 38 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : script in Entity, line: 50 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 50 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : p in Entity, line: 50 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76
    [12-Sep-2021 11:17:56 UTC] PHP Warning:  DOMDocument::loadHTML(): Unexpected end tag : div in Entity, line: 54 in F:\laragon\www\B\wp-content\plugins\cf7-antispam\includes\cf7a-frontend.php on line 76

    Please review and guide.

    Thanks

    Plugin Author Erik

    (@codekraft)

    Hi @koolpal,

    first of all I have to thank you again for the feedback!

    1) For the issue with the second website, the warning is generated because some tags inside the form aren’t closed correctly e.g. (<p>text</p>), can you confirm this? if not, please post some form code here so I can check why this is happening. Honeypots are added automatically, but the form html needs to be correct.


    I’m preparing a new version of cf7a right now, with an option under “advanced” to fully re-initialize cf7-antispam (also useful to solve issues the install fails as happened to you) and the language filter with allowed/disallowed languages based (at the moment) on the browser language.

    Plugin Author Erik

    (@codekraft)

    Maybe the issue is related to “Cf7 Fields Repeater” plugin. checked with w3c validator the demo page and it seems to shows the same issue.

    There is a way to mute this warning but I believe it is correct to show that alert if the html code is not valid (anyway it’s displayed only while debugging is enabled).

    if needed, you can mute that warning disabling honeypot in cf7-antispam configuration

    About js/css prevent loading I will fix in the next version, I will load anti-spam scripts only if cf7 is scripts are loaded too (thanks for this report)

    • This reply was modified 3 years, 2 months ago by Erik.
    Thread Starter KoolPal

    (@koolpal)

    @codekraft Thank you for prompt replies.

    I am sorry! In my eagerness to use your plugin, I think I have created a mess by reporting about TWO websites with different plugins.

    If you are OK, I will use this thread to work with you on Website A (which is LIVE and I can use your plugin ASAP)

    On this website A, the last issue seen is:
    “wpcf7 is not defined” on Website A where the theme developer has cleverly prevented CF7 css/js on pages where the CF7 form is not loaded.

    I will create a separate thread later for Website B which has additional plugins like “Cf7 Fields Repeater”, etc

    Does this work for you? Please let me know how do you wish to proceed.

    Thanks

    Take care, stay safe!

    Plugin Author Erik

    (@codekraft)

    ciao @koolpal,

    sure works well for me! Ideally, a thread should be opened for each issue so that other users can understand the content from the title.

    > “wpcf7 is not defined” on Website A where the theme developer has cleverly prevented CF7 css/js on pages where the CF7 form is not loaded.

    About this issue sorry I did not foresee this scenario. I have already made the fix and it will included be in the next version, the website will load anti-spam scripts only if cf7 is scripts are loaded in that page too (thanks for this report)

    The next version will be released soon, yesterday I completed the filtering by language, I have to test it with some devices and I will publish it.

    Plugin Author Erik

    (@codekraft)

    hi @koolpal, first of all i wish you a good start for the new year! ??

    I’ve updated the antispam plugin and I’ve added a couple of interesting features like one to resend emails or a dashboard widget with the chart of the emails registered by flamingo. let me know what you think about it!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Some errors on install – Local Installation’ is closed to new replies.