Quantcast
Channel: WordPress.org Forums » [Visual Form Builder] Support
Viewing all articles
Browse latest Browse all 2775

jave.web on "[Plugin: Visual Form Builder] Bugged entries - not storing!"

$
0
0

I really like your plugin! But again I foud some SERIOUS bugs caused by some funny approaches in your plugin's code and since I needed to make it work immediately, I solved it for you and because you are making this plugin great (in other parts) I've decided to share the solutions with you...

Bugs I've found when I was locating the source of problem for why aren't emails stored to DB:

a) In your DB table you have a column date_submitted in table YOUR_WP_DB_PREFIX_visual_form_builder_entries which has a DATETIME as type. I don't know what magic DB you are using, but this type usually(and especially in MySQL/MariaDB) means format (PHP): Y-m-d H:i:s and that's it ... line 308 in YOUR_WP_INSTALL/wp-content/plugins/visual-form-builder/includes/email.php which is currently

'date_submitted' => date_i18n( 'Y-m-d G:i:s' ),

Should be replaced with

'date_submitted' => date( 'Y-m-d H:i:s' ),

If you do not change this, entries on sites with non-mysql-like-localized-datetime will not be stored in newer WP versions!

b) You also have to have some magic IP addresses, because you've defined table column ip_address in the previously mentioned table as VARCHAR with a length of 25 - in my world, there is IPv4 - max character length 15 and IPv6 - max character length is usually 39 but can reach up to 4-something, so 50 should be safe. Also there is no reason to escape html in IP before putting it into DB - that should be done after recieving it from DB...

The initial bug is on line 699
in YOUR_WP_INSTALL/wp-content/plugins/visual-form-builder/includes/visual-form-builder.php

Which is currently

ip_address VARCHAR(25)

But should be

ip_address VARCHAR(50)

ALSO! In next update you should add this query in the update process:
'ALTER TABLE ' . $wpdb->prefix . 'visual_form_builder_entries CHANGE ip_address ip_address VARCHAR(50)'

If you do not change this, entries of users with IPv6 will not be stored in newer WP versions!

Also please fix another very serious bug - the email-header thing I've described (solution included!:) in HERE ! Thanks ! :)

https://wordpress.org/plugins/visual-form-builder/


Viewing all articles
Browse latest Browse all 2775

Trending Articles