adding new slider causes error

jpjsenior's picture
jpjsenior
Tue, 04/25/2017 - 15:00
#1
adding new slider causes error

Hi,

When I try to add a new slider. It lets me create it and save it. But then when I go to the blocks page to add it on a page, I get this error

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'bid' doesn't have a default value: INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array( [:db_insert_placeholder_0] => md_slider [:db_insert_placeholder_1] => sampleholdingslider [:db_insert_placeholder_2] => md_hosoren [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => -1 [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => -1) in drupal_write_record() (line 7334 of /var/sites/f/formatusaudio.co.uk/public_html/includes/common.inc).

Is there something I haven't set when making the slider or something?

Thanks,

Jon

phuonght's picture
phuonght
Tue, 04/25/2017 - 22:16

Hi,

Have you updated Drupal core or module?

jpjsenior's picture
jpjsenior
Wed, 04/26/2017 - 03:50

Hi,

Haven't updated anything but did switch hosting provider by copying the database and site files across to the other's servers.

Could I just add a value in the field 'bid'? Is there a way of doing this in the CMS?

Thanks,

Jon

jpjsenior's picture
jpjsenior
Wed, 04/26/2017 - 03:54

it's very strange

phuonght's picture
phuonght
Wed, 04/26/2017 - 23:23

Maybe there were som problem when you exported/ imported your database. If you old website still exists, please try exporting and importing again. 

jpjsenior's picture
jpjsenior
Thu, 04/27/2017 - 03:59

Thanks, yes a friend took a look at it and has confirmed the database didn't export properly. Shame, I cancelled the hosting on the other place before noticing this problem, so can't re-export. No worries, my friend said the database should be repairable, it just might take some time to go through it all.

Thanks again.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.