Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to import an updated CDF. #210

Open
kevinfunk opened this issue Feb 27, 2020 · 8 comments
Open

Unable to import an updated CDF. #210

kevinfunk opened this issue Feb 27, 2020 · 8 comments

Comments

@kevinfunk
Copy link
Contributor

Recently I tried to update the title of the home page in dfs_one. I was able to export a new CDF without an issue, but when I tried to do a new build with the updated CDF, I got an error.

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'menu_name' at row 1: INSERT INTO {menu_tree} (id, menu_name) VALUES
   (:db_insert_placeholder_0, :db_insert_placeholder_1); Array
  (
      [:db_insert_placeholder_0] => menu_link_content:01c91444-fb68-4646-9e53-3ce24f2fc66b
      [:db_insert_placeholder_1] => swijathehotroclovihubutewrewruwaslushoswewakegoprucethubrunutrivopramafrediwophuclofripruphacleclutudacoje
  )
@saltednut
Copy link
Contributor

Adding @EclipseGc for some visibility. No changes on our end other than keeping modules and libraries as up to date as possible.

@saltednut
Copy link
Contributor

We are on a specific hash for the PHP library, based on some conversations we had last week when installations were broken using existing CDFs that were exported months ago, as well.

https://github.com/acquia/df/blob/8.x-4.x/composer.json#L214

@EclipseGc
Copy link

Ok, so 2 things:

  1. You guys should no longer need to be pinned to a particular hash. We did releases for the library, contenthub and depcalc earlier this week, so you can just go back to using dev or the latest release. Latest release is now pinned to released versions of the library and depcalc.
  2. That menu link title looks like it was generated. This is a core bug wherein the generated strings are longer than the database column limits. How did you build this menu?

@saltednut
Copy link
Contributor

Ok cool, we can update to use the tagged releases.

The workflow is to create everything via the UI then export a CDF package. Additionally, our configuration for this scenario does not call for the Scenarios module to load all menu_link_content as a proper dependent - e.g. provide it to depcalc for CDF-ification. So any menu_link_content that is added to the CDF could only have come because it was found as a dependency of one of the other dependents. This might make more sense if I share what our config form looks like as far as what we "export" when we request a CDF.

Screen Shot 2020-02-27 at 11 52 29 AM

@saltednut
Copy link
Contributor

Looks like there's no menu_link_content on the demo site - I wonder if that string is part of an incomplete dataset?

@EclipseGc
Copy link

Like I said, it looks like a generated entity. This can happen a couple of different ways, but most commonly, it can happen on import when 2 (or more) entities have dependencies on each other. Does your CDF export have a menu_link_content entity in it?

@saltednut
Copy link
Contributor

It does. But I am not sure why since we don't see any menu link content actually in on the site.

 ack menu_link_content
dfs_one.json
26474:                        "target": "menu_link_content"
29273:                        "target": "menu_link_content"
29989:                        "target": "menu_link_content"
32309:                        "target": "menu_link_content"
32898:                        "target": "menu_link_content"
34409:                        "target": "menu_link_content"
37363:                        "target": "menu_link_content"
38353:                        "target": "menu_link_content"
38984:                        "target": "menu_link_content"

Could these be legacy items that are hanging around?

@saltednut
Copy link
Contributor

saltednut commented Feb 28, 2020

Another quick check to see if there's any entities (checking if array is empty)

drush ev 'drush_print(empty(array_keys(entity_load_multiple("menu_link_content"))));'
1
drush ev 'drush_print(empty(array_keys(entity_load_multiple("user"))));'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants