Home Forums Event Espresso Premium Undefined constant "RDC" when using [ESPRESSO_MY_EVENTS]

Undefined constant "RDC" when using [ESPRESSO_MY_EVENTS]

Posted: March 8, 2023 at 4:07 pm

richard sandilands

March 8, 2023 at 4:07 pm

We’re getting a critical error on a page using the [ESPRESSO_MY_EVENTS] shortcode.

We have Version 2.0.19.p Event Espresso WP Users (EE4.6+) installed.

Undefined constant "RDC" Backtrace from Exception
In /www/bookingsbyroncliniccomgc_570/public/wp-content/uploads/espresso/templates/status-legend-espresso_my_events.template.php [line 10]:

richard sandilands

March 8, 2023 at 4:09 pm

Closing this as I realised this is an error in a template of mine.


  • Support Staff

March 9, 2023 at 3:41 am

Hi there,

Whilst I know you already figured this out I just wanted to give you a little heads-up on your template location.

With EE3 we used /wp-content/uploads/espresso/templates/ for a lot of template file overrides and from that, we found some security plugins will go nuts if they find .php files in /uploads/*. What’s worse is some of them delete the files which isn’t great, but others will blank the file out and leave it in place which then causes fatals or just empty outputs.

So with EE4 we will check within the themes root directory (child theme first if using one as expected, then parent) for any template files, as themes are expected to hold .PHP files we haven’t had any repeats of the above when loading from that location. We obviously still check the above location otherwise your templates wouldn’t be working but I’d advise moving them into a child theme if possible.

We also have the template paths filtered using FHEE__EEH_Template__locate_template__template_folder_paths so if you wanted to load them from say {theme_root}/espresso/ you can add that to the beginning of the folder paths array.

Anyway, I just notice the above when reviewing your thread so thought I’d bring it up just incase.

richard sandilands

March 9, 2023 at 1:11 pm

Hi Tony

Thanks for taking the time to point that out. I’ll make a point of revising our custom templates and their location.

The support post ‘Undefined constant "RDC" when using [ESPRESSO_MY_EVENTS]’ 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