- ステータス
- 解決済み
- 報告対象
- WPML Multilingual CMS 4.6.2
- 関連するプラグイン/テーマ
- The Events Calendar
- トピックタグ
- Compatibility
問題の概要
PHP8+およびThe Events Calendarを使用している場合、翻訳されたイベントとそのアーカイブページに致命的なエラーが表示されます:
PHP Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in …/wp-content/plugins/sitepress-multilingual-cms/classes/url-handling/converter/class-wpml-url-cached-converter.php:46
回避策
作業を進める前に、サイトの完全なバックアップを作成してください。
- …/wp-content/plugins/the-events-calendar/src/Tribe/Integrations/WPML/Views/V2/Filters.phpファイルを開きます。
- 188行目を探します。
- 次を:
$event->permalink = apply_filters( 'wpml_permalink', $event->permalink );
以下に置き換えます:// WPML Workaround for compsupp-6706 $event_permalink = $event->permalink; if ( is_object($event_permalink) ) { $event_permalink = (string)$event_permalink; } $event->permalink = apply_filters( 'wpml_permalink', $event_permalink );