Jump to content

Integrity constraint violation


WALU2024

Recommended Posts

Hey everyone... 

 

I am using Resellerclub Mods Addon, but when attempting to activate via Addon Modules, I am getting the below error. I've reached out to the developer, but they are taking a while to respond... Also reached out to WHMCS, and they directed me here to you guys for additional support. 

Any support/advice would be appreciated.
 

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'message' cannot be null in /home/mimu33le/public_html/vendor/illuminate/database/Connection.php:464
Stack trace:
#0 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(464): PDOStatement->execute()
#1 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database\{closure}('insert into `tb...', Array)
#2 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('insert into `tb...', Array, Object(Closure))
#3 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run('insert into `tb...', Array, Object(Closure))
#4 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(417): Illuminate\Database\Connection->statement('insert into `tb...', Array)
#5 /home/mimu33le/public_html/vendor/illuminate/database/Query/Builder.php(2727): Illuminate\Database\Connection->insert('insert into `tb...', Array)
#6 /home/mimu33le/public_html/modules/addons/resellerclubmods_tools/resellerclubmods_tools.php(0): Illuminate\Database\Query\Builder->insert(Array)
#7 /home/mimu33le/public_html/admin/configaddonmods.php(0): resellerclubmods_tools_activate()
#8 {main}
Next Illuminate\Database\QueryException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'message' cannot be null (SQL: insert into `tblemailtemplates` (`type`, `name`, `subject`, `message`, `custom`) values (domain, Domain Transfer Complete, Domain Transfer successfully completed, ?, 1)) in /home/mimu33le/public_html/vendor/illuminate/database/Connection.php:671
Stack trace:
#0 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback('insert into `tb...', Array, Object(Closure))
#1 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(465): Illuminate\Database\Connection->run('insert into `tb...', Array, Object(Closure))
#2 /home/mimu33le/public_html/vendor/illuminate/database/Connection.php(417): Illuminate\Database\Connection->statement('insert into `tb...', Array)
#3 /home/mimu33le/public_html/vendor/illuminate/database/Query/Builder.php(2727): Illuminate\Database\Connection->insert('insert into `tb...', Array)
#4 /home/mimu33le/public_html/modules/addons/resellerclubmods_tools/resellerclubmods_tools.php(0): Illuminate\Database\Query\Builder->insert(Array)
#5 /home/mimu33le/public_html/admin/configaddonmods.php(0): resellerclubmods_tools_activate()
#6 {main}

 

Link to comment
Share on other sites

  • 7 months later...

This is because your mysql server is most probably set to strict mode. You should disable strict mode as this is also required by whmcs. 

You can try to manually add the messages first:

Use phpmyadmin and execute the sql insert command for your WHMCS database and then activation should work:

```
INSERT INTO `tblemailtemplates` (`type`, `name`, `subject`, `message`, `attachments`, `fromname`, `fromemail`, `disabled`, `custom`, `language`, `copyto`, `blind_copy_to`, `plaintext`, `created_at`, `updated_at`) VALUES
('domain', 'Domain Transfer Complete', 'Domain Transfer successfully completed', '\r\n<p>Dear {$client_name},</p>\r\n<p>The Domain transfer process for {$domain_name} has been successfully completed. The details of the domain transfer are below:</p>\r\n<p>Domain: {$domain_name}<br />\r\nRegistration Length: {$domain_reg_period}<br />\r\nTransfer Price: {$domain_first_payment_amount}<br />\r\nNext Due Date: {$domain_next_due_date}</p>\r\n<p>You may login to your client area at {$whmcs_url} to manage your domain.</p>\r\n<p>{$signature}</p>\r\n', '', '', '', 0, 1, '', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
('domain', 'Domain Unlock Request', 'Domain Transfer stalled due to theft protection', '\r\n<p>Dear {$client_name},</p>\r\n<p>Your domain {$domain_name} is currently locked with your losing domain register. Before we can continue with your transfer this domain would need to be unlocked.</p>\r\n<p>If you need help getting the lock removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{$signature}</p>\r\n', '', '', '', 0, 1, '', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
('domain', 'Domain EPP Request', 'Domain Transfer waiting EPP Code', '\r\n<p>Dear {$client_name},</p>\r\n<p>The secret code for your domain {$domain_name}, also known as authorization code or EPP code was not provided with the Domain Transfer approval and we sent an approval mail requesting you to provide the EPP code.</p>\r\n<p>As soon as you have provided the EPP code, the domain transfer request will be send to your losing domain register.</p>\r\n<p>If you are having trouble with this step or if you have not received the mail to provide the EPP code please feel free to contact us.</p>\r\n<p>{$signature}</p>\r\n', '', '', '', 0, 1, '', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
('domain', 'Domain ID Protection Request', 'Domain Transfer stalled due to ID Protection', '\r\n<p>Dear {$client_name},</p>\r\n<p>Your domain {$domain_name} is currently WHOIS ID protected. Before we can continue with your transfer you need to disable the ID WHOIS Protection.</p>\r\n<p>If you need help getting the ID Protection removed from your domain then you should contact your losing domain register. If you are still having trouble or need more help please feel free to contact us.</p>\r\n<p>{$signature}</p>\r\n', '', '', '', 0, 1, '', '', '', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
```

If you got invalid date format sql error, then you must disable strict mode. Execute the following sql command as root:

SET GLOBAL sql_mode = '';

Source of the solution: https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime/36374690#36374690

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated