Support

Home Forums Event Espresso Premium Template Customizations

Template Customizations

Posted: February 1, 2013 at 4:59 pm


conrad strabone

February 1, 2013 at 4:59 pm

i cannot create any template overrides in the uploads/espresso/templates folder. my host reset the permissions 5 times, and each time espresso resets them. the only action i can find that mentions permissions is for the admin only, and i cant find anything else on this topic.


Dean

February 2, 2013 at 3:59 am

Hi Conrad,

Event Espresso should not touch the permissions of the folders or files.

What version of event espresso are you using, who is your host and how are you uploading files to the uploads/templates directory?


conrad strabone

February 2, 2013 at 8:22 am

Hi Dean,

Thanks for the reply.

Version: 3.1.29.1.P
Host: WPEngine

I have tried creating the file locally and uploading so I would be the owner. I have tried creating it on the remote server. I have tried copying the file and pasting it to the directory. All to no avail.

The host had it working for about 15 minutes after they reset the permissions, but then it went right back. They can see that the permissions are off, as can i, but every time they change it then it just reverts back. They said something about one of the actions that involve permissions, but I checked and its only admin related. Love everything about the plugin, just need to get this one last thing working.

Thanks!


Dean

February 4, 2013 at 5:34 am

Hi,

I had a look at the code surrounding this, the plugin will create the directories and give them permissions of 755.

What permission does it show on your server? Also are files added there just having their permissions changed and if so what to or are they being deleted?


conrad strabone

February 4, 2013 at 4:26 pm

wp-content/uploads/espresso – the folders here are 755, but i cannot write to them. i cant even get a file in the folder.

there is also a gateway and logs folder in this location.


Seth Shoultes

  • Support Staff

February 4, 2013 at 8:44 pm

Hi Conrad,

I have had this issue on one of my personal servers. I had to get the hosting provider to fix it.


conrad strabone

February 5, 2013 at 4:22 pm

they tried several times and it kept going back. Anything else i can do?

thanks for the help!


Seth Shoultes

  • Support Staff

February 5, 2013 at 4:58 pm

What does your hosting provider say about the issue?


conrad strabone

February 5, 2013 at 5:07 pm

This was their last reply:

I see the issue. It looks like the Event Espresso plugin itself is forcing changes to the permissions of that directory. I set up your staging area and tested it out there, where I deactivated the plugin and the permissions fix worked and stayed in place. What kept happening is whenever we’d change the permissions on the espresso directory, the plugin would keep changing it back. You would need to talk to the developer of the plugin about this or hire a developer since this is outside our scope of support, but just as a cursory look through the files, this looks like where it’s causing the problems: do_action(‘action_hook_espresso_permissions’);

The problem is that I believe it does more than just loading file permissions, so commenting it out would probably have further reaching consequences.


Dean

February 5, 2013 at 11:45 pm

Hi,

I can’t speak for Seth as he knows more about the inner workings of the plugin than I do, but that do action action_hook_espresso_permissions does not refer to file/folder permissions but rather to the two Roles and Permissions add ons.

There is a section for changing the actual file/folder permissions related to the side loading of the language files, I personally can’t see how that would relate, but Seth may know more on it.


Seth Shoultes

  • Support Staff

February 6, 2013 at 6:21 am

Like I said previously, the host needs to fix the problem, same as the host had to fix the problem on my server. What’s happening is the server is becoming the owner of the files. Event Espresso only creates the initial espresso directory in the wp-content/uploads directory and sets the permissions to 755, when it is first installed. As Dean states above, the permissions action only refers to the Roles and Permissions addon, which is purely a WordPress user related function.

If your host is unwilling, or doesn’t know how, to fix the issues, then you may want to find a different hosting provider.

Just curious, who is your hosting provider?


conrad strabone

February 6, 2013 at 5:09 pm

wpengine.

I will see what else I can get them to try.

Thanks!


conrad strabone

February 7, 2013 at 6:10 pm

here ya go:

Actually the plugin itself was telling the espresso directory to be set to 755 for its perms – this was set in the admin.php file. I just stepped outside of scope for just a moment and changed 3 values on that file. These values were modifying permissions. I set those values from 755 to 775 and from 644 to 664. I then ran my own perms script which set that all straight and the plugin should not be reverting the file perms of any of your files or folders again. Please let me know if this issue pops up again. You may want to let the plugin developer know that this is what was causing the issue:

event-espresso/includes/functions/admin.php
292: @ chmod($folder, 0755);
347:function event_espresso_smartCopy($source, $dest, $folderPermission = 0755, $filePermission = 0644) {

When they update the plugin and you update it on your end it is going to revert these values to whatever they have in their code base so they should get this updated on their end.

this fix they did actually fixed the problem, and it has not reverted.


Dean

February 12, 2013 at 12:48 am

Hey Conrad,

Thanks for letting us know about this, we can take it into consideration for future versions so it is hopefully not as conflicting with WP Engine.


Josh

  • Support Staff

February 12, 2013 at 2:23 pm

I’ve created some tickets for this. What we might do as a quick fix is make that function pluggable so it’s a simple override, just plug in the permissions you need for your set up.


conrad strabone

February 13, 2013 at 8:10 pm

Awesome, its been working flawlessly, was able to write the widgets.php file the way i needed it. http://maeverichmond.com – have not had any permission issues since doing the above.

Thanks for all the help guys!


conrad strabone

February 13, 2013 at 8:10 pm

should i mark this resolved?


Dean

February 14, 2013 at 3:08 am

marked as resolved 🙂


Josh

  • Support Staff

August 29, 2013 at 2:10 pm

Starting with Event Espresso 3.1.36 (which will go into beta very soon), there will be some new filters in place to allow the file permissions to be customized. For example, if you are on WPEngine you can add this to your custom functions file:

function adjust_espresso_folder_permissions( $folder_permissions ) {
    return 0775;
}
add_filter( 'espresso_folder_permissions', 'adjust_espresso_folder_permissions' );

function adjust_espresso_file_permissions( $file_permissions ) {
    return 0664;
}
add_filter( 'espresso_file_permissions', 'adjust_espresso_file_permissions' );

The support post ‘Template Customizations’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 6 years, 2 months ago ago

Topic Tags

Tagged: ,

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.