Akismet installation error

I got the following errors when installing the Akismet extra:

Error adding field AkismetForm->honeypot_field_name: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name ‘honeypot_field_name’ )
Error adding index honeypot_field_name to AkismetForm: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name ‘honeypot_field_name’ )
Error adding field AkismetForm->honeypot_field_value: Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name ‘honeypot_field_value’ )
Error adding index honeypot_field_value to AkismetForm: Array ( [0] => 42000 [1] => 1061 [2] => Duplicate key name ‘honeypot_field_value’ )

It seems to be working OK, but I get a php warning: Undefined array key “akismetHoneypotField”

ModX: 3.0.4, php: 8.1.29, mysql: 10.6.18-MariaDB

Has anyone else had this problem? I’d be very grateful for any help.

Thanks

Ruth

Hi @ruth.l.edmondson

That shouldn’t cause any issues. :+1:

The reason it’s happening is because the fields mentioned were changed/added after the initial release, so there’s some extra code to make sure those columns get added if a user doesn’t have them.
It looks like we need to add some checks to only run that if they don’t already exist. I’ll add an issue to the repo about this.

The undefined akismetHoneypotField warning can be ignored too. Does the warning include a line number where that’s occurring?

Cheers!

Hi

Thanks for your reassurance. The line numbers are 83 and 170.

Thanks

1 Like