Hey,

Just installed the module and ran into an error. What I did was to create a new user at /admin/user/user/create and submit the form. The user was created successfully, but I got a SQL error in the process:

user warning: Field 'title' doesn't have a default value query: INSERT INTO advanced_blog (uid, format) VALUES (3, 0) in C:\inetpub\wwwroot\fanshawe\includes\common.inc on line 3477.

Briefly looking over the code, it looks like this is because the columns on advanced_blog table are all set as not null with no default set. Also, since your not providing fields for the blog info at /admin/user/user/create, why even save a row to the DB there?

Thanks,
~Matt

Comments

Ravel’s picture

I had the same issue and with your directions I was able to solve the problem on my system by changing the fields "title" and "description" in the table advanced_blog to allow NULL and setting the default value of those fields to NULL.

Thanks.

john franklin’s picture

StatusFileSize
new806 bytes

The attached patch removes the NOT NULL restriction on the title and description fields. You must run a DB update for the patch to take effect. (https://example.org/update.php or drush updatedb.)

As Matt mentioned, this is not the right answer, but it at least removes the errors.

m4olivei’s picture

Do you need to change your hook_schema implementation as well so that those installing for the first time will get the updates?

Matt

john franklin’s picture

StatusFileSize
new1.16 KB

It isn't clear in the API docs that updating hook_schema is required, but an email in the Drupal Support mailing list archives clarifies it is required.

Patch rerolled to include hook_schema() update.

m4olivei’s picture

Nice, good to see that clarified.