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

0.6.0 - Does not create SQL Tables #85

Open
4 tasks
Psinergy opened this issue Aug 28, 2017 · 7 comments
Open
4 tasks

0.6.0 - Does not create SQL Tables #85

Psinergy opened this issue Aug 28, 2017 · 7 comments

Comments

@Psinergy
Copy link

Steps to reproduce

What did you do?
Deleted tables and uninstalled plugin. Reinstalled plugin, activated, but does not create tables.

Expected behavior

Tell us what should happen
When activating plugin, should be creating tables.

Actual behavior

Tell us what happens instead

Frameworks tested

Which module / plugin were you using?

  • Drupal 8
  • Drupal 7
  • [x ] WordPress 4.8.1
  • Using lcache/lcache directly
  • Other (specify)
@Psinergy Psinergy changed the title 0.6.0 0.6.0 - Does not create SQL Tables Aug 28, 2017
@danielbachhuber
Copy link
Member

@Psinergy I can't reproduce this issue. When I activate the plugin, database tables are created correctly.

Could you share your MySQL version and other debugging steps you've performed?

@RBrang
Copy link

RBrang commented Sep 26, 2017

$table_prefix in object_cache.php is wrong in multisite (and/or network?) environments. That's why lcache thinks that the tables have not been created on activation. The tables are there, but with a name like wp_5_lcache(whatever)

@davidstrauss
Copy link
Member

davidstrauss commented Sep 26, 2017

LCache (this library, specifically) generally doesn't create its own tables. It's handled by whatever system is handling DB schema, which would be the WordPress plug-in in this case.

@danielbachhuber
Copy link
Member

@RBrang Great catch — I know exactly what the issue is. I'll work out a fix and tag a patch release for the plugin.

This issue can be closed in favor of lcache/wp-lcache#147

@danielbachhuber
Copy link
Member

$table_prefix in object_cache.php is wrong in multisite (and/or network?) environments. That's why lcache thinks that the tables have not been created on activation. The tables are there, but with a name like wp_5_lcache(whatever)

@RBrang Actually, this is incorrect. The lcache_events table is used for the entire WordPress install, even on multisite. On multisite, keys are prefixed with the blog id.

@Psinergy Could you share more environment details? If possible, can you debug the activation process itself, to make sure wp_lcache_initialize_database_schema() is being called and to see if any MySQL errors are thrown?

@Psinergy
Copy link
Author

Psinergy commented Sep 28, 2017 via email

@danielbachhuber
Copy link
Member

No worries, @Psinergy.

There's a similar report in the WordPress.org support forums that's yielded this MySQL error: lcache/wp-lcache#148

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

4 participants