When trying to enable 7.x-2.x. I received the following error:
WD php: PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column[error]
'common' at row 1: INSERT INTO {biblio_field_type} (tid, fid, ftdid, cust_tdid, common,
autocomplete, required, weight, visible, vtab) VALUES (:db_insert_placeholder_0,
:db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3,
:db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6,
:db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array
(
[:db_insert_placeholder_0] => 0
[:db_insert_placeholder_1] => 3
[:db_insert_placeholder_2] => 3
[:db_insert_placeholder_3] => 3
[:db_insert_placeholder_4] =>
[:db_insert_placeholder_5] =>
[:db_insert_placeholder_6] => 1
[:db_insert_placeholder_7] => 2
[:db_insert_placeholder_8] =>
[:db_insert_placeholder_9] => 0
)
in _add_db_field_data() (line 1345 of
/home/quickstart/websites/biblio.dev/sites/all/modules/biblio/biblio.install).
This is due to two missing values in "misc/biblio.field.link.data.csv", specifically in the "common" and "autocomplete" and "visible" columns of "Author Category" and "Author Role". I've attached the update csv file.
After correcting these I received this error:
FieldException: Attempt to create a field of unknown type <em class="placeholder">biblio_text</em>. in field_create_field() (line 110 of /home/quickstart/websites/biblio.dev/modules/field/field.crud.inc).
This is due to field names being "biblio_text" instead of "text" only in the csv to import the fields from.
I've changed the values and you can find the whole content of misc/biblio.field.link.data here:
fid,title,hint,common,autocomplete,required,weight,visible,"field name",type,width,maxlength,vtab,entity
1,Title,,1,0,1,1.1,1,biblio_title,text,60,255,0,biblio
2,Author Name,,1,1,1,1.2,1,biblio_contributor_name,text,60,255,1,biblio_contributor
3,"Author Category",,1,0,1,2,1,biblio_contributor_category,text,60,255,0,biblio_contribution
4,"Author Role",,1,0,1,2,1,biblio_contributor_role,text,60,255,0,biblio_contribution
5,"Secondary Title",,0,0,0,6,0,biblio_title_secondary,text,60,255,3,biblio
6,"Tertiary Title",,0,0,0,7,0,biblio_title_tertiary,text,60,255,9,biblio
7,"Accession Number",,1,0,0,8,1,biblio_accession_number,text,24,128,5,biblio
8,"ISBN Number",,1,0,0,9,1,biblio_isbn,text,24,128,5,biblio
9,"Call Number",,1,0,0,10,1,biblio_call_number,text,24,128,5,biblio
10,"Other Numbers",,1,0,0,11,1,biblio_other_number,text,10,128,5,biblio
11,"Other Author Affiliations",,0,0,0,12,0,biblio_other_author_affiliations,text,60,255,10,biblio
12,Publisher,,0,0,0,13,0,biblio_publisher,text,60,255,4,biblio
13,"Place Published",,0,0,0,14,0,biblio_place_published,text,60,255,4,biblio
14,"Year of Publication","Enter YYYY, Submitted or In Press",1,0,1,15,1,biblio_year,text,4,20,3,biblio
15,Edition,,0,0,0,16,0,biblio_edition,text,60,255,3,biblio
16,Volume,,0,0,0,17,0,biblio_volume,text,10,128,3,biblio
17,Number,,0,0,0,18,0,biblio_number,text,10,128,3,biblio
18,Pagination,,0,0,0,19,0,biblio_pages,text,24,128,3,biblio
19,"Date Published",(mm/yyyy),0,0,0,20,0,biblio_date,text,16,16,3,biblio
20,"Publication Language",,0,0,0,21,0,biblio_lang,text,24,24,3,biblio
21,Abstract,,1,0,0,22,1,biblio_abst_e,text_long,60,65535,2,biblio
22,"French Abstract",,0,0,0,23,0,biblio_abst_f,text_long,60,65535,10,biblio
23,Keywords,,1,1,0,24,0,biblio_keywords,text,60,1000,7,biblio
24,"Type of Work","Masters Thesis",0,0,0,25,0,biblio_type_of_work,text,60,255,3,biblio
25,URL,,1,0,0,26,1,biblio_url,text,60,255,6,biblio
26,Notes,,0,0,0,27,0,biblio_notes,text_long,60,65535,8,biblio
27,Issue,,0,0,0,28,0,biblio_issue,text,10,128,3,biblio
28,"Research Notes",,0,0,0,29,0,biblio_research_notes,text_long,60,65535,8,biblio
29,"Number of Volumes",,0,0,0,30,0,biblio_number_of_volumes,text,10,128,3,biblio
30,"Short Title",,0,0,0,31,0,biblio_short_title,text,60,255,9,biblio
31,"Alternate Title",,0,0,0,32,0,biblio_alternate_title,text,60,255,9,biblio
32,"Translated Title",,0,0,0,33,0,biblio_translated_title,text,60,255,9,biblio
33,"Original Publication",,0,0,0,34,0,biblio_original_publication,text,60,255,9,biblio
34,"Reprint Edition",,0,0,0,35,0,biblio_reprint_edition,text,120,255,3,biblio
35,Section,,0,0,0,36,0,biblio_section,text,10,128,3,biblio
36,"Citation Key",,0,0,0,37,0,biblio_citekey,text,16,255,5,biblio
37,"COinS Data","This will be automatically generated",0,0,0,38,0,biblio_coins,text_long,60,65535,10,biblio
38,"ISSN Number",,0,0,0,39,0,biblio_issn,text,24,128,5,biblio
39,DOI,,1,0,0,40,1,biblio_doi,text,60,255,6,biblio
40,"Author Address",,0,0,0,41,0,biblio_auth_address,text_long,60,65535,10,biblio
41,"Remote Database Name",,0,0,0,42,0,biblio_remote_db_name,text,60,255,10,biblio
42,"Remote Database Provider",,0,0,0,43,0,biblio_remote_db_provider,text,60,255,10,biblio
43,Label,,0,0,0,44,0,biblio_label,text,60,255,10,biblio
44,"Access Date",,0,0,0,45,0,biblio_access_date,text,60,255,10,biblio
45,"Refereed Designation",,0,0,0,46,0,biblio_refereed,text,0,128,10,biblio
Comments
Comment #0.0
dominikb1888 commentedadded field autocomplete as there were entries missing as well. this only became obvious after a reinstall of biblio
Comment #0.1
dominikb1888 commented"visible" field was empty and required as well
Comment #1
smithdalec commentedThe first problem is caused in _add_db_field_data(), which we no longer need with Drupal's field system. I've commented out the line that calls that function, as well as the line that calls _add_custom_field_data() in hook_install() for the time being.
I'll go through and see if there's any code within those functions that will still be of use for our Drupal Fields implementation.
The biblio_text field type is a custom field I created (see hook_field_info in biblio.module) that has an extra data value for a vertical tab location on the biblio add form, so we should keep that as-is :P
ETA: I've pushed up my most recent changes on the d.o 7.x-2.x branch.
Comment #2
dominikb1888 commentedOk. We should then delete the post here somehow.
Applying the changes above though helped me getting the module to install at all. I saw there was a function in .install which overrode any "text" type from that csv and set it to "biblio_text". So, the entity type should be fine again.
Anyways, I'll pull your latest changes and will try again. Quite impressive this progress so far!
Comment #3
dominikb1888 commentedI pulled the latest changes today and tried installing the module again, but no luck with the .csv coming from the repo. Using the data linked in the summary it works.
Comment #4
smithdalec commentedWell, I've changed all text fields back to using "text" instead of "biblio_text" (I found a way to specify vertical tab by manually editing the field settings form). I'm still keeping the Biblio Fields module around for now, just in case a custom field type is still needed in the future.
The code for the CSV file has gone through plenty of iterations since this issue was opened, and should be working now.
Comment #5
dominikb1888 commentedI will test this as soon as possible! Thx for the changes.
Comment #5.0
dominikb1888 commentedfound another error relating to "biblio_text" as a field type, replaced it with "text"