Hi
Thankyou for this module , this is fantastic !!
I tried to test this on my site. I have as yet had no luck, but it is a step forward :)
I have a content type that has various fields.
12 x Plain text
2 x Entity reference
2 x Computed (text)
When i try and import i get the following error:
White screen error :
Parse error: syntax error, unexpected end of file in /modules/contrib/computed_field/src/Plugin/Field/FieldType/ComputedStringItem.php(163) : eval()'d code on line 1
The website encountered an unexpected error. Please try again later.
Dblog errors :
First error :
config/content/contentimport
Message Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'promote' cannot be null: INSERT INTO {node_field_data} (nid, vid, type, langcode, status, title, uid, created, changed, promote, sticky, revision_translation_affected, default_langcode, publish_on, unpublish_on) 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, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 10102 [:db_insert_placeholder_1] => 10178 [:db_insert_placeholder_2] => servicetype [:db_insert_placeholder_3] => en [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => Title of Node [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => 1501835994 [:db_insert_placeholder_8] => 1501835994 [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 1 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 770 of /var/www/html/jenny/2017/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Second Error :
admin/config/content/contentimport
Message Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'promote' cannot be null: INSERT INTO {node_field_data} (nid, vid, type, langcode, status, title, uid, created, changed, promote, sticky, revision_translation_affected, default_langcode, publish_on, unpublish_on) 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, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 10102 [:db_insert_placeholder_1] => 10178 [:db_insert_placeholder_2] => servicetype [:db_insert_placeholder_3] => en [:db_insert_placeholder_4] => 1 [:db_insert_placeholder_5] => Title of node [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => 1501835994 [:db_insert_placeholder_8] => 1501835994 [:db_insert_placeholder_9] => [:db_insert_placeholder_10] => 0 [:db_insert_placeholder_11] => 1 [:db_insert_placeholder_12] => 1 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => ) in Drupal\Core\Database\Connection->handleQueryException() (line 682 of /core/lib/Drupal/Core/Database/Connection.php).
Please can you tell me how i get around this, as i need values computed when the import happens or id there a way to override computed fields and perhaps republish when import is complete ?
these
Comments
Comment #2
dhayanandan_k CreditAttribution: dhayanandan_k commentedHi,
Thanks for using the module. I have updated the code. Please check now and let me know
Comment #3
dhayanandan_k CreditAttribution: dhayanandan_k as a volunteer and commentedFixed. Please review
Comment #4
lindaweb CreditAttribution: lindaweb commentedHi
Tested , working beautifully - Thanyou !! :)
Comment #5
lindaweb CreditAttribution: lindaweb commentedHi
Will update if i find something else.
Thank you for your work on this. Very much appreciated !!
Comment #6
lindaweb CreditAttribution: lindaweb commentedHi
It created the nodes but leaves the fields empty.
No error gets supplied, it shows the content title but leaved the rest empty.
Comment #7
lindaweb CreditAttribution: lindaweb commentedComment #8
JoshuaBud CreditAttribution: JoshuaBud commentedI added an issue some time ago that references the Title field being the only imported piece of content when importing custom content types. https://www.drupal.org/node/2902724
Comment #9
dhayanandan_k CreditAttribution: dhayanandan_k as a volunteer and commented@JoshuaBud, This has been fixed. Please verify in latest dev version and let me know
Comment #10
dhayanandan_k CreditAttribution: dhayanandan_k as a volunteer and commented