ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

dreaded "Unable to save your template as a text file"

August 15, 2009 3:41pm

Subscribe [1]
  • #1 / Aug 15, 2009 3:41pm

    MotoNomad

    32 posts

    I’ve got the dreaded “Unable to save your template as a text file”  error. 

    Can’t save new template files, can’t update old template files.

    This happened after I moved the site over from the staging site to the production site.  Worked fine on staging, fails on production. Both the staging site and production site are on a Mediatemple DV.  Both sites are set up with same configuration. 

    The template_files directory, template group directory and template files are set 777 with equivalent user & groups on staging & production. Changing the user / group to “apache” made no difference.
    4 drwxrwxrwx 2 staginguser psacln template_group
    4 drwxrwxrwx 2 productionuser psacln template_group

    php safe_mode is off on both:
    off | off
    off | off

    php open_basedir is set up equivalent on both:
    /var/www/vhosts/staging.com/httpdocs:/tmp | no value
    /var/www/vhosts/production.com/httpdocs:/tmp | no value

    The EE Basepath to Template File is equivalent on both ***
    /var/www/vhosts/staging.com/httpdocs/template_files/
    /var/www/vhosts/production.com/httpdocs/template_files/

    **** NOTE **** Be very careful editing the “Basepath to template File” value.  My EE system decided to revert to displaying ALL the templates saved in the DB rather than saved files…. resulting in a Live production site showing a mix of old templates from the DB…. I had to scramble to load the template “files” into the DB to get the site back to normalcy…  The site looked like crap for about 15+ min in the middle of launch day….. ******be &%$%& careful! ******

    I tried editing the cp.templates.php file per Robin S.‘s instructions in this thread: http://ellislab.com/forums/viewthread/83163/
    and it resulted in “2”.

    This has halted production on the site. Where should I start looking for a solution? 


    This question may be related to a resolved thread.

  • #2 / Aug 15, 2009 3:59pm

    Greg Aker

    6022 posts

    what are the permissions on your template folder?

  • #3 / Aug 15, 2009 4:03pm

    MotoNomad

    32 posts

    777

  • #4 / Aug 15, 2009 4:11pm

    Greg Aker

    6022 posts

    what about the files in the folder, what are the permissions on those?

  • #5 / Aug 16, 2009 7:23pm

    MotoNomad

    32 posts

    as stated in original post… template_files directory, template group directories, and all subsequent files are set to 777.    What else do I need to be checking besides permissions, safe_mode and opendir_base?

  • #6 / Aug 17, 2009 2:06am

    John Henry Donovan

    12339 posts

    MotoNomad,

    What version and build of EE are you on at the moment?

  • #7 / Aug 18, 2009 8:19pm

    MotoNomad

    32 posts

    I’m On 1.6.8…. Looks like i got it going again. 

    The Edit Template screen must have been cached by the browser or something as it kept giving the error after fixing permissions to relevant files to 777.  Using the ‘Temple Preferences’ to set the “Save Template as File” worked and I’m back in business tweaking the site after a successful site launch.  Close this one out.  Thanks!

  • #8 / Aug 18, 2009 8:25pm

    Greg Aker

    6022 posts

    I’m glad you got it sorted out!  Don’t hesitate to start a new thread if anything else comes up!

    -greg

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases