Support

Home Forums Event Espresso Premium E_ERROR on line 80 EE_Event_Shortcodes.lib

E_ERROR on line 80 EE_Event_Shortcodes.lib

Posted: July 12, 2023 at 12:00 pm

Viewing 13 reply threads


Evasionautoecole

July 12, 2023 at 12:00 pm

Hi,

Clients have an error at the end of the registration done on https://mon-permis.info/inscriptions-aux-cours-en-ligne/
(sorry for my bad English)

They do not receive confirmation and it is not possible to access to see the invoice file (PDF). If I try to access to the invoice from the administration, the same error appears.

Thank you in advance for your help.

WordPress version 6.2.2
Thème actif : Divi (version 4.21.0)
Extension actuelle : Event Espresso (version 5.0.7.p)
PHP version 8.0.29

Détails de l’erreur
======================
Une erreur de type E_ERROR a été causée dans la ligne 80 du fichier /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Event_Shortcodes.lib.php. Message d’erreur : Uncaught ValueError: Unknown format specifier “a” in /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Event_Shortcodes.lib.php:80
Stack trace:
#0 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Event_Shortcodes.lib.php(80): sprintf(‘Ceci analysera …’, ”, ”)
#1 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Shortcodes.lib.php(120): EE_Event_Shortcodes->_init_props()
#2 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Event_Shortcodes.lib.php(30): EE_Shortcodes->__construct()
#3 [internal function]: EE_Event_Shortcodes->__construct()
#4 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/validators/EE_Messages_Validator.core.php(234): ReflectionClass->newInstance()
#5 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/messages/validators/EE_Messages_Validator.core.php(131): EE_Messages_Validator->_set_validators()
#6 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/caffeinated/core/libraries/messages/message_type/newsletter/EE_Messages_Email_Newsletter_Validator.class.php(27): EE_Messages_Validator->__construct(Array, ‘attendee’)
#7 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_MSG_Template.helper.php(261): EE_Messages_Email_Newsletter_Validator->__construct(Array, ‘attendee’)
#8 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/caffeinated/admin/extend/registrations/Extend_Registrations_Admin_Page.core.php(443): EEH_MSG_Template::get_shortcodes(‘newsletter’, Object(EE_Email_messenger), Array, ‘attendee’, false)
#9 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-includes/class-wp-hook.php(308): Extend_Registrations_Admin_Page->newsletter_send_form_skeleton(”)
#10 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
#11 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#12 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-admin/admin-footer.php(78): do_action(‘admin_footer’, ”)
#13 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-admin/admin.php(297): require_once(‘/home/httpd/vho…’)
#14 {main}
thrown


Tony

  • Support Staff

July 12, 2023 at 3:23 pm

Hi there,

Do you have a custom translation file within /wp-content/uploads/espresso/?


Evasionautoecole

July 13, 2023 at 12:21 pm

Hi Tony,

Yes, I see 2 files event_espresso-fr_FR.mo and event_espresso-fr_FR.po

The website is 100% in French so I did translations when I did the instalation (in June 2020).

Did you need the po file?


Tony

  • Support Staff

July 14, 2023 at 7:57 am

Hi there,

So the issue is due to missing values in your translated placeholders. PHP7 and below would allow for them but PHP8+ throws a fatal error.

You’ll need to fix your translations to prevent those fatals.

Notce in the fatal for the stack trace it has:

#0 /home/httpd/vhosts/mon-permis.info/httpdocs/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Event_Shortcodes.lib.php(80): sprintf(‘Ceci analysera …’, ”, ”)

So I grabbed your PO file from the site and searched for ‘Ceci analysera’ to find it, there 2 instances and one of them has a missing s after a place holder.

See: https://monosnap.com/file/k13FEFAcQhQktxzIxjrCPxu2Cpsact

%1$s is a placeholder for the function, the s at the end tells the function its a placeholder for a string that has been passed, your translation has:

%1$la taille2$s

So now the function thinks its %1$l and it throws a fatal. Change that to:

%1$sla taille2$s

Then regenerate the MO file.

You may find you have multiples of these and you’ll need to work through them all fixing the placeholders, each one will throw a fatal.


Evasionautoecole

July 15, 2023 at 11:18 am

Hi Tony,

Thank you for this research and explanations.

As my files are vers old I download your new translation project file for EE4 (on https://translate.eventespresso.com/projects).

As error are still there I check quickly and found missing s 🙁

As I do not have account to change on GlotPress I will by Poedit and do this job for my client.

COMMENT: would be a nice idea to add a comment on https://translate.eventespresso.com/projects that French files are not working on PHP7 and above.

Thank you so much for your help.
With my kind regards


Tony

  • Support Staff

July 17, 2023 at 2:39 am

As I do not have account to change on GlotPress I will by Poedit and do this job for my client.

If you can send me the POT file I’ll compare it with the one on GlotPress and get the translations updated.

Or I can create you an account on the translate site if you’d like to use that.

COMMENT: would be a nice idea to add a comment on https://translate.eventespresso.com/projects that French files are not working on PHP7 and above.

Whilst I understand the reasoning behind that, it’s errors within the translations that are causing the fatal errors and as the translations are user/translator submitted. Doing the above would mean we would need to monitor each translation to confirm a fix and remove the notice, otherwise that would then cause more confusion as time goes on.

What we can do is update the translations as they are reported to fix them.


Evasionautoecole

July 17, 2023 at 6:13 am

Hi Tony,

Thank you for your answer and proposition.

I did the new po (and mo) file which I can send you with pleasure (could you please send me your email).

But registration sill do not work 🙁

May I ask you to recheck?

Nice to read you back.
Kind regards


Tony

  • Support Staff

July 17, 2023 at 6:33 am

What happens when you test a registration? I’ve just added one on the site without a problem (it’s under my name you can cancel it if preferred).

If yo have an error being thrown I can investigate from there.

I did the new po (and mo) file which I can send you with pleasure (could you please send me your email).

Sure, support[at]eventespresso.com


Evasionautoecole

July 17, 2023 at 7:14 am

This reply has been marked as private.


Tony

  • Support Staff

July 17, 2023 at 9:02 am

For that error I’m going to need the specific error being thrown on the server.

Can you check the servers error logs around the time you open the Receipt template and see what it shows.

Or… have your webmaster enable WP_DEBUG using this snippet in your wp-config.php file:

https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

Then I can check the errors from me end.


Evasionautoecole

July 17, 2023 at 11:07 am

Hi Tony,

Debug file just sended.

🙂


Tony

  • Support Staff

July 17, 2023 at 3:43 pm

The error is exactly the same error, which means your translation files are not loading.

If you have the same filename for the PO/MO files you sent me, those are incorrect.

event-espresso-fr_FR.* is not correct, the - between event and espresso should be _.

Like this event_espresso-fr_FR.*

The format is:

{text_domain}-{locale}.po/mo so event_espresso-fr_FR.*

Or

event-espresso-4-{locale}.po/mo so event-espresso-4-fr_FR.*


Evasionautoecole

July 18, 2023 at 12:00 pm

🙁
So sorry Tony I do not check files name.
I change it and yet it works fine 🙂

Thanks for your patience


Rio

  • Support Staff

July 18, 2023 at 8:35 pm

Thank you. If you need anything, feel free to send message.

have a wonderful day!

Viewing 13 reply threads

The support post ‘E_ERROR on line 80 EE_Event_Shortcodes.lib’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso