存储在/ content / myapp / uk / en中的无效iso代码:en_uk [英] Invalid iso code stored in /content/myapp/uk/en: en_uk
问题描述
当我从'/ content'打开页面时,我是Adobe CQ的新手。
GET / content / myapp / uk /en.html HTTP / 1.1]
com.day.cq.wcm.core.impl.PageImpl存储在
/ content / myapp / uk / en中的无效iso代码:en_uk
出现在我的日志中,如何解决呢?
我可以通过在 / content / geometrixx / en / jcr:content $ c中添加
jcr:language
属性来重现您的问题$ c>节点,如下图所示,会产生以下错误。
27.01.2017 14:38:46.640 警告 [0:0:0:0:0:0:0:1 [1485549526613] GET /content/geometrixx/zh.html HTTP / 1.1] com.day.cq.wcm.core.impl。 PageImpl存储在/ content / geometrixx / en中的无效iso代码:en_UK
2017年1月27日14:38:48.337 WARN [0:0:0:0:0:0:0:0:1 [1485549528325] GET /etc/clientcontext/default/content/jcr:content/stores.init.js HTTP / 1.1] com.day.cq.wcm.core.impl.Langu ageManagerImpl存储在/ content / geometrixx / en中的无效iso代码:en_UK
您必须使用正确的iso代码,即 en_GB
根据
添加正确的代码后 en_GB
访问页面时,我可以看到正确的日志而没有任何 * WARN *
27.01.2017 14:51:44.312 INFO [0:0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP / 1.1] org.apache.sling.i18n.impl.JcrResourceBundle查找'en_GB'的所有词典(基本名称:...)
27.01.2017 14:51:44.343 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/zh.html HTTP / 1.1] org.apache.sling.i18n.impl.JcrResourceBundle在31毫秒内完成为 en_GB(基本名称:)加载0个条目
27.01.2017 14:51:44.345 INFO [0:0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/zh.html HTTP / 1.1] org.apache.sling.i18n服务[5690,[java.util.ResourceBundle]] ServiceEvent已注册
27.01.2017 14:51:44.345 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP / 1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider当前在所有语言环境中加载的词典:[/ libs / foundation / components / mobilefooter / i18n / en,/ libs / cq / searchpromote / components / pagination / i18n / en ,/ libs / social / subscriptions / components / hbs / subscriptions / i18n / en,/ libs / foundation / components / search / i18n / en,/ libs / social / commons / components / hbs / comments / i18n / en,/ libs / commerce / components / search / i18n / en]
〜希望它会有所帮助
I am new to Adobe CQ, when i am opening a page from '/content'
GET /content/myapp/uk/en.html HTTP/1.1] com.day.cq.wcm.core.impl.PageImpl Invalid iso code stored in /content/myapp/uk/en: en_uk
is appearing in my logs, how to resolve this ?
I can reproduce your issue by adding a jcr:language
property in the /content/geometrixx/en/jcr:content
node as shown in the below image, which produces me the below error.
27.01.2017 14:38:46.640 WARN [0:0:0:0:0:0:0:1 [1485549526613] GET /content/geometrixx/en.html HTTP/1.1] com.day.cq.wcm.core.impl.PageImpl Invalid iso code stored in /content/geometrixx/en: en_UK 27.01.2017 14:38:48.337 WARN [0:0:0:0:0:0:0:1 [1485549528325] GET /etc/clientcontext/default/content/jcr:content/stores.init.js HTTP/1.1] com.day.cq.wcm.core.impl.LanguageManagerImpl Invalid iso code stored in /content/geometrixx/en: en_UK
you have to use the correct iso code i.e. en_GB
as per the standards.
and also have a look at the Page, PageImpl getLanguage()
method for more understanding
After adding the correct code en_GB
i can see proper logs without any *WARN*
when i access the page
27.01.2017 14:51:44.312 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundle Finding all dictionaries for 'en_GB' (basename: ) ... 27.01.2017 14:51:44.343 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundle Finished loading 0 entries for 'en_GB' (basename: ) in 31ms 27.01.2017 14:51:44.345 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP/1.1] org.apache.sling.i18n Service [5690, [java.util.ResourceBundle]] ServiceEvent REGISTERED 27.01.2017 14:51:44.345 INFO [0:0:0:0:0:0:0:1 [1485550304292] GET /content/geometrixx/en.html HTTP/1.1] org.apache.sling.i18n.impl.JcrResourceBundleProvider Currently loaded dictionaries across all locales: [/libs/foundation/components/mobilefooter/i18n/en, /libs/cq/searchpromote/components/pagination/i18n/en, /libs/social/subscriptions/components/hbs/subscriptions/i18n/en, /libs/foundation/components/search/i18n/en, /libs/social/commons/components/hbs/comments/i18n/en, /libs/commerce/components/search/i18n/en]
~Hope it helps
这篇关于存储在/ content / myapp / uk / en中的无效iso代码:en_uk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!