3

I am setting up a new DXA2.2 site. When I do an admin refresh, I can see in the logging that various items are downloaded over the service and written to disk, and if I look in the application directory, I can see them. However, it doesn't seem to create version.json, and not very long after I get a StaticContentNotFoundException about this file, as you can see in the following stack trace. I'm assuming that an admin/refresh should create this, but it doesn't. I've looked in the Publish Configuration template to see if it creates version.json, but I couldn't see anything. Where should I be looking? How is this supposed to work? Where does version.json come from?

18:40:18.818 [http-nio-8045-exec-7] DEBUG c.t.a.c.cookie.ClaimCookieSerializer - Starting to serialize 1 claims that were received. 18:40:18.818 [http-nio-8045-exec-7] DEBUG c.s.w.c.c.i.ClientRequestRetrySupporter - RequestProperties : {Cookie=TAFContext.zip.1=H4sIAAAAAAAAAKtWKklMsypKLSxNLS6xKKgsSBxNLUktKlayqlZy9vcLcfULifdx9XMP8VCyilbSNVSK1VEKDHUNiowPDgny9HMHiuaV5uQARWGqQyIDXBGiAY4hHvGefm7+IO36eTn6iSm5mXn6RalpRanFGUqxtbUAXJUlOYIAAAA, Authorization=Bearer client_id=cduser&Role=cd&FirstName=CD&LastName=User&expiresOn=1596559796496&digest=6u5oBfUQRFvJERKJQgQf_Mi5XklH4VdhBJybs5anE_E=} 18:40:18.850 [http-nio-8045-exec-7] DEBUG c.s.d.t.c.GenericStaticContentResolver - Writing binary content to file: D:\code\dxa-xxx2020-site\target\dxa-xxx2020-site-2.0.0-SNAPSHOT\BinaryData\297\nl\system\config\xxx2020.templates.json 18:40:18.854 [http-nio-8045-exec-7] DEBUG c.s.w.a.d.DynamicMetaRetrieverImpl - Searching for binaryMeta for url='http://localhost:8045/nl/version.json'. 18:40:18.854 [http-nio-8045-exec-7] DEBUG c.s.w.c.c.i.ClientRequestParamsSupporter - ForwardedClaims is configured. Will forward following claims: [taf:session:preview:preview_session, taf:ish:userconditions, taf:ish:userconditions:merged, taf:request:parameters] 18:40:18.854 [http-nio-8045-exec-7] DEBUG c.t.a.c.cookie.ClaimCookieSerializer - Starting to serialize 1 claims that were received. 18:40:18.854 [http-nio-8045-exec-7] DEBUG c.s.w.c.c.i.ClientRequestRetrySupporter - RequestProperties : {Cookie=TAFContext.zip.1=H4sIAAAAAAAAAKtWKklMsypKLSxNLS6xKKgsSBxNLUktKlayqlZy9vcLcfULifdx9XMP8VCyilbSNVSK1VEKDHUNiowPDgny9HMHiuaV5uQARWGqQyIDXBGiAY4hHvGefm7+IO36eTn6iSm5mXn6RalpRanFGUqxtbUAXJUlOYIAAAA, Authorization=Bearer client_id=cduser&Role=cd&FirstName=CD&LastName=User&expiresOn=1596559796496&digest=6u5oBfUQRFvJERKJQgQf_Mi5XklH4VdhBJybs5anE_E=} 18:40:18.854 [http-nio-8045-exec-7] DEBUG c.s.odata.client.DefaultODataClient - Getting entity for query ODataClientQuery[GetDynamicMetaFunctionImport(Url='http%253A%252F%252Flocalhost%253A8045%252Fnl%252Fversion.json',ItemType='BinaryMeta')] 18:40:18.855 [http-nio-8045-exec-7] DEBUG c.s.o.c.caller.BasicEndpointCaller - Preparing the call endpoint for given url: https://cd-cont-ace705-dev-eu-west-1-svbnlr8.tridion.sdlproducts.com:8084/client/v4/content.svc/GetDynamicMetaFunctionImport(Url='http%253A%252F%252Flocalhost%253A8045%252Fnl%252Fversion.json',ItemType='BinaryMeta') 18:40:18.893 [http-nio-8045-exec-7] DEBUG c.s.o.c.caller.BasicEndpointCaller - Request ended with 200 status code. 18:40:18.893 [http-nio-8045-exec-7] DEBUG c.s.o.c.m.AtomEntityUnmarshaller - Unmarshalling entity for query: ODataClientQuery[GetDynamicMetaFunctionImport(Url='http%253A%252F%252Flocalhost%253A8045%252Fnl%252Fversion.json',ItemType='BinaryMeta')] 18:40:18.893 [http-nio-8045-exec-7] DEBUG c.s.w.a.d.DynamicMetaRetrieverImpl - Could not find Binary metadata by url: http://localhost:8045/nl/version.json 18:40:18.894 [http-nio-8045-exec-7] ERROR c.s.w.c.i.l.LocalizationFactoryImpl - No published version.json found for localization [297] /nl com.sdl.webapp.common.api.content.StaticContentNotFoundException: No binary meta found for pubId: [297] and urlPath: http://localhost:8045/nl/version.json at com.sdl.dxa.tridion.content.CilStaticContentResolver.getBinaryMeta(CilStaticContentResolver.java:120) at com.sdl.dxa.tridion.content.CilStaticContentResolver.createStaticContentItem(CilStaticContentResolver.java:67) at com.sdl.dxa.tridion.content.GenericStaticContentResolver.getStaticContentFileByPath(GenericStaticContentResolver.java:76) at com.sdl.dxa.tridion.content.GenericStaticContentResolver.getStaticContent(GenericStaticContentResolver.java:42) at com.sdl.dxa.tridion.mapping.impl.DefaultContentProvider.getStaticContent(DefaultContentProvider.java:226) at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.loadVersionFromBroker(LocalizationFactoryImpl.java:170)

Update: Now that Velu has pointed me in the right direction, the question is not so much how can I make sure version.json is there, but how do I make sure I don't need it.

2

Version.json value managed in the CMS in the "HTML Design Configuration" component in this path 100 Master\Building Blocks\Settings\Core\Site Manager

And this component is used in Publish HTML Design page and got published to DXD using this TBB Publish HTML Design.

enter image description here

Note:

For Java: please note that when not publishing the HTML design you can provide the version number in dxa.properties by adding a dxa.assets.version property

Updated: For .NET:

  • It may be that the version JSON file is 'unmanaged', ie just placed on the filesystem manually

  • In which case we try to load it directly - the HTML Design is thus not published from CMS

[AppDomain.CurrentDomain.BaseDirectory]/system/assets\version.json

  • HTML design is not published nor does the file exist on disk. Setting version to v0.0

I hope it helps

| improve this answer | |
  • Thanks Velu. You sent me in the right direction. My app does not use the HTML design, so actually I was probably asking the wrong question. If you update your answer to note that when not publishing the HTML design you can provide the version number in dxa.properties by adding a dxa.assets.version property, I will accept your answer. – Dominic Cronin Aug 5 at 8:42
  • Updated @DominicCronin :-) – Velmurugan Aug 5 at 9:49
  • "please note that when not publishing the HTML design you can provide the version number in dxa.properties by adding a dxa.assets.version property" How do you set the version in .NET DXA? – Atila Sos Aug 6 at 11:48
  • Probably in the web.config – Dominic Cronin Aug 14 at 16:58
  • Updated @AtilaSos and Dominic for .NET DXA, Here is the code reference github.com/sdl/dxa-web-application-dotnet/blob/… – Velmurugan Aug 14 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.