Support

Home Forums Event Espresso Premium Shortcode fatal error

Shortcode fatal error

Posted: June 3, 2016 at 7:28 am


cv

June 3, 2016 at 7:28 am

Hi
Running the latest versions of all plugins

When using the [ESPRESSO_MY_EVENTS] shortcode on our staging server the below error is thrown. It works correctly when run locally with the same WordPress plugins etc so I assume it’s a permissions issue.

The previous threads which suffered similar sounding issues didn’t state any fixes so I am in need of guidance.

Thanks
M

Fatal error: Uncaught exception ‘EE_Error’ with message ‘An attempt to access and/or write to a file on the server could not be completed due to a lack of sufficient credentials.’ in /home/stagingsite/public_html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_File.helper.php:103 Stack trace: #0 /home/stagingsite/public_html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_File.helper.php(414): EEH_File::_get_wp_filesystem(‘/home/stagingsite/…’) #1 /home/stagingsite/public_html/wp-content/plugins/eea-wp-user-integration/EES_Espresso_My_Events.shortcode.php(300): EEH_File::is_readable(‘/home/stagingsite/…’) #2 /home/stagingsite/public_html/wp-content/plugins/eea-wp-user-integration/EES_Espresso_My_Events.shortcode.php(392): EES_Espresso_My_Events->_get_template_info(‘event_section’) #3 /home/stagingsite/public_html/wp-content/plugins/eea-wp-user-integration/EES_Espresso_My_Events.shortcode.php(201): EES_Espresso_My_Events->_get_template_args(Array) #4 /home/stagingsite/public_html/wp-content/plugins/eea-wp-user-integrat in /home/stagingsite/public_html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_File.helper.php on line 103


Lorenzo Orlando Caum

  • Support Staff

June 3, 2016 at 7:38 am

Hello,

Are you experiencing this issue with the latest version of Event Espresso 4?

https://eventespresso.com/wiki/ee4-changelog/

If you recently updated, could you confirm that you did not update by overwriting older files and folders?

If so, try deleting the Event Espresso 4 core folder and then downloading a fresh copy from your account page and installing and activating.


Lorenzo


cv

June 3, 2016 at 7:45 am

Hi Lorenzo

I’m using the latest version and it was a fresh install of the plugin, no overwriting. It was uploaded via Ftp in the usual way I do it.

Regards
M


Lorenzo Orlando Caum

  • Support Staff

June 3, 2016 at 7:48 am

Hello,

Try re-installing a fresh copy of Event Espresso through WordPress plugins via the WordPress dashboard.


Lorenzo


cv

June 3, 2016 at 8:15 am

Hi

I did as you asked but it hasn’t helped and the same error is shown. (I am using the same creds for the FTP as the server uses so the owner is the same anyway).

M


Josh

  • Support Staff

June 3, 2016 at 9:20 am

Does the usual way you do it include the step where you delete the existing EE plugin folder first?


cv

June 3, 2016 at 9:24 am

Hi Josh

Yes, I never overwrite. In this case as I mentioned it was a first install. When I reinstalled earlier at Lorenzo’s request I also deleted the entire EE plugin folder first too.

M


Josh

  • Support Staff

June 3, 2016 at 10:17 am

Is your staging server set up to allow installing plugins on the WP > Plugins > Add New page?


cv

June 3, 2016 at 10:22 am

Yes, thats what I used as per Lorenzo’s request to reinstall. I uploaded the zip and it was correctly installed.


Josh

  • Support Staff

June 3, 2016 at 12:15 pm

This might be a case where the file is not accessible by the www user on your server.

You can work around this by going into the EES_Espresso_My_Events.shortcode.php
file and making an edit to line 300 where it has this:

if ( isset( $template_object_map[$template_slug]['path'] ) && EEH_File::is_readable( EE_WPUSERS_TEMPLATE_PATH . $template_object_map[$template_slug]['path'] ) ) {

You change it to be:

if ( isset( $template_object_map[$template_slug]['path'] ) && is_readable( EE_WPUSERS_TEMPLATE_PATH . $template_object_map[$template_slug]['path'] ) ) {


cv

June 3, 2016 at 2:38 pm

Hi

YES – that did fix it.

I don’t believe we have an unusual config on the server and use Cpanel for the basic account creation. We have never encountered the same error with any other WordPress core or other plugin.

Will this fix make it into the next version of the plugin? Clearly making this change to the core files is not a long term fix.

Thanks
M


Josh

  • Support Staff

June 3, 2016 at 2:49 pm

No it’s not really a fix because it will break existing functionality where you can load in a custom template from another location (like a theme folder).

Your permanent fix would be to make sure that the www user on the server can access the file.

The support post ‘Shortcode fatal error’ 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