It’s getting better π
After trying to import CSV I got this at “preview” stage of import:
Fatal error: Call to a member function get_name() on a non-object in /public_html/wp-content/plugins/tabulate/src/Controllers/TableController.php on line 173
Sorry for this! And thanks for reporting it.
You’re quite correct, grants don’t work for roles that have the ‘promote_users’ capability — the idea being that anyone with that capability can just modify the grants anyway. Perhaps the solution to this bug is to remove the Administrators role from the Grants table? I’ll investigate.
Your issue with saving cennik_upd should be fixed in the new version (which I’ll get out this afternoon).
Your issue with importing CSV is not clear yet. I’m investigating. Could you please provide more info about the structure of the table you’re importing to. I suspect it’s an issue with the primary key; what data type is your PK column?
I updated:
– PHP to 7.0.3 (from 5.3.x)
– Tabulate to 2.7.5 (from 2.7.2)
1. Issues with viewing tabs solved.
2. CSV export – still there, no changes.
3. cennik_upd doesn’t have PK (not really necessary, as data from this table is used by one procedure, then truncated), it’s a three column table (varchar(250),varchar(250),varchar(2)).
4. Importing CSV ends with following error now
Fatal error: Uncaught Error: Call to a member function get_name() on boolean in mydomainname.com/public_html/wp-content/plugins/tabulate/src/Controllers/TableController.php:173 Stack trace: #0 mydomainname.com/public_html/wp-content/plugins/tabulate/src/Menus.php(140): WordPress\Tabulate\Controllers\TableController->import(Array) #1 mydomainname.com/public_html/wp-includes/plugin.php(503): WordPress\Tabulate\Menus->dispatch(”) #2 mydomainname.com/public_html/wp-settings.php(353): do_action(‘init’) #3 mydomainname.com/public_html/wp-config.php(99): require_once(‘mydomainname.com…’) #4 mydomainname.com/public_html/wp-load.php(37): require_once(‘mydomainname.com…’) #5 mydomainname.com/public_html/wp-admin/admin.php(31): require_once(‘mydomainname.com…’) #6 {main} thrown in mydomainname.com/public_html/wp-content/plugins/tabulate/src/Controllers/TableController.php on line 173
I can’t even uninstall the plugin…
Fatal error: Uncaught Error: Class ‘WordPress\Tabulate\DB\Grants’ not found in …/public_html/wp-content/plugins/tabulate/uninstall.php:8 Stack trace: #0 …/public_html/wp-admin/includes/plugin.php(966): include() #1 …/public_html/wp-admin/includes/plugin.php(819): uninstall_plugin(‘tabulate/tabula…’) #2 …/public_html/wp-admin/plugins.php(357): delete_plugins(Array) #3 {main} thrown in …/public_html/wp-content/plugins/tabulate/uninstall.php on line 8
Sorry about the delay with all this. But I’m on to it now; should have a new version out shortly. π
Ok, the uninstallation error has been fixed now, and you should be able to import into tables without PKs.
Sorry, scratch that. There is no support for tables without PKs!
Can you explain a bit more about why you can’t add a PK? Do you have any UNIQUE constraints?
Sorry to disappoint. The other issues should be solved though.
It’s a simple table that has in one column product identifier, in second column it’s price. There’s a procedure on a server, that picks this data row by row, compares with wp_ tables and rewrites price where product id’s match. I probably could add the PK column, or set prodct ID (string !) to be PK, but it’s really unnecessary for me :).
I will experiment and see if it helps
it’s a temporary table used ONLY for updating prices with said procedure. WP doesn’t use that table whatsoever. After update it should be fully truncated and kept empty.
So import from CSV to table, run (CALL) update procedure, truncate table and that’s it.
But I haven’t found a simple plugin that allows me to do any of these things… And I’d prefer to do this from WP admin instead of phpMyAdmin for several reasons.
OK, I made the product ID a PK.
I can create/edit/delete contents of the table.
I can get to last phase of CSV import (all data is reported as valid), but when I press import button, I get an error
Unable to fetch record with PK of:AB1234
In the Preview phase there is no preview (at least for me) – should it show what will be imported?