Arrow

DB Error (table creation) | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page
 
Current User: Guest
Search Forums:


 






Minimum search word length is 4 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

DB Error (table creation)

Reply to Post Add a New Topic
UserPost

10:34 pm
September 3, 2007


Newbie

Guest

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:)

10:40 pm
September 3, 2007


Peter

Admin

posts 732

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.

12:46 am
September 11, 2007


Peter

Admin

posts 732

Version 2.9.2 fixes the table creation problem.

11:09 am
September 25, 2007


Marco Cimmino

Guest

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

12:19 pm
September 25, 2007


Peter

Admin

posts 732

Thanks for the feedback! I was hoping to cover that in the instructions at:

http://wordpress.org/extend/plugins/peters-custom-anti-spam-image/installation/

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
September 25, 2007


Marco Cimmino

Guest

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

1:10 pm
September 25, 2007


Peter

Admin

posts 732

Yes, I will check that out. Thanks!

In case anybody's wondering, this is Marco's plugin (although he has a few):

http://www.cimatti.it/blog/cimy-wordpress-plugins/cimy-user-extra-fields/

1:29 am
September 26, 2007


Peter

Admin

posts 732

Dynamic folder name recognition now in Version 2.9.3.

6:01 am
September 26, 2007


Marco Cimmino

Guest

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 ;)

12:20 pm
September 26, 2007


Peter

Admin

posts 732

Good point. I was hasty and was looking at the setting that pointed to the fonts.

1:33 pm
September 26, 2007


Marco Cimmino

Guest

yes you have deleted 1/3 of the hardcoded dir, remaining 2/3: the activate and deactivate hooks

1:39 pm
September 26, 2007


Peter

Admin

posts 732

Thanks. I have a working solution and will post it tonight (I'm guessing that's tomorrow for you :D )

11:46 pm
September 26, 2007


Peter

Admin

posts 732

Ahhhh, fixed at last.

Reply to Post

Reply to Topic:
DB Error (table creation)

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
5 + 3