- Issue created by @TolstoyDotCom
I got this in my PHP error log: Uncaught PHP Exception Drupal\\Core\\Database\\DatabaseExceptionWrapper: "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO "key_value" ("collection", "name", "value") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array\n(\n [:db_insert_placeholder_0] => project_browser:drupalorg_jsonapi\n [:db_insert_placeholder_1] => drupalorg_jsonapi/drupal-augmentor_google_cloud_text_to_speech-augmentor_google_cloud_text_to_speech-augmentor_google_cloud_text_to_speech\n [:db_insert_placeholder_2] => O:45:"Drupal\\project_browser\\ProjectBrowser\\Project":16:{s:2:"id";s:138:"drupalorg_jsonapi/drupal-augmentor_google_cloud_text_to_speech-augmentor_google_cloud_text_to_speech-augmentor_google_cloud_text_to_speech";s:4:"type";E:41:"Drupal\\project_browser\\ProjectType:Module";s:4:"logo";a:0:{}s:12:"isCompatible";b:1;s:11:"machineName";s:37:"augmentor_google_cloud_text_to_speech";s:51:", referer: [site]/admin/modules/browse/drupalorg_jsonapi
I'm working on a Java UI for composer that I'll make work with PB. As part of that, I wanted to download all the PB data. So, I changed DrupalDotOrgJsonApi.php to set $iteration_limit to 10000 and then loaded the Project Browser. Alternatively, you can just keep paging and paging until you download that project.
If the name is longer than, say, 127 characters, shorten it. The name
column is not UNIQUE, so maybe shortening it to 115 characters & adding a 10 character hash might prevent name collisions. The full name will be in the value
column but I don't know if taking it from there will require other code changes.
Active
2.0
Code