問題
サイトテンプレートに基づいてサイトを作成し、作成したサイトのデフォルトのローカライズ設定を変更し、利用可能なロケールから削除した場合、サイトテンプレートへの変更はサイトには伝わりません。
リプロダクトステップ:
- コントロールパネル → システム設定 → インフラストラクチャ → サイト設定構成で、「テンプレート伝播のあるサイトでカスタム言語設定を有効にする」にチェックを入れ、保存します。
- コントロールパネル → サイトテンプレートからダミーサイトテンプレートを作成する。('Dummy site template')
- コントロールパネル → サイトで、「ダミーサイトテンプレート」を元に新規作成します。 ('ダミーサイト')
- サイト設定」ページ → 「ローカライズ」で、「このサイトのカスタムデフォルト言語と追加利用可能言語を定義する」オプションを有効にします。
- デフォルトの言語として「英語(米国)」を、現在の言語として「英語(米国)」と「フィンランド(フィンランド)」を残しておきます。 保存.
- ダミーサイトテンプレート」に、デフォルト値で新しいウィジェットページを追加します。 ('Dummy page')
- ダミーサイト」のトップページを開く。
結果: の変更は伝搬されず、ERROR が投げられる:
2023-02-20 12:37:10.972 ERROR [liferay/background_task-4][LayoutSetPrototypeImportBackgroundTaskExecutor:166] Merge fail count increased to 1 for layout set prototype 44335
com.liferay.portal.kernel.exception.LocaleException: null
at com.liferay.exportimport.internal.controller.LayoutImportController.validateFile(LayoutImportController.java:655) ~[?:?]
at com.liferay.exportimport.internal.controller.LayoutImportController.importDataDeletions(LayoutImportController.java:158) ~[?:?]
at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayoutsDataDeletions(ExportImportLocalServiceImpl.java:266) ~[portal-impl.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
at com.sun.proxy.$Proxy125.importLayoutsDataDeletions(Unknown Source) ~[?:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutSetPrototypeImportBackgroundTaskExecutor.java:280) ~[?:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutSetPrototypeImportBackgroundTaskExecutor.java:266) ~[?:?]
at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37) ~[portal-impl.jar:?]
at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39) ~[portal-impl.jar:?]
at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28) ~[portal-kernel.jar:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor.execute(LayoutSetPrototypeImportBackgroundTaskExecutor.java:130) [bundleFile:?]
at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:63) [bundleFile:?]
at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41) [portal-kernel.jar:?]
at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72) [bundleFile:?]
at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:120) [bundleFile:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) [portal-kernel.jar:?]
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2023-02-20 12:37:11.040 ERROR [liferay/background_task-4][BackgroundTaskMessageListener:167] Unable to execute background task
com.liferay.portal.kernel.exception.LocaleException: null
at com.liferay.exportimport.internal.controller.LayoutImportController.validateFile(LayoutImportController.java:655) ~[?:?]
at com.liferay.exportimport.internal.controller.LayoutImportController.importDataDeletions(LayoutImportController.java:158) ~[?:?]
at com.liferay.portlet.exportimport.service.impl.ExportImportLocalServiceImpl.importLayoutsDataDeletions(ExportImportLocalServiceImpl.java:266) ~[portal-impl.jar:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50) ~[portal-impl.jar:?]
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:69) ~[portal-impl.jar:?]
at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:57) ~[portal-impl.jar:?]
at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49) ~[portal-impl.jar:?]
at com.sun.proxy.$Proxy125.importLayoutsDataDeletions(Unknown Source) ~[?:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutSetPrototypeImportBackgroundTaskExecutor.java:280) ~[?:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor$LayoutImportCallable.call(LayoutSetPrototypeImportBackgroundTaskExecutor.java:266) ~[?:?]
at com.liferay.portal.spring.transaction.BaseTransactionExecutor.execute(BaseTransactionExecutor.java:37) ~[portal-impl.jar:?]
at com.liferay.portal.spring.transaction.TransactionInvokerImpl.invoke(TransactionInvokerImpl.java:39) ~[portal-impl.jar:?]
at com.liferay.portal.kernel.transaction.TransactionInvokerUtil.invoke(TransactionInvokerUtil.java:28) ~[portal-kernel.jar:?]
at com.liferay.exportimport.internal.background.task.LayoutSetPrototypeImportBackgroundTaskExecutor.execute(LayoutSetPrototypeImportBackgroundTaskExecutor.java:130) ~[?:?]
at com.liferay.portal.background.task.internal.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:63) ~[?:?]
at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:41) ~[portal-kernel.jar:?]
at com.liferay.portal.background.task.internal.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:72) ~[bundleFile:?]
at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:120) [bundleFile:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.doReceive(BaseMessageListener.java:48) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:34) [portal-kernel.jar:?]
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) [portal-kernel.jar:?]
at com.liferay.portal.messaging.internal.ParallelDestination$1.run(ParallelDestination.java:56) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Environment
- Liferay DXP 7.4
解決策
- Enable custom language settings for sites with template propagation" 設定の制限です:システムレベルと比較して、サイトレベルでロケールを減らすことはできないはずです。
- Siteレベルのロケールリストは、拡張のみ可能であること。
追加情報
- サイトテンプレートからサイトを作成した場合、サイトレベルでロケールを減らす可能性を無効にする機能要求のチケットが提起されています: LPS-179885