when no context path was detected the add & save buttons should be always disabled.
saving will utterly fail in this case.
perhaps a message should be displayed "No context path detected." instead of the "Context path:".
the "contextPath" property is missing altogether in this case.
steps to reproduce with the sample application:
remove the property sling:configRef from /content/contextaware-config-sample/en/jcr:content
open http://localhost:4502/content/contextaware-config-sample/en/config.html
the correct impl in the branch does not yet handle this (same behavior as before).
steps to reproduce with the sample application:
remove the property sling:configRef from /content/contextaware-config-sample/en/jcr:content
open http://localhost:4502/content/contextaware-config-sample/en/config.html
After doing these steps, http://localhost:4502/content/contextaware-config-sample/en/config/_jcr_content.configNames.json is still requested, and includes "contextPath":"/content/contextaware-config-sample/en/config" in its response.
Is this expected?
should work - if you removed the property in CRXDE Lite, did you hit the "Save All" button after removing the property?
should work - if you removed the property in CRXDE Lite, did you hit the "Save All" button after removing the property?
I tested again and it does work (i.e. the json does not return a contextPath)
and the implementation from 01/Jun/17 works as expected.
I have merged to develop https://github.com/wcm-io/wcm-io-caconfig/commit/f449c4ad9edb9d51e1dcaba1d65c88c23020f35b
Let me know if it is (still) not working for you.
it works - thanks!
(i've also added an entry to the changelog - changes.xml)