Liferay StructureNameException:具有资源导入器的区域设置的名称为null
当我尝试使用资源导入器导入页面布局时,我遇到了以下问题:无法加载文章,无法创建页面,并且出现以下日志错误:Liferay StructureNameException:具有资源导入器的区域设置的名称为null,liferay,liferay-theme,liferay-7,Liferay,Liferay Theme,Liferay 7,当我尝试使用资源导入器导入页面布局时,我遇到了以下问题:无法加载文章,无法创建页面,并且出现以下日志错误: 09:13:33,693 ERROR [liferay/hot_deploy-1][SerialDestination:61] Unable to process message {destinationName=liferay/hot_deploy, response=null, responseDestinationName=null, responseId=null, payload
09:13:33,693 ERROR [liferay/hot_deploy-1][SerialDestination:61] Unable to process message {destinationName=liferay/hot_deploy, response=null, responseDestinationName=null, responseId=null, payload=null, values={companyId=0, groupId=0, command=deploy, servletContextName=theme-galian}} com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.dynamic.data.mapping.exception.StructureNameException: Name is null for locale français (France)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:58)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
at java.lang.Thread.run(Thread.java:748) Caused by: com.liferay.dynamic.data.mapping.exception.StructureNameException: Name is null for locale français (France)
at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl.validate(DDMStructureLocalServiceImpl.java:1828)
at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl.validate(DDMStructureLocalServiceImpl.java:1791)
at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl.doUpdateStructure(DDMStructureLocalServiceImpl.java:1535)
at com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl.updateStructure(DDMStructureLocalServiceImpl.java:1315)
在portal-ext.proerties文件中正确设置了区域设置:
locales=fr_FR
对于结构,我使用FR_FR作为默认语言定义结构:
{
"availableLanguageIds": [
"fr_FR",
"en_US"
],
"defaultLanguageId": "fr_FR",
"fields": [
{
"label": {
"fr_FR": "Texte",
"en_US": "Texte"
.
.
.
.
.
.
我知道有一个bug,但从7.0.0 Alpha 5版本开始就解决了
我正在使用Liferay 7.0 GA3 CE。
你知道这个问题吗?感谢要修复此错误,您必须按如下方式添加此属性 system-ext.properties
user.country=FR
user.language=fr
并将此属性添加到portal-ext.properties:
##Locales
locales=fr_FR
#
# Specify the locales that are enabled by default
#
locales.enabled=fr_FR
#
# This sets the default locale of the portal, overriding the properties
# "user.language" and "user.country" specified in system.properties.
#
company.default.locale=fr_FR
locale.default.request=false
要修复此错误,必须按如下方式添加此属性 system-ext.properties
user.country=FR
user.language=fr
并将此属性添加到portal-ext.properties:
##Locales
locales=fr_FR
#
# Specify the locales that are enabled by default
#
locales.enabled=fr_FR
#
# This sets the default locale of the portal, overriding the properties
# "user.language" and "user.country" specified in system.properties.
#
company.default.locale=fr_FR
locale.default.request=false
由于GA4现在已经发布,您是否介意验证它是否也发生在GA4上?找到一个固定的bug是浪费时间。另外,当您使用7.0时,为什么要标记liferay-6?我使用的是liferay 6标记,因为使用资源导入器从liferay 6到liferay 7没有变化。因此,本主题也适用于Liferay 6。由于GA4现在已经推出,您是否介意验证它是否也发生在GA4上?找到一个固定的bug是浪费时间。另外,当您使用7.0时,为什么要标记liferay-6?我使用的是liferay 6标记,因为使用资源导入器从liferay 6到liferay 7没有变化。因此,本主题也适用于Liferay 6。