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

If a value doesn't exist in the replacement dictionary and it is referenced in an optional variable, it breaks all optional variables after #508

Closed
shoe913 opened this issue Oct 13, 2020 · 9 comments
Assignees
Labels
A - bug external-library-dependent Issue is dependent on a bug/enh change in an external library

Comments

@shoe913
Copy link

shoe913 commented Oct 13, 2020

Organization variables (like the ones below) are not swapped out when the target organization does not have Hub Premium.

image

{{organization.name||My Organization}}

{{organization.portalProperties.sharedTheme.logo.small||https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data}}

@chris-fox
Copy link
Collaborator

@shoe913, i reproduced this the first time i deployed the solution to the org, but it worked properly the 2nd time and I can no longer repro. Are you seeing the same. Does your org have a shared theme logo, this is different from the org logo at the top of the settings.

image

@shoe913
Copy link
Author

shoe913 commented Oct 14, 2020

@chris-fox

After ensuring I had the logo in the correct place, it did start to work.

I still think we need to look into this though because I made no changes to the org name, and that did not swizzle until the image was swizzeling. I think it is quite possible we have users who haven't set the shared image, but do want the org name copied.

@chris-fox
Copy link
Collaborator

@shoe913, could you narrow it down then. Is this true that orgs w/o the shared theme logo fail? My understanding is they shouldn't have anything to do with each other. I want to get to the consistent simplest repro case before we pass along.

@shoe913
Copy link
Author

shoe913 commented Oct 15, 2020

@chris-fox

I can no longer reproduce this with my current orgs. However, when I create a trial org, I can consistently repro. It seems that the shared logo is changing a few things.

Before Logo Added (trial with all defaults):

  • Default logo present
  • Org name missing (replaced with "organization.name")

After Logo Added (same trial, only add the logo):

  • Logo Present
  • Org name correct

After Logo Removed (same trial, remove the shared logo:

  • Logo Missing (No default presented)
  • Org name correct

@chris-fox chris-fox changed the title Organizations with out Hub Premium do not have organization variables swapped when deploying a solution with a Hub page If a value doesn't exist in the replacement dictionary and it is referenced in an optional variable, it breaks all optional variables after Oct 20, 2020
@chris-fox
Copy link
Collaborator

chris-fox commented Oct 20, 2020

@MikeTschudi, I was able to create a really simple repro case for this. Here are the steps:

  1. This solution item has a single web map, https://www.arcgis.com/home/item.html?id=1c6caa14de614484a7ec76c2f960910c

  2. The item description has the following html:

{{organization.name||My Community}}<br />{{organization.nonexistantproperty.sharedTheme.logo.small||https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data}}<br />{{organization.name||My Community}}

  1. Deploy the solution

  2. View the resulting Web Map's item description and you will see something like the following:

ArcGIS Team Local Gov<br />https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data<br /> organization.name

What it looks like is happening, is the first {{organization.name||My Community}} is replaced properly with the organization name setting.

When it gets to the second it can't find organization.nonexistantproperty.sharedTheme.logo.small in the replacement dictionary, so it correctly falls back to https://www.arcgis.com/sharing/rest/content/items/28989a5ecc2d4b2fbf62ac0f5075b7ff/data.

Then the third one, should be properly replaced with the org name again, but it instead it is returning the name of the variable incorrectly.

@MikeTschudi
Copy link
Member

MikeTschudi commented Oct 20, 2020

Superb information; thank you @shoe913 & @chris-fox!

adlib library appears to stop after a failed lookup: Esri/adlib#53

@MikeTschudi MikeTschudi added the external-library-dependent Issue is dependent on a bug/enh change in an external library label Oct 20, 2020
MikeTschudi added a commit that referenced this issue Oct 20, 2020
@MikeTschudi
Copy link
Member

fixed adlib: Esri/adlib#54

@MikeTschudi
Copy link
Member

adlib updated to version 3.0.6; hub.js needs update to use same version

@chris-fox
Copy link
Collaborator

Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - bug external-library-dependent Issue is dependent on a bug/enh change in an external library
Projects
None yet
Development

No branches or pull requests

3 participants