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.

saving templates as files and syncing

August 08, 2011 6:58pm

Subscribe [3]
  • #1 / Aug 08, 2011 6:58pm

    H Media Webmaster

    119 posts

    I pretty much always save templates as files

    I’ve been a little frustrated with an issue

    When I make an edit to a template file and save it, then visit the page in my browser, EE serves up the database version of the template, not the file (which is newer)

    I am using cacheing for a couple templates, but not the one In question

    am I misunderstanding something or this the expected behavior?

  • #2 / Aug 09, 2011 12:10am

    LMO

    203 posts

    Flying Fish,

    In cases like this its usually a permissions issue. That is where I would start.

  • #3 / Aug 09, 2011 6:42am

    John Henry Donovan

    12339 posts

    Flying Fish,

    What version and build of EE are you using?
    Are you using any add-ons?

    Are you using any other caching of sorts?

    Make sure your template folder has the correct permissions

  • #4 / Aug 09, 2011 10:54am

    H Media Webmaster

    119 posts

    I’m on v2.2.1 - Build: date 20110705

    The only caching I’m using is through template manager, on css and js files mostly.

    I’m using suphp so directory permissions are 755 and files are 644

    I know that the web server has no problem writing and creating templates files, and I’m not getting any errors in cp regarding permissions

  • #5 / Aug 10, 2011 6:07pm

    Kevin Smith

    4784 posts

    How are you setting your path to the template files directory? Just in the CP? The one time I had this happen, it was because I was using a super-customized config.php setting to determine the path.

  • #6 / Aug 10, 2011 6:15pm

    H Media Webmaster

    119 posts

    I don’t know if this qualifies as super-customized, but it is modified so that I can run the site either locally with MAMP or on my host

    // Multi-Server Setup
    // Dynamic paths for cross-server compatibility
    
    // base_url and index_page were commented out below
    
    $protocol                       = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://";
    $base_url                       = $protocol . $_SERVER['HTTP_HOST'];
    $base_path                      = $_SERVER['DOCUMENT_ROOT'];
    $system_folder                  = "system";
    $images_folder                  = "images";
    $images_path                    = $base_path . "/" . $images_folder;
    $images_url                     = $base_url . "/" . $images_folder;
    
    $config['index_page']           = "";
    $config['base_url']             = $base_url . "/";
    $config['site_url']             = $config['base_url'];
    $config['cp_url']               = $config['base_url'] . $system_folder . "/index.php";
    $config['theme_folder_path']    = $base_path . "/themes/";
    $config['theme_folder_url']     = $base_url . "/themes/";
    $config['tmpl_file_basepath']   = $base_path . "/templates/";
    
    $config['emoticon_path']        = $images_url . "/smileys/";
    $config['captcha_path']         = $images_path . "/captchas/";
    $config['captcha_url']          = $images_url . "/captchas/";
    $config['avatar_path']            = $images_path . "/avatars/";
    $config['avatar_url']            = $images_url . "/avatars/";
    $config['photo_path']            = $images_path . "/member_photos/";
    $config['photo_url']            = $images_url . "/member_photos/";
    $config['sig_img_path']         = $images_path . "/signature_attachments/";
    $config['sig_img_url']          = $images_url . "/signature_attachments/";
    $config['prv_msg_upload_path']  = $images_path . "/pm_attachments/";
  • #7 / Aug 11, 2011 3:51pm

    Kevin Smith

    4784 posts

    Yep, that’s the sort of thing I was looking for. Ok, for the time being, comment out the line that begins with $config[‘tmpl_file_basepath’] and set that manually in your CP. This is just for troubleshooting for now.

    When you set the template file path in your CP, does that change the behavior?

  • #8 / Aug 12, 2011 12:52pm

    H Media Webmaster

    119 posts

    ah, indeed it does change the behavior

    it works as it should, using the more recent save template

    is there any way around this so that I can still use my custom config?

  • #9 / Aug 12, 2011 5:21pm

    Kevin Smith

    4784 posts

    Nothing off the top of my head, but you can try playing around with different settings to see what works. We’re not in a position to support custom work config.php setups, but I can move this over to Community Help if you like and see if anyone hanging out there has any suggestions for you. Would that work?

  • #10 / Aug 12, 2011 6:36pm

    H Media Webmaster

    119 posts

    by all means, feel free to put me over there, thanks

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

ExpressionEngine News!

#eecms, #events, #releases