Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the new configuration type is properties, the save fails #3433

Closed
ai-vip opened this issue Jul 24, 2020 · 13 comments
Closed

When the new configuration type is properties, the save fails #3433

ai-vip opened this issue Jul 24, 2020 · 13 comments
Labels
status/duplicate This issue or pull request already exists

Comments

@ai-vip
Copy link

ai-vip commented Jul 24, 2020

Issue Description

Type: bug

Describe what happened (or what feature you want)

When the new configuration type is properties, the save fails
新建配置的类型 为 properties 时,保存失败

console output:
main.js:285 Uncaught TypeError: Cannot read property 'currentLanguageCode' of undefined at main.js:285 at main.js:317 at Array.<anonymous> (main.js:317) at main.js:317 at r (main.js:14) at e (main.js:14) at a (main.js:317) at n.value (main.js:285) at main.js:317 at e (main.js:14)

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

version1.3.1
windows 10

Anything else we need to know?

When the configuration type is other, it can be saved successfully
配置类型为其它时,可以保存成功

@KomachiSion
Copy link
Collaborator

I tried in 1.3.1 demo console, properties can be published.

@KomachiSion
Copy link
Collaborator

I guess your first line is a comment. If so , the issue is duplicated with #3103.

@KomachiSion KomachiSion added the status/duplicate This issue or pull request already exists label Jul 24, 2020
@ai-vip
Copy link
Author

ai-vip commented Jul 24, 2020

I tried again and found that it cannot be saved if the value is empty
``
logging.level.root=

logging.level.org.mybatis=DEBUG
``

@KomachiSion KomachiSion added kind/bug Category issues or prs related to bug. contribution welcome area/Nacos console Related to Nacos consle and removed status/duplicate This issue or pull request already exists labels Jul 24, 2020
@yanjunnf
Copy link
Contributor

Seems like your configurations content syanx is wrong. The synax of properties format should be key=value
I checked the react js code, found below:
if (validateContent.validate({ content, type: configType })) {
this.publicConfigBeforeCheck(content);
} else {
Dialog.confirm({
content: locale.confirmSyanx,
language: aliwareIntl.currentLanguageCode || 'zh-cn',
onOk: () => {
this.publicConfigBeforeCheck(content);
},
});
}

@zongtanghu
Copy link
Collaborator

Can you help to resolve this issue? @wangwei

@ljhrot
Copy link
Contributor

ljhrot commented Jul 28, 2020

@zongtanghu 这个 ISSUES 跟 #3103 重复,都是 validateContent.validate({ content, type: configType }) 校验 Properties 配置内容失败,然后进入 else 判断,也就是下面这块逻辑

Dialog.confirm({
  content: locale.confirmSyanx,
  language: aliwareIntl.currentLanguageCode || 'zh-cn',
  onOk: () => {
    this.publicConfigBeforeCheck(content);
  },
});

同时 aliwareIntl.currentLanguageCode 这个属性是不存在的,也就是上面前端的报错信息。

@yanjunnf
Copy link
Contributor

问一下,咱们这边有React环境配置和编译步骤吗?

@zongtanghu
Copy link
Collaborator

@ljhrot 你可以提一个pr来修复下这个前端问题吗?

@ljhrot
Copy link
Contributor

ljhrot commented Jul 28, 2020

@ljhrot 你可以提一个pr来修复下这个前端问题吗?

@zongtanghu 我给 #3103 提个 PR,也会修复这个的

@ljhrot
Copy link
Contributor

ljhrot commented Jul 28, 2020

问一下,咱们这边有React环境配置和编译步骤吗?

@yanjunnf 你可以看看这个 README

@yanjunnf
Copy link
Contributor

问一下,咱们这边有React环境配置和编译步骤吗?

@yanjunnf 你可以看看这个 README

看到了,多谢。

@guanshaochi
Copy link

1.3.0发现这个问题,更新1.3.1问题依旧,暂时是通过发布为其他类型配置文件再编辑修改为properties类型去规避的

@KomachiSion
Copy link
Collaborator

@zongtanghu 这个 ISSUES 跟 #3103 重复,都是 validateContent.validate({ content, type: configType }) 校验 Properties 配置内容失败,然后进入 else 判断,也就是下面这块逻辑

Dialog.confirm({
  content: locale.confirmSyanx,
  language: aliwareIntl.currentLanguageCode || 'zh-cn',
  onOk: () => {
    this.publicConfigBeforeCheck(content);
  },
});

同时 aliwareIntl.currentLanguageCode 这个属性是不存在的,也就是上面前端的报错信息。

duplicate with #3103

@KomachiSion KomachiSion added status/duplicate This issue or pull request already exists and removed area/Nacos console Related to Nacos consle contribution welcome kind/bug Category issues or prs related to bug. labels Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants