• Resolved Bolo1331

    (@crisbrand)


    Hi, while moving the calendar to another client page, I noticed that there is an error in connection with the Polylang PRO plugin.
    It throws these errors (debu.log):

    [23-Aug-2023 17:39:50 UTC] PHP Fatal error:  Uncaught Error: Call to a member function get_month() on null in wp-content/plugins/the-events-calendar/common/src/Tribe/Date_Utils.php:863

    Stack trace:

    #0 /wp-content/plugins/the-events-calendar/common/src/Tribe/Date_Utils.php(745): Tribe__Date_Utils::build_localized_months()

    #1 /wp-content/plugins/the-events-calendar/src/Tribe/Main.php(2419): Tribe__Date_Utils::get_localized_months_full()

    #2 /plugins/polylang-pro/integrations/events-calendar/tec.php(245): Tribe__Events__Main->setup_l10n_strings()

    #3 /wp-includes/class-wp-hook.php(312): PLL_TEC->fix_date_translations()

    #4 /wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()

    #5 /wp-content/plugins/the-events-calendar/common/src/Tribe/Date_Utils.php on line 863

    The site catches a fatal error. Is there any workaround to this problem, for example by changing the code or forcing functions.php to change?

    The problem only occurs when the PRO version is turned on, when turned off everything returns to normal.

    
    	public function fix_date_translations() {
    		$properties = array(
    			'localized_months_full',
    			'localized_months_short',
    			'localized_weekdays',
    			'localized_months',
    		);
    
    		foreach ( $properties as $property ) {
    			$property = new ReflectionProperty( Tribe__Date_Utils::class, $property );
    			$property->setAccessible( true );
    			$property->setValue( array() );
    		}
    
    		TEC::instance()->setup_l10n_strings();
    	}

    Code snippet from 231 to 245 in polylang-pro/integrations/events-calendar tec.php

    • This topic was modified 11 months, 2 weeks ago by Bolo1331.
    • This topic was modified 11 months, 2 weeks ago by Bolo1331.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    This is a known issue which will be fixed in a future release.

    Are you using the “Language is set by the content” ?
    https://polylang.pro/doc/url-modifications/#language-is-set-from-content

    If so, changing to “The language is set from the directory name in pretty permalinks” setting should solve your issue, waiting our fix.

    If you are using Polylang Pro and you need help, please contact us on our helpdesk: https://polylang.pro/support/. We are not allowed to support Premium plugin in this forum.

    • This reply was modified 11 months, 2 weeks ago by Chrystl.
    Plugin Support Abz

    (@abzlevelup)

    Hi @chrystl thanks for chiming in and for the help regarding this issue. 🙇🏻‍♂️

    @crisbrand, it seems like you have an active license and the pro version of Polylang. Feel free to create a new ticket on PolyLang’s helpdesk → https://polylang.pro/support/. Also, for us to follow WordPress Forum Guidelines regarding premium users. 

    Have a great day!

    Plugin Support Darian

    (@d0153)

    Hi @crisbrand

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The Events Calendar conflict Polylang PRO’ is closed to new replies.