Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: It looks like the forms table is missing. #405

Closed
blaataap opened this issue Nov 24, 2015 · 3 comments
Closed

Error: It looks like the forms table is missing. #405

blaataap opened this issue Nov 24, 2015 · 3 comments

Comments

@blaataap
Copy link

Hi there,

Im getting the error "It looks like the forms table is missing. Please de-activate and re-activate the plugin to attempt to create the table. If the error persists, please get in touch with the YIKES Inc. support team."

This triggered me to check the database to see if tables are generated correctly and this seemed to be the case. So I was wondering why this error is coming up. After some further research it seems that "if( $wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'") != $wpdb->prefix . "yikes_easy_mc_forms" ) {" in the manage-form.php fails. Reason is my wordpress table prefix contains some capital characters.

$wpdb->get_var("show tables like '" . $wpdb->prefix . "yikes_easy_mc_forms'"); Generates lowercase characters.
$wpdb->prefix . "yikes_easy_mc_forms"; seems to generate both lower and upper case characters.

Im not a php programmer nor know enough about wordpress/plugins to fix this. Can someone help me on how to fix this without losing the ability to upgrade the plugin in the future?

Thanks

@EvanHerman
Copy link
Owner

Hi Blaataap,

Sorry for the delay in responses. Its been quite a busy holiday weekend for us.

First, who is your webhost? Do you happen to know what OS your server is running?

The error you mention generally occurs when the table isn't properly generated on plugin activation. There could be a number of reasons this is happening, but the main one is that the server is preventing the plugin from generating the database table.

I don't think the table prefix is the cause of the issue. All that line of code is doing is ensuring that a database table exists, and when it doesn't displays an error back to the user.

If you want, feel free to email me at Evan@yikesinc.com and I can take a look for you. If you want, you can also create me some temporary login credentials and I can add a few bits of code to debug the issue so we can get to the root of it, and get things resolved for you.

Thanks!
Evan

@blaataap
Copy link
Author

blaataap commented Dec 1, 2015

Hi Evan,

We have our own windows OS based server that is currently hosting the website. As i mentioned, the tables have been generated correctly, I even remade them using the install script.

I actually did some debugging and the issue really is in the if statement that checks if the table is created. The string comparison goes wrong when capital letters do not match.

@EvanHerman
Copy link
Owner

I can take a look, but I'm not entirely sure why that would be occuring so at the moment I don't have a good solution. I'll need to see if I can get on a windows OS based server for testing, as I run apache on a linux server.

Evan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants