I get following error 3 times while viewing the blocks.

user warning: Duplicate entry 'hellosap-apachesolr_search-ssfield_cck_field_profile_relati' for key 2 query: drupal_write_record /* admin : drupal_write_record */ INSERT INTO blocks (module, delta, theme, status, weight, region, custom, throttle, visibility, pages, title, cache) VALUES ('apachesolr_search', 'ssfield_cck_field_profile_relation', 'hellosap', 0, 0, '', 0, 0, 0, '', '', 1) in C:\xampp\htdocs\hellosap\includes\common.inc on line 3324.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jp.stacey’s picture

We get this error too: it's because the delta being created (ssfield_cck_field_profile_relation) is too long for the 32-char field in the database, so it gets truncated and conflicts with existing records. It'd be better if the delta were some sort of hash UUID instead of a field name.

Actually, it'd be better if we could just not have these blocks. The many automated blocks are a bit of a pain, especially on a complex site: most of them we don't need, and we've had to rebuild the others to match what our client wanted. Any way of putting in an option to turn them all off, or move them out into a sub-module?

jp.stacey’s picture

We get this error too: it's because the delta being created (ssfield_cck_field_profile_relation) is too long for the 32-char field in the database, so it gets truncated and conflicts with existing records. It'd be better if the delta were some sort of hash UUID instead of a field name.

Actually, it'd be better if we could just not have these blocks. The many automated blocks are a bit of a pain, especially on a complex site: most of them we don't need, and we've had to rebuild the others to match what our client wanted. Any way of putting in an option to turn them all off, or move them out into a sub-module?

jp.stacey’s picture

(sorry for duplicate comment: I got a "you do not have access to any projects" error from d.o first time round!)

pwolanin’s picture

Status: Active » Needs review
FileSize
1.75 KB

The CCK field name can be a full 32 chrs, so it seems like we must use just that as the delta.

pwolanin’s picture

can cut a couple more lines.

Note - there is no upgrade path here - you'll have to manually reconfigure your blocks.

pwolanin’s picture

now with update function. Please test.

JacobSingh’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

pwolanin’s picture

committed to 6.x

pwolanin’s picture

Status: Reviewed & tested by the community » Fixed
pwolanin’s picture

Status: Fixed » Closed (fixed)