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

SharePoint term store crashes if pageContext has no cultureinfo #1226

Closed
DennisKuhn opened this issue May 30, 2022 · 5 comments · Fixed by #1262
Closed

SharePoint term store crashes if pageContext has no cultureinfo #1226

DennisKuhn opened this issue May 30, 2022 · 5 comments · Fixed by #1262
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Milestone

Comments

@DennisKuhn
Copy link
Contributor

Category

[ ] Enhancement

[x] Bug

[ ] Question

Version

Please specify what version of the library you are using: 3.8.0

Expected / Desired Behavior / Question

Search for a term even if the page has no culture info set.

Observed Behavior

An uncaught exception is thrown:

SPTermStorePickerService.js:471 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'currentUICultureName')
    at SPTermStorePickerService.js:471:50
       (anonymous) @ SPTermStorePickerService.js:471
       Promise.then (async)
       (anonymous) @ SPTermStorePickerService.js:451
       Wt+Y.SPTermStorePickerService.searchTermsByTermSet @ SPTermStorePickerService.js:450
       Wt+Y.SPTermStorePickerService.searchTermsByName @ SPTermStorePickerService.js:322
       (anonymous) @ TermPicker.js:133
       step @ TermPicker.js:45
       (anonymous) @ TermPicker.js:26
       (anonymous) @ TermPicker.js:20
       b7hz.__awaiter @ TermPicker.js:16
       b7hz.TermPicker.onFilterChanged @ TermPicker.js:126
       BasePicker._this._onResolveSuggestions @ BasePicker.js:352
       invokeFunction @ Async.js:310
       callback @ Async.js:335
       resultFunction @ Async.js:364
       kSRW.BasePicker.updateValue @ BasePicker.js:594
       BasePicker._this.onInputChange @ BasePicker.js:77
       9Ow0.Autofill._notifyInputChange @ Autofill.js:267
       (anonymous) @ Autofill.js:109
       pr @ sp-pages-assembly_en-nz_8d7827d88cb39cb2a4596efd3d5f4ef4.js:69

Steps to Reproduce

Use the term picker and search for a term on site without culture info.

@ghost
Copy link

ghost commented May 30, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@DennisKuhn
Copy link
Contributor Author

submit pull request #1227

@DennisKuhn
Copy link
Contributor Author

Hello, I have noticed the missing currentUICultureName is caused by me when creating an isolated sp context. Sorry for the hassle.

@joelfmrodrigues
Copy link
Collaborator

@DennisKuhn I have just merged your PR. I assume it's still a valid change as it's only checking that the property is valid?

@joelfmrodrigues joelfmrodrigues added this to the 3.9.0 milestone Jun 3, 2022
@joelfmrodrigues joelfmrodrigues added status:fixed-next-drop Issue will be fixed in upcoming release. and removed Needs: Triage 🔍 labels Jun 3, 2022
@DennisKuhn
Copy link
Contributor Author

@joelfmrodrigues yes I think so too. It may avoid similar (user) problems in the future ;-)

@AJIXuMuK AJIXuMuK mentioned this issue Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants