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

lindaweb created an issue. See original summary.

dhayanandan_k’s picture

Hi,

Thanks for using the module. I have updated the code. Please check now and let me know

dhayanandan_k’s picture

Version: 8.x-1.1 » 8.x-3.1
Status: Active » Fixed
Issue tags: +Fixed in version3

Fixed. Please review

lindaweb’s picture

Hi

Tested , working beautifully - Thanyou !! :)

lindaweb’s picture

Hi

Will update if i find something else.

Thank you for your work on this. Very much appreciated !!

lindaweb’s picture

Hi

It created the nodes but leaves the fields empty.
No error gets supplied, it shows the content title but leaved the rest empty.

lindaweb’s picture

Status: Fixed » Needs work
JoshuaBud’s picture

I 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

dhayanandan_k’s picture

Status: Needs work » Fixed

@JoshuaBud, This has been fixed. Please verify in latest dev version and let me know

dhayanandan_k’s picture

Issue tags: -Fixed in version3 +Fixed in version4

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.