Guest User

Untitled

a guest
Feb 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`newsletter_subscriber`, CONSTRAINT `NEWSLETTER_SUBSCRIBER_FIRSTNAME_CUSTOMER_ENTITY_FIRSTNAME` FOREIGN KEY (`firstname`) REFERENCES `customer_entity` (`firstname`) ON DELETE SET NULL), query was: INSERT INTO `newsletter_subscriber` (`store_id`, `change_status_at`, `subscriber_email`, `subscriber_status`, `firstname`, `firstname`) VALUES (?, '2019-02-12 15:35:20', ?, ?, ?, ?)
  2.  
  3. $con->addForeignKey(
  4. $setup->getFkName('newsletter_segment', 'firstname', 'customer_entity', 'firstname'),
  5. 'newsletter_subscriber',
  6. 'firstname',
  7. 'customer_entity',
  8. 'firstname',
  9. MagentoFrameworkDBDdlTable::ACTION_SET_NULL
  10. );
  11.  
  12. <field name="firstname">
  13. <argument name="data" xsi:type="array">
  14. <item name="config" xsi:type="array">
  15. <item name="visible" xsi:type="boolean">true</item>
  16. <item name="dataType" xsi:type="string">text</item>
  17. <item name="formElement" xsi:type="string">input</item>
  18. <item name="source" xsi:type="string">subscriber</item>
  19. <item name="label" xsi:type="string">Firstname</item>
  20. </item>
  21. </argument>
  22. </field>
Add Comment
Please, Sign In to add comment