WPML
Trạng thái
Đã giải quyết
Được báo cáo cho
WPML Multilingual CMS 4.6.2
Plugin/giao diện liên quan
The Events Calendar
Thẻ chủ đề
Compatibility

Tổng quan về lỗi

Nếu bạn đang chạy PHP8+ và The Events Calendar, bạn sẽ thấy một lỗi nghiêm trọng trên các sự kiện đã dịch và trang lưu trữ của chúng:

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

Giải pháp tạm thời

Vui lòng tạo một bản sao lưu đầy đủ cho trang web của bạn trước khi tiếp tục.


  1. Mở tệp …/wp-content/plugins/the-events-calendar/src/Tribe/Integrations/WPML/Views/V2/Filters.php.

  2. Tìm dòng 188.

  3. Thay thế:
    $event->permalink = apply_filters( 'wpml_permalink', $event->permalink );

    Bằng:
    // 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  );

Tất cả các lỗi đã ghi nhận →