サービスポータル:先行入力検索で英語以外の言語でエラーがスローされる:null をオブジェクトに変換できません。失敗したウィジェットIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } - システム言語を英語以外の言語に切り替えます。 (例:ドイツ語) - サービスポータルに移動し、先行入力検索ウィジェットでキーワードを検索します。 例: https://instancename.service-now.com/sp?id=search&q=mobile エラー: Server JavaScript error Cannot convert null to an object.Line number 94Script source code logged to browser consoleFailing widget: 'Typeahead Search' (fa20ec02cb31020000f8d856634c9ce9) または Server JavaScript error Cannot convert null to an object.Line number 69Script source code logged to browser consoleFailing widget: 'Search Page' (b8c57073cb10020000f8d856634c9cfc) Symptoms<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } システムログで、次のようなエラーがないか確認してください。 org.mozilla.javascript.EcmaError: null をオブジェクトに変換できません。46 行目の のエラーが原因で発生 43: while(m2mSearchSourceGR.next()) {44: var searchSourceGR = m2mSearchSourceGR.getElement("sp_search_source").getRefRecord();45: data.resultTemplates["sp-search-source-" + searchSourceGR.getValue("id") + ".html"] = $sp.translateTemplate(searchSourceGR.getValue("search_page_template"));==> 46: getResults(searchSourceGR);47: }48: }49: java.lang.NullPointerExceptionCaused by error in sp_search_source.c96eb1686721220023c82e08f585efff.data_fetch_script at line 16com.glide.catalog.cache.impl.DefaultTranslationProvider.getFieldTranslationsFromSysTranslated(DefaultTranslationProvider.java:231)com.glide.catalog.cache.impl.DefaultTranslationProvider.access$300(DefaultTranslationProvider.java:29)com.glide.catalog.cache.impl.DefaultTranslationProvider$FieldTranslationProvider.getTranslations(DefaultTranslationProvider.java:424)com.glide.catalog.cache.impl.DefaultTranslations.getFieldTranslation(DefaultTranslations.java:80)com.glide.catalog.cache.impl.ServiceCatalogI18NCacheableItemAdapter.resolveFieldValue(ServiceCatalogI18NCacheableItemAdapter.java:79)com.glideapp.servicecatalog.Category.getTitle(Category.java:491)com.glideapp.servicecatalog.Category.get(Category.java:137)com.glideapp.servicecatalog.CatalogItem.getFirstAccessibleCategoryForSearch(CatalogItem.java:633)com.glideapp.servicecatalog.scoped.api.CatalogItemJS.jsFunction_getFirstAccessibleCategoryForSearch(CatalogItemJS.java:316)sun.reflect.GeneratedMethodAccessor1567.invoke(Unknown Source) デバッグを有効にし、デバッグログを確認します。 [DefaultTranslationProvider] Loading translations for: table=sc_category, id=d258b953c611227a0146101fb1be7c31, language=en, source=sc_categorySQL04:17:34.776: Time: 0:00:00.000 for: caveriondev_2[glide.17] SELECT ... FROM (sc_category sc_category0 INNER JOIN sys_metadata sys_metadata0 ON sc_category0.`sys_id` = sys_metadata0.`sys_id` ) WHERE sc_category0.`sys_id` = 'd258b953c611227a0146101fb1be7c31' /*...*/ log04:17:34.778: [DefaultTranslationProvider] No db entry for: table=sc_category, id=d258b953c611227a0146101fb1be7c31, language=en, source=sc_categorylog04:17:34.779: Evaluator: java.lang.NullPointerException Caused by error in sp_search_source.c96eb1686721220023c82e08f585efff.data_fetch_script at line 16 com.glide.catalog.cache.impl.DefaultTranslationProvider.getFieldTranslationsFromSysTranslated(DefaultTranslationProvider.java:231) Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } この問題は、カタログアイテムが Null カテゴリを指していることが原因で発生します。 「sc_cat_item」テーブルを開き、フィールド「カテゴリ」でグループ化します。 名前の代わりにカテゴリがsys_idになっているカタログアイテムが表示されている場合は、それを開いてカテゴリの値を確認します。Null を指している場合は、問題の原因です。 https://instancename.service-now.com/nav_to.do?uri=%2Fsc_cat_item_list.do%3Fsysparm_query%3Dcategory.titleISEMPTY%255Ecategory!%253DNULL%255EGROUPBYcategory%26sysparm_first_row%3D1%26sysparm_view%3D 参考までに添付のスクリーンショットを確認してください。 この問題を解決するには、NULL カテゴリを指すカタログアイテムがないことを確認します。