StructureNameException:对于具有资源导入器的语言环境,名称为空

StructureNameException: Name is null for locale with resources-importer

当我尝试使用资源导入器导入页面布局时,我遇到了这个问题:文章无法加载,页面无法创建,我有这个日志错误:

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.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"
.
.
.
.
.
.

我知道有一个错误 https://issues.liferay.com/browse/LPS-60939 但自 7.0.0 Alpha 5 版本以来已解决。

我正在使用 Liferay 7.0 GA3 CE。

你对这个问题有什么想法吗?谢谢

要修复此错误,您必须按如下方式添加此属性 系统-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