[MTE-153] Supplied variation [null] could not be found Created: 21/Nov/23  Updated: 28/Nov/23

Status: Open
Project: Magnolia Templating Essentials
Component/s: imaging
Affects Version/s: 2.0.3
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MTE-150 No image variation found, will return... Open
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Epic Link: Support
Team: DeveloperX

 Description   

In the class VariationAwareImagingSupport if the local variable "variationName" is null the code simply prints "Supplied variation [null] could not be found. Please update your configuration." It would be helpful to know what property it was trying to use at the time. In the context of support someone can give us the feedback --> "I'm seeing this in my log":

2023-07-03 10:36:11 2023-11-17 17:22:02,650 WARN  ia.templating.imaging.VariationAwareImagingSupport: Supplied variation [null] could not be found. Please update your configuration.

Notes
Currently the code looks like this:

@Override
    public String createLink(Property binaryProperty, String variationName) {
        if (isEnabled() && !ImagingSupport.VARIATION_ORIGINAL.equals(variationName)) {
            if (variations.containsKey(variationName)) {
                return variations.get(variationName).createLink(binaryProperty);
            } else {
                log.warn("Supplied variation [{}] could not be found. Please update your configuration.", variationName);
            }
        }

        return createLink(binaryProperty);
    }
  • If the variationName is null or cannot be found then we need to know more information about binaryProperty so we can track it down. Otherwise it ends up being noise in the log file.

Generated at Mon Feb 12 07:42:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.