Title: Plugin not displaying data
Last modified: August 16, 2022

---

# Plugin not displaying data

 *  Resolved [dustinkk](https://wordpress.org/support/users/dustinkk/)
 * (@dustinkk)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/)
 * I’ve run the install multiple times both manually and via the “Add Plugins” button
   thinking that there was an issue with the databases being created. When I open
   any of the settings pages no data appears in the tables and attempts to add data
   are met with failure.
    I have since logged in to my SQL instance and verified
   that the tables exist along with the dummy data that the script auto-generates
   on install, so those initial writes are happening, but the queries for displaying
   that data or adding new data do not appear to be functioning properly for me 
   for some reason.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15920667)
 * I’m guessing something is blocking the correct output. What is the error you’re
   seeing? And is there something in your browser console and/or php errorlog files?
   
   And what is the version of php and wordpress?
 *  Thread Starter [dustinkk](https://wordpress.org/support/users/dustinkk/)
 * (@dustinkk)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15920833)
 * PHP version 7.4.30
    WP version 6.0.1
 * **When attempting to add a new Event:** “Database insert failed!”
 * **When attempting to add a new Location:**
    WordPress database error: [Table ‘
   <DBNAME REDACTED>.wp_eme_locations’ doesn’t exist] SHOW FULL COLUMNS FROM `wp_eme_locations`
 * WordPress database error: [Table ‘<DBNAME REDACTED>.wp_eme_locations’ doesn’t
   exist]
    SHOW FULL COLUMNS FROM `wp_eme_locations`
 * **as well as:**
    “There has been a problem adding the location.”
 * and…. this just pointed me somewhat in the right direction! The tables that got
   created in my database by the plugin do not include the table prefix (they exist
   as <DBNAME>.eme_XXXXX and not <DBNAME>.wp_eme_XXXXX
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15921009)
 * EME takes the prefix as configured by WP (the global variable $wpdb->prefix in
   fact), so if the tables are created with a “wrong” prefix it means something 
   is wrong when you created/activated the plugin. Is it possible you have some 
   plugin that changes the prefix but did not update your wp config accordingly?
 *  Thread Starter [dustinkk](https://wordpress.org/support/users/dustinkk/)
 * (@dustinkk)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15921292)
 * Oddly, the plug-in appears to be calling the correct table name everywhere else
   as these are the errors I’m seeing when I turn on error logging:
 *     ```
       [Table '<DBNAME REDACTED>.wp_eme_bookings' doesn't exist]
       SELECT count(bookings.booking_id) FROM wp_eme_bookings AS bookings LEFT JOIN wp_eme_events AS events ON bookings.event_id=events.event_id WHERE bookings.status IN (2,3) AND events.event_end >= '2022-08-16 11:45:03'
   
       WordPress database error: [Table '<DBNAME REDACTED>.wp_eme_members' doesn't exist]
       SELECT COUNT(*) from wp_eme_members WHERE status=0
       ```
   
 * Somehow the initialization script did not properly pull the prefix and created
   them without one at all.
 * I just deleted the plugin after setting it to delete all settings, etc. and the
   tables were properly deleted from the database. After re-installing, the tables
   were once again created without any prefix and the above errors looking for the
   tables with the prefix are immediately thrown.
 * EDIT: To confirm – the db prefix is set properly in wp-config and there are no
   plugins being used to modify the prefix at all.
    -  This reply was modified 3 years, 9 months ago by [dustinkk](https://wordpress.org/support/users/dustinkk/).
      Reason: Additional info
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15921423)
 * The plugin never assumes any prefix. Even “wp_” is coming as info from wordpress.
   Is the plugin installed in multisite or so? How did you change your db prefix?
   
   And is your wp-config.php correctly changed to use that prefix? See e.g. [https://www.bettertechtips.com/wordpress/change-wordpress-table-prefix/](https://www.bettertechtips.com/wordpress/change-wordpress-table-prefix/)
 *  Thread Starter [dustinkk](https://wordpress.org/support/users/dustinkk/)
 * (@dustinkk)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15921601)
 * This is a single site, no multisite configuration.
    The db prefix is default 
   and properly set in wp-config. The scripts all properly reference the expected
   prefix post installation, it is only the initial table generation (and apparently
   removal, since those were also handled properly) that seem to not be utilizing
   any db prefix at all for some reason (these were all created as eme_<tableName
   > with NO prefix at all).
 * I went in and manually renamed the tables that were created to include the prefix
   and everything is working properly for me but figured I would update you in case
   there’s an underlying bug that may cause this for someone in the future.
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15921882)
 * Arghh … you just pointed me to a new weird thing in wp. The $wpdb variable is
   not correctly initialized during plugin install/deinstall unless you include 
   a specific php file. While I used to do this directly, I now used a function (
   in the latest version) to get the prefix (during install, uninstall and regular
   plugin function) and I did not take that into account correctly. I’ll correct
   and release a new version asap (after some testing).
 *  Plugin Author [Franky](https://wordpress.org/support/users/liedekef/)
 * (@liedekef)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15922124)
 * I just released a version that should work as expected for new installations.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Plugin not displaying data’ is closed to new replies.

 * ![](https://ps.w.org/events-made-easy/assets/icon-256x256.png?rev=1856035)
 * [Events Made Easy](https://wordpress.org/plugins/events-made-easy/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-made-easy/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-made-easy/)
 * [Active Topics](https://wordpress.org/support/plugin/events-made-easy/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-made-easy/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-made-easy/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Franky](https://wordpress.org/support/users/liedekef/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/plugin-not-displaying-data/#post-15922124)
 * Status: resolved