When I add a custom breadcrumb to one of my views, SQL returns the error below. This is the data I am inputting:

attractions/amusement-parks
attractions/arts
attractions/festivals
attractions/fishing
attractions/golf
attractions/gyms
attractions/history
attractions/movies
attractions/museums
attractions/night-club
attractions/parks
attractions/sports
attractions/theatre
Error message
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'paths' at row 1: INSERT INTO {custom_breadcrumbs_views} (name, titles, paths, visibility_php, views_path, language) 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); Array ( [:db_insert_placeholder_0] => Attractions Landing Pages [:db_insert_placeholder_1] => Amusement Parks Arts Festivals Fishing Golf Gyms History Movies Museums Night Club Parks Sports Theatre [:db_insert_placeholder_2] => attractions/amusement-parks attractions/arts attractions/festivals attractions/fishing attractions/golf attractions/gyms attractions/history attractions/movies attractions/museums attractions/night-club attractions/parks attractions/sports attractions/theatre [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => attractions [:db_insert_placeholder_5] => ) in drupal_write_record() (line 6884 of /home/tehbing/public_html/drupaltest/includes/common.inc).
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

meinemitternacht’s picture

Priority: Major » Normal
kruser’s picture

I'm receiving this error too. Here's my breadcrumbs for Path...

node/3
node/16
glass-block-products/seves_collections/
glass-block-products/seves_collections/[node:field-glass-block-collections-tm:tid]
glass-block-products/seves_collections/[node:field-glass-block-collections-tm:tid]/[node:field-glass-block-color-tm:tid]
kehan’s picture

Also getting this
Both paths and titles are limited to 255 characters, but the form uses a textarea and no validation.

Danny-K’s picture

Don't know if it's the best way to solve it but according to the error, in my case, the path was too long for the database table column so I just increased it's max length value from 255 to 1000. To do it, in your websites' database go to the table custom_breadcrumb and for the column paths change it from VARCHAR(255) to VARCHAR(1000).
Hope this helps.

nonstoplife’s picture

Thank you Danny-K, changing paths to 1000 solved the problem for me.

kehan’s picture

Status: Active » Needs review
FileSize
1.66 KB

The attached patch changes the titles and paths field types to 'text' with size 'medium'. Additionally makes 'paths' as not null to match the fact that the UI requires this field.

Note that the patch is for 7.x-1.x-dev

kehan’s picture

and a patch for 7.x-2.x-dev.

lunk rat’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #7 works perfectly. Patched the file, ran update.php and all is well. Thanks.

colan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the 7.x-2.x dev branch in 3f268c7.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.