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

TypeError in Website Settings if no language provided #5998

Open
NiklasBr opened this issue Mar 6, 2020 · 4 comments
Open

TypeError in Website Settings if no language provided #5998

NiklasBr opened this issue Mar 6, 2020 · 4 comments

Comments

@NiklasBr
Copy link
Contributor

@NiklasBr NiklasBr commented Mar 6, 2020

Bug Report

Key collisions in Website Settings cause silent errors and the admin interface must be reloaded.

Expected behavior

Similar to Properties on objects, if the same setting is added a second time with the first setting missing a Language, the admin interface should prevent this. Or just allow it without the "hidden" JS error.

Actual behavior

The entire tab dies and the admin interface must be reloaded.

Steps to reproduce

  1. Open Website Settings
  2. Add a setting, for example key: "testSetting" of type Text
  3. Add a value to the setting.
  4. Add a second new setting with the same key
  5. Add a third new setting with the same key
  6. Set a Language to the first setting
  7. Try to set a Language to the second setting.

(You can also try this with the JS console open to see the ExtJS error: TypeError: k.el is null)

@weisswurstkanone

This comment has been minimized.

Copy link
Collaborator

@weisswurstkanone weisswurstkanone commented Mar 6, 2020

Unable to reproduce this on demo.pimcore.fun

@NiklasBr

This comment has been minimized.

Copy link
Contributor Author

@NiklasBr NiklasBr commented Mar 6, 2020

I can't try this on demo.pimcore.fun because the regular user does not have permissions. Please try again with Chrome 80 or Firefox 73, but with these steps to reproduce:

  1. Open the browser JS console
  2. Open the Website Settings
  3. Create three empty text settings with the same key, e.g. "testSetting"
  4. Set the first one to any language,
  5. Set the Value of that setting to any string
  6. Press tab to move focus away.

The error should show up again.

@dvesh3

This comment has been minimized.

Copy link
Contributor

@dvesh3 dvesh3 commented Mar 6, 2020

@NiklasBr can you please try on demo instance? it should be possible to create web settings https://demo.pimcore.fun/admin/?perspective=default we are not able to reproduce it.

@NiklasBr

This comment has been minimized.

Copy link
Contributor Author

@NiklasBr NiklasBr commented Mar 6, 2020

Thanks @dvesh3 I can reproduce two types of errors :

  1. Deleting settings with the same name will throw a delete on null error
  2. The error described above

Screenshot (4)
Screenshot (5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.