0

When is created programmatically with API multiple entities CustomGroup, after created someones in the same process finish with the next error(the param "name" is filled), CiviCRM 5.16

[is_error] => 1
[error_message] => SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null

I tried sleep() in each iteration to discard problems with performance.

Any clue?

Example

Array
(
    [name] => a
    [title] => a
    [extends] => Membership
    [extends_entity_column_value] => Array
        (
            [0] => 1
            [1] => 2
        )

    [style] => Inline
    [collapse_display] => 0
    [weight] => 8
    [is_active] => 1
    [is_multiple] => 0
    [collapse_adv_display] => 0
    [is_reserved] => 0
    [is_public] => 1
)
Array
(
    [name] => b
    [title] => b
    [extends] => Contribution
    [style] => Inline
    [collapse_display] => 0
    [weight] => 11
    [is_active] => 1
    [is_multiple] => 0
    [collapse_adv_display] => 0
    [is_reserved] => 0
    [is_public] => 1
)
Array
(
    [name] => c
    [title] => c
    [extends] => Contact
    [style] => Inline
    [collapse_display] => 0
    [weight] => 2
    [is_active] => 1
    [is_multiple] => 0
    [collapse_adv_display] => 0
    [is_reserved] => 0
    [is_public] => 1
)
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null                                                                                                                                                                                  [error]
Array
(
    [is_error] => 1
    [error_message] => SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null
  • 1
    How are you trying to create those custom group? api? managed hook? Also does the log show any details about which table it is trying to do insert? – Pradeep Nayak Jan 9 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.