When trying to test your site, I've encountered a critical error and no longer have access. Please share FTP access to the testing site so I can take a look at any changes I made for testing, and get the test site back up and further trouble shoot. I've marked the next reply as private so you can use the private fields to share credentials. Thanks!
I was able to find the wrong translation in WPML -> String Translation for the string "%1$s %2$s iCal Feed" and replaced it with "موجز iCal %2$s %1$s". I then found a new fatal error, coming from the string "%s update available" which I replaced the Arabic translation with تتوفر تحديثات %s.
Now everything seems to be working as expected. Please let me know if you run into any other issues and I'll be happy to take another look.
Good morning,
I've contacted The Events Calendar People and they looked into it. They came back with the following.
--------------------
HI Roger,
Thank you for your message and the information.
Looking into this error at the code level, it looks like the issue is with the string translation (please see explanation below).
The erroring lines of code in the /wp-content/plugins/the-events-calendar/src/Tribe/iCal.php file:
$separator = _x( '»', 'feed link', 'the-events-calendar' );
$feed_title = sprintf( esc_html__( '%1$s %2$s iCal Feed', 'the-events-calendar' ), get_bloginfo( 'name' ), $separator );
The above code is correct in both syntax and functionality. The hidden culprit is translations. — The issue lies in this function: esc_html__( ... ). This function tells WordPress: "Look up the translation for this sentence in the site's current language."
The Scenario: The code executes sprintf( esc_html__( '%1$s ...' ) ) . This is the website asking: "Hey WPML, what is the Arabic version of this sentence?".
The Lookup: WPML looks into its database (String Translation) or the .mo file to find the match.
The Return (The Bug): WPML finds the translation, but the translator made a typo. Instead of returning a sentence with a valid "slot" for the variable (%1$s ), it returns a sentence with a broken slot (%$s ).
The Crash: The code passes that broken sentence from WPML into the PHP sprintf function. PHP 8 panics because %$ is invalid syntax, and the site crashes.
Since you are using WPML, the following may help:
Go to WPML > String Translation.
In the search bar, search for: iCal Feed .
Look for the string that matches: %1$s %2$s iCal Feed .
Click translations (the pencil icon) for your active language.
You will likely see the typo in the translation box (e.g., %$s or % s ).
Correct it: Copy the English placeholder exactly: %1$s .
Save.
I would also recommend downloading the latest stable Arabic translation file at hidden link. See Downloading and using the language files for The Events Calendar or Event Tickets for more information.
I tried all of the proposals above but it didn't work. I replied to The Events Calandar that the iCal files were different for all the languages.
The Event Calandar replied that i had to change all of them for the same one.
Eng — %1$s %2$s iCal Feed
Tur — %1$s %2$s iCal Beslemesi
Pol — %1$s %2$s iCal Feed
Arab — %1$s %2$s موجز iCal
And guess what it worked! Arabic no longer gives an error.
Excellent, looks like we were all looking at a similar solution and I'm happy to hear it's working now! Please don't hesitate to open up a new ticket if you run into any further issues. Have a great rest of your day!