Back to Newsletter Support

gabriele.maddaloni50640
gabriele.maddaloni50640

Hello, I am using an SQLite install of October, and after having issues with sending mail, I noticed that the plugin had updates. When trying to update, I received the following error, hope it's a known issue!

Update failed "SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "initbiz_newsletter_checkboxes" add column "slug" varchar not null)" on line 664 of /home/domains/vol3/025/2596025/user/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php

inIT
inIT

Hi,

Thanks for using our plugin!

The problem was actually caused by adding column slug and I guess you were using an older version of the plugin and have added a few checkboxes. Try to update the plugin one more time and ensure you have entered slugs in every checkbox after the update.

Let us know if you encountered more problems.

With best regards,

Tomasz Strojny

gabriele.maddaloni50640
gabriele.maddaloni50640

that's fantastic, I was able to update, I have no idea why I got an older version as I purchased this not two day ago.

I am getting a different error now unfortunately. I am sorry for the bother, here's the error message:

"SQLSTATE[HY000]: General error: 1 table initbiz_newsletter_messages has no column named email_template (SQL: insert into "initbiz_newsletter_messages" ("title", "content", "sent", "send_to", "email_template", "updated_at", "created_at") values (Yo test!,

YO YO Test Test

, 1, all, initbiz.newsletter::mail.message, 2019-09-24 10:14:26, 2019-09-24 10:14:26))" on line 664 of /home/domains/vol3/025/2596025/user/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php

inIT
inIT

Oh, that's problematic. If you don't mind about the data in your application, try to run php artisan plugin:refresh Initbiz.Newsletter.

It looks like not all the migrations were run.

gabriele.maddaloni50640
gabriele.maddaloni50640

running plugin:refresh gives out a similar error:

SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL (SQL: alter table "initbiz_newsletter_subscribers" add column "agreed" tinyint(1) not null)

inIT
inIT

It's good you have posted the error message. It was still my fault. Please update the plugin to the newest version and run plugin:refresh again.

Thank you!

gabriele.maddaloni50640
gabriele.maddaloni50640

Hey, thanks, it worked like a charm for the whole update and refresh process.

I also tested the subscription and I did indeed receive a confirmation mail after setting up mailgun, so that's great!

Unfortunately having created a new message and clicked on the "Create" button, I receive the following error message:

"SQLSTATE[HY000]: General error: 1 table initbiz_newsletter_messages has no column named email_template (SQL: insert into "initbiz_newsletter_messages" ("title", "content", "sent", "send_to", "email_template", "updated_at", "created_at") values (Test,

Testing lads

, 1, all, myNewsletterTemplate, 2019-09-25 23:46:03, 2019-09-25 23:46:03))" on line 664 of /home/domains/vol3/025/2596025/user/htdocs/vendor/laravel/framework/src/Illuminate/Database/Connection.php

I am although happy to say that despite the error message, the newsletter mail gets sent so I am really not bothered by it :D

I am very happy with this plugin even with this small hiccup, it really streamlines the whole thing nicely.

inIT
inIT

To be honest, I have never tested the plugin on SQLite so I guess this might be the case.

All in all, I am not that happy that the error displays. It still looks like not all the migrations were run. Is it possible for you to remove all the initbiz_newsletter_* tables, clear the system_plugin_history and system_plugin_versions of the initbiz.newsletter records and run the php artisan october:up command?

There is a possibility that the migrations were interrupted and that's why you don't have all columns.

1-8 of 8