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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | advanced_blog-null_fields.patch | 1.16 KB | john franklin |
| #2 | advanced_blog-null_fields.patch | 806 bytes | john franklin |
Comments
Comment #1
Ravel commentedI 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.
Comment #2
john franklin commentedThe 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.
Comment #3
m4oliveiDo you need to change your hook_schema implementation as well so that those installing for the first time will get the updates?
Matt
Comment #4
john franklin commentedIt 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.
Comment #5
m4oliveiNice, good to see that clarified.