I just setup a newly installed drupal website. I installed Ctool and views first. Then I installed VCT and try to enable VCT. It raised an error message.
Drupal 7.5.9
php 7.1.12
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal_7_59.custom_table_view_data' doesn't exist: SELECT ctvd.table_name AS table_name FROM {custom_table_view_data} ctvd; Array ( ) in view_custom_table_disable() (line 90 of /Users/desmondyang/Documents/Sites/devdesktop/drupal-7.59/sites/all/modules/view_custom_table/view_custom_table.install).
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | Capture d’écran 2018-09-21 à 17.31.41.png | 136.11 KB | lazzyvn |
Comments
Comment #2
desmondyoung commentedComment #4
sagar_cis commentedHello @desmondyoung
I am not sure that this is a issue, if you see you are saying that you have this issue, when you install this module, while the error you post here is from hook_disable.
Still i have update the code and put db_table_exist validation everywhere, so please download latest dev release and try again.
Comment #5
desmondyoung commentedDear Vishal,
I tried the latest version. When I enable VCT and press Save button,I've got below error message. I'm using Acquia platform to download Drupal 7.5.9, php 7.1.12, and MySQL. For the fresh environment, I just installed Ctools and Views before VCT. Is there any configuration missing before I install VCT? Kindly provide me some suggestion, please.( I've read How to Use guide and couldn't find any clue)
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes: CREATE TABLE {custom_table_view_data} ( `id` INT unsigned NOT NULL auto_increment COMMENT 'Primary id for the table.', `table_name` VARCHAR(100) NOT NULL DEFAULT '' COMMENT 'Table name which needs to add to views.', `description` VARCHAR(600) NOT NULL DEFAULT '' COMMENT 'Table description for a quick idea of, what this table for.', `column_relations` VARCHAR(800) NULL DEFAULT '' COMMENT 'Custom table relation with drupal core entities.', `created_by` INT NOT NULL DEFAULT 1 COMMENT 'Relation to the user who has created this entry.', PRIMARY KEY (`id`), INDEX `table_name` (`table_name`), INDEX `description` (`description`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Keep the records of custom tables added in views.'; Array ( ) in db_create_table() (line 2776 of /Users/desmondyang/Documents/Sites/devdesktop/drupal-7.59/includes/database/database.inc).
I
Comment #7
sagar_cis commentedHello desmondyoung
I check the install file of the module, column description and column_relations are using length more then 255, which is not supported bu your mysql default character set,
i have update it's length to 255 which is standard and used by many drupal tables, Please download latest dev code and try again, i will include this code in my next release.
Thank you
Comment #8
lazzyvn commentedI got another bug critical
Notice : Array to string conversion $field_info['filter']['title'] : $field_info['title'] i debug $field_info['filter']['title'] is array ['fied name','fieldKey'] is must be string $field_info['filter']['title'] = 'fied name';
when create new view with custom table
Notice : Undefined index: get_instance dans views_ui_wizard_form_validate() (ligne 706 dans /var/www/drupal/sites/all/modules/contrib/views/includes/admin.inc).
Error : Function name must be a string dans views_ui_wizard_form_validate() (ligne 707 dans /var/www/drupal/sites/all/modules/contrib/views/includes/admin.inc
Comment #9
sagar_cis commentedHello @lazzyvn
I can not reproduce given error, can you please give me steps to reproduce this issue. I do not have any Notice or any warnings.
Thanks.
Comment #10
lazzyvn commentedI create my custom table by module data. there is column nid to node article
(Type Article i have one field entity reference i have to install module entityreference_filter for views)
I can't use module data views because Module date is allow 1 join (i need multi join table node) so that's why i think your module is better.
I create my table in admin/structure/views/custom_table with custom table from data join with 2 node + 2 taxonomy + 1 field collection item
now i create new views I got first message
Notice : Array to string conversion dans entityreference_filter_views_data_alter() (ligne 53 dans /var/www/drupal/sites/all/modules/contrib/entityreference_filter/entityreference_filter.views.inc).so i got 2 options
certainly it makes errors because it doesn't table based name. I hope you can reproduct this issue!
Comment #11
sagar_cis commentedHello @lazzyvn
Thanks for posting this issue, I debug the code and found that both modules "view_custom_table" & "data" implementing "hook_view_data" for same table. in your case table is "budget", so if you wish to use "view_custom_table" module you have to go to " Home » Administration » Structure » Data tables" and in click "Disown" from "Operations", this will keep your table and data, but take out it from module "data", and it's views implementation, and then you can use "view_custom_table" module smoothly.
Comment #12
lazzyvn commentedOk thanks so much I confirm Disdown doesn't remove my table, now it works fine with custom table views.
If you don't mind if i support custom table views into my module Quick add field data?
Comment #13
sagar_cis commentedSure @lazzayvn i build this module to help community and drupal users as much as possible.
Comment #14
sagar_cis commentedComment #15
avpaderno