Problem/Motivation

Running acquiadam_asset_import_update_8112 results in this error:

my.category.with.dot key contains a dot which is not supported.

where my.category.with.dot is a placeholder for a real category that contains a dot. Just trying to be a little privacy conscious here.

Not having gotten past this step, it's not clear if this is only a problem during update. However, I suspect it's a farther-reaching problem where Widen supports categories including a dot but the new schema of acquiadam_asset_import.settings is incompatible with dot-containing categories.

Steps to reproduce

Run acquiadam_asset_import_update_8112 starting with a config file that looks like this:

categories: "my.category.with.dot\r\nAnother category"
bundle: acquia_dam_document
enable: 1

Proposed resolution

Modify schema to be compatible with dots?

Add validation or warnings in Widen to advertise that categories can't contain dots?

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork acquia_dam-3559660

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

danflanagan8 created an issue. See original summary.

ankitv18 made their first commit to this issue’s fork.

rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

Status: Active » Needs review

Requesting review

danflanagan8’s picture

Status: Needs review » Needs work

I created a patch from the MR and applied it to acquia_dam 1.1.7. (There was one whitespace change that wouldn't apply so I removed that.)

It seems to have done the trick for us. acquiadam_asset_import_update_8112 completes successfully. The new update hook (8113) gives the appropriate output for our case:

[notice] Encoded 0 category keys and 0 asset group keys to base64 format.

I reviewed the code and it looks like it should correctly update config that was created before base64 encoding was instituted.

I think this will work!

The only change I would recommend is to update (or remove) the outdated comment in acquiadam_asset_import.schema.yml:

  mapping:
    categories:
      type: sequence
      label: 'List of remote Widen category UUIDs' #  with local media bundles assigned, keyed by category UUID

Now they are keyed by base64 encoded category name. I'm not sure when this comment was accurate. Using the UUID (if one exists) would have actually prevented the problem with the dot. I don't know enough about this though to know if a category even has a UUID.

I'll set to Needs Work for that change.

I'd also like to figure out what to do on the contrib version of this module, which I'm a maintainer on. You created an issue awhile back that I'd like to get finished: #3525195: Deprecate Acquia DAM Asset Importer module in favor of Acquia DAM 1.1.x version..

amangrover90’s picture

Status: Needs work » Fixed

Plz use the patch from the merged commit and see if it fixes the problem. If not, feel free to reopen.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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