Simple Membership Plugin › Forums › Simple Membership Plugin › WP-Admin "No items found" on Plugin Page after Migration
- This topic has 12 replies, 3 voices, and was last updated 10 years, 7 months ago by
mbrsolution.
-
AuthorPosts
-
March 15, 2016 at 5:48 pm #5875
scottnationwidechildrens
ParticipantHello all – I submitted a request via the Contact Us form and haven’t heard back yet–so I thought I would post here in case someone else may have experienced something similar.
Essentially, I migrated a WordPress site that is using the Simple Membership Plugin (Purchased) from an external host to an internal server and I’ve noticed an oddity with the plugin and the WP-Admin panel. When going to WP Membership > Form Builder, the screen that returns reads, “No items found.” I’m not able to edit any of the existing forms (there are two) from WP-Admin.
The site is working fine as are the plugin forms on the front-end. The database displays the correct information and I’m not seeing any errors from MySQL or PHP.
Any assistance would be greatly appreciated.
Attched Image
March 15, 2016 at 11:23 pm #5885mbrsolution
ModeratorHi, which two forms are you referring to? The image above shows no forms created using the Form Builder add-on.
March 16, 2016 at 1:06 pm #5909scottnationwidechildrens
ParticipantHi, which two forms are you referring to? The image above shows no forms created using the Form Builder add-on.
Hello, yes that is the reason I am requesting assistance–there are two forms that are being used, but they are not showing up in WP-Admin.
Edit: – Here are the forms in the database…
March 17, 2016 at 6:48 pm #5948scottnationwidechildrens
ParticipantIs there not any SUPPORT for this plugin?
March 17, 2016 at 9:47 pm #5955mbrsolution
ModeratorWhen you imported the database did anything go wrong? Perhaps there was an issue while importing the database. Can you try importing the database again and see if that fixes your issue.
Thank you
March 18, 2016 at 2:18 pm #5971scottnationwidechildrens
ParticipantThere were no issues importing the DB on dev, stage, prod or DR and all are experiencing the same issue with this plugin. Different database snapshots have been used and the issue remains.
Thanks.
March 19, 2016 at 9:37 am #5982mbrsolution
ModeratorThank you for reporting back. The plugin developers will investigate further.
Regards
March 21, 2016 at 10:55 am #5995admin
KeymasterI unfortunately have no idea where things have gone wrong with your DB transfer. If you transferred everything (all the database table contents of all tables of that site) then there shouldn’t be any issue.
Make sure to check that you transferred ALL the following 3 DB tables:
swpm_form_builder_fields
swpm_form_builder_forms
swpm_form_builder_customMarch 28, 2016 at 7:20 pm #6123scottnationwidechildrens
ParticipantAll of those tables exist and there are two forms in the database…
I added some code to the views\all_forms.php file to report the number of forms and as you can see from the screenshot below, it’s reporting two forms…

I’ve dropped the database, uninstalled the plugin, re-added on multiple installations all with the same result. All of this happened after the upgrade to WordPress 4.2.2.
Some assistance would be greatly appreciated.
Thanks,
ScottMarch 28, 2016 at 8:05 pm #6128scottnationwidechildrens
ParticipantAnd here is the output with WP-Debug enabled…
March 29, 2016 at 3:30 pm #6139scottnationwidechildrens
ParticipantIt looks as though:
$this->field_table_name
Isn’t being passed through as a variable on the query. If I create a variable for:
$tablename = $wpdb->prefix . “swpm_form_builder_forms”;
and run the query:
$count = $wpdb->get_var(“SELECT COUNT(*) FROM $tablename”);
I receive the correct count of forms in the admin page.
My question is, is there a way to update the query:
$count = $wpdb->get_var(“SELECT COUNT(*) FROM $this->form_table_name” );
to use the correct ‘$this’ variable–because that’s where it’s failing.
I’m on PHP 5.6.9 if that makes a difference. In addition, I can print ‘$this->form_table_name’ and receive ‘wp_swpm_form_builder_forms’ on the all_forms.php page–so the variable is slightly working–just not in the queries.
Please help, thanks!
March 29, 2016 at 4:37 pm #6140scottnationwidechildrens
ParticipantUPDATE: FIX
Okay, I have the following fix if anyone runs across this in their own journey. Essentially, the class variables need updated to public in two file locations:
\classes\class.swpm-fb-forms-list.php
\classes\class.swpm-form-builder.phpIn class.swpm-fb-forms-list.php, find the following code:
class SwpmFbFormsList extends WP_List_Table { public $errors;After public $errors; add:
public $field_table_name; public $form_table_name; public $multivalue_table_name;In class.swpm-form-builder.php find the following code:
public function __construct() { global $wpdb; $this->field_table_name = $wpdb->prefix . 'swpm_form_builder_fields'; $this->form_table_name = $wpdb->prefix . 'swpm_form_builder_forms'; $this->custom_table_name = $wpdb->prefix . 'swpm_form_builder_custom';And add the following just above public function __construct() {:
public $field_table_name; public $form_table_name; public $multivalue_table_name;I’m not sure why the class variables are not public in the original release of the plugin–but I suspect it started breaking after WordPress updated to 4.4.2.
Cheers,
ScottMarch 29, 2016 at 9:28 pm #6149mbrsolution
ModeratorHi Scott, I am happy to hear that you have resolved your issue. Thank you for sharing your solution, I am sure someone will use it in the future.
Kind regards
-
AuthorPosts
- You must be logged in to reply to this topic.