Problem/Motivation

In OrangeDamApi::getAssetUrl(), we pass the following parameter to the Orange Dam API:

'StickToCurrentVersion' => 'true',

This option means that the version of the asset at the time of the AssetLink URL creation, will *always* be the version retrieved at that URL.

While some implementors might prefer this, I think for most migrations, the latest, or most recently changed, version would be the one desired.

Steps to reproduce

1. Call OrangeDamApi::getAssetUrl() with `StickToCurrentVersion` set to true.
2. Change the asset attached to the content type you are retrieving.
3. Call the URL retrieved in step 1. The asset will still be the same as what was retrieved in step 1 instead of the version of the most recent version of the asset.

Proposed resolution

1. If you agree with my assertion that "latest" is a sane default, I think we should make `false` the default for the StickToCurrentVersion parameter.
2. While I do think `false` should be the default, I also see situation where an implementor might want the url to capture the moment-in-time version forever, even if it is superseded, so I propose that we make this an optional setting in orange_dam configuration.

Issue fork orange_dam-3385487

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

apotek created an issue. See original summary.

  • apotek committed 6cde0266 on 1.x
    Issue #3385487: For Orange Dam asset urls, default to always retrieve...
apotek’s picture

Title: For Orange Dam asset urls, default to always retrieve latest rather than "current" » For Orange Dam asset urls, allow user to override default to always retrieve "current"
Status: Active » Reviewed & tested by the community
apotek’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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