DB Error (table creation) | Peter's Custom Anti-Spam for WordPress | Forum
Back to the custom anti-spam plugin page
10:34 pm
I'm a new user. I installed ver. 2.9.1 and had DB error showing tables don't exist. The topic below shows that it might be a permission problem, but my account has table creation permission. Thus, I installed ver. 2.9.0 and it works fine. Please check if there isn't any bug related to table creation in the latest version.
Thank you for the nice plug in:)
Thanks for the feedback! The latest version has no changes to the table creation code, so I'm guessing it was just something weird when activating and deactivating the plugin. I have yet to figure out why WordPress sometimes doesn't want to create the tables...
For those who are having trouble with the database tables not being created, check out the post on creating the tables manually.
11:09 am
Hi,
I'm the author of the cimy user extra fields plug-in.
Tables are not created because if you download the plug-in from
http://wordpress.org/extend/plugins/
then your zip file contains this dir:
peters-custom-anti-spam-image
but in your code you have hardcoded (not a good idea) this dir:
$cas_fontpath = "wp-content/plugins/custom-anti-spam/";
so all people installing from that package will never have tables creation because the plug-in will never throw installation function, renaming to custom-anti-spam will work.
See my plug-in, I have workarounded a bit this problem to automatically recognize the dir name.
hope this will help.
bye
Marco Cimmino
Thanks for the feedback! I was hoping to cover that in the instructions at:
http://wordpress.org/extend/pl.....tallation/
But I guess that even if I made the instructions super-clear, I should still make it more intuitive. The problem is that the WordPress plugin system automatically gave me that folder name... I guess I'll either do the dynamic folder recognition or simply rename everything to refer to the folder peters-custom-anti-spam-image.
1:02 pm
Yes instructions are clear, but do not expect that people will read them :)
They do the same with my plug-ins :D
In my opinion a plug-in shouldn't have a dir rename to get properly used, but it's only a opinion.
Anyway I pointed to you a solution, read it into my plug-in and feel free to copy if you want.
bye
Marco
Yes, I will check that out. Thanks!
In case anybody's wondering, this is Marco's plugin (although he has a few):
6:01 am
I'm sorry to say that 2.9.3 is still buggy about this.
Tried with folder name custom-anti-spam2 and it didn't create tables.
I repeat: the dir is still hardcoded in the code
add_action('activate_custom-anti-spam/custom_anti_spam.php', 'cas_install');
this is the problem, the activation function will never be throw because it looks to 'custom-anti-spam' dir ;)