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.

Flat File Template get saved but EE does not render the changes (MSM)

October 02, 2008 7:51am

Subscribe [4]
  • #1 / Oct 02, 2008 7:51am

    elemental

    77 posts

    I am using MSM with three sites on 3 different domains. The sub-domains are hosted in a subfolder of the root:

    htmldocs |
             | images
             | system |
                      | templates_files |
                                        | domain1 | template_groups/templates
                                        | domain2 | template_groups/templates
                                        | domain3 | template_groups/templates
             | themes
             | subdomains |
                          | domain2 |
                                    | index.php, path.php
                          | domain3 |
                                    | index.php, path.php

    The problem is that when I save the template as flat file trough ftp, only the templates saved by domain1 (the first original site) and rendered right with updted code. The flat files for domain2 and domain3 are not. However, once I open them through the EE CP they show the recent code from the flat file and when I hit update the pages are rendered with that updated code.

    Just to be sure all folders are 777 and the paths are correct.

    Any suggestion for troubleshooting this are welcome.
    Thank you

  • #2 / Oct 02, 2008 10:16am

    Robin Sowell

    13255 posts

    Setup looks right, and the fact the cp is opening the correct file is a good sign.  How does the frontend goof up?  Any chance you can link to an example?

    And what build/version are you running?  I’d make sure you’re on the latest version and build- of both EE and MSM.  This rings a vague bell- we want to be sure it isn’t something covered in a build change.

  • #3 / Oct 02, 2008 10:52am

    elemental

    77 posts

    EE 1.6.4 - Build: 20080829 | MSM 1.1 - Build: 20080829

    It does not goof up like errors or something, but the changes submitted via the flat file are not applied. Only when I open the template in the in CP and resubmit from the CP.

    It’s OK for small changes I don’t mind doing it from the CP but I used to code directly to the flat file templates > Save to ftp > refresh the front page > see the result. Now for the 2 additional sites I cannot do it but have to go to CP open the template and resubmit.

    Hopefully I am explaining this more clearer now. :|
    Thanks

  • #4 / Oct 02, 2008 11:16am

    Robin Sowell

    13255 posts

    You’re clear- and up to date.  It’s just weird.  Hm- can you make a change, go to ‘Admin- Utilities- Clear cached data’ and clear all caches.  Does that result in the update showing on the frontend?  And- it’s still working just fine on the initial site- correct?  Just the two add-ons not updating?

  • #5 / Oct 02, 2008 11:27am

    elwed

    151 posts

    Just to chime in, I think I’ve seen something similar on my MSM sites.

  • #6 / Oct 02, 2008 11:44am

    elemental

    77 posts

    1. Cache cleared, still the code from the 2 additional site templates (from flat files) are not that updated
    2. Yes, the initial site templates update directly after saving from ftp no problem

  • #7 / Oct 02, 2008 12:05pm

    Robin Sowell

    13255 posts

    Hm- I found a bug that was fixed back in March- and that was related to templates being saved as textfiles and used in embeds.  No embedding here, I assume?  And should be in the build you’re running anyway, but worth asking.

    This may take me some poking to try and replicate.  Need to do some setup, so hang tight.

  • #8 / Oct 02, 2008 12:23pm

    elemental

    77 posts

    I do in fact use embeds in the templates. But even editing the .header.php that is later embedded in the index page does not get updated directly. It’s same for any template in those sites 2 and 3

  • #9 / Oct 03, 2008 10:16am

    Ryan Irelan

    444 posts

    I know you said you checked permissions, but did you check all the way down the directory tree? Setting permissions on domain1 won’t necessarily set the permissions on subfolders, unless you do it recursively.

    You may have done this, but, in my experience, it’s usually what causes this issue.

    Just my 2 cents.

  • #10 / Oct 03, 2008 10:36am

    elemental

    77 posts

    Ryan, thanks for chiming in,

    yes all the folders and even the flat template files are 777. But I think the problem comes is from the other direction. Not that saving the template in CP does not write to the flat file, but the other way around.

  • #11 / Oct 05, 2008 12:48pm

    Robin Sowell

    13255 posts

    elemental, sorry this one has dragged out so long.  I’m going to escalate this for a closer look.

  • #12 / Oct 05, 2008 3:51pm

    Lisa Wess

    20502 posts

    When you save templates as text files, they won’t update the database unless you actually go to the CP and re-save the template.

    But can I ask you to step back for a moment?  Can you create a plain template and save it as a text file.  Now, edit the text file to make a change - and then visit that template directly in the browser.  Do you see the changes?

    Essentially, I’m trying to isolate where the problem is specifically. =)

  • #13 / Oct 06, 2008 4:43am

    elemental

    77 posts

    Hi Lisa,

    Done as you suggested, and that part is completely OK. Creating, editing templates from the CP works flawlessly.

    Also just tried to create a a new template in the CP > open/edit and check the Save to file > File gets saved and I can access/edit it from FTP.

    And then the old story: Once I edit it as flat file > Save to ftp > visit that template directly in the browser > still the old content. Then I need to open it in the CP and hit update > visit that template directly in the browser > all OK.

    Thanks for your will to solve this mistery

  • #14 / Oct 06, 2008 10:46am

    Robin Sowell

    13255 posts

    I’m not replicating in a really simple test.  About the only difference in file setup is my subdomain folders are on the same level as the themes/etc. folders.  But that shouldn’t make a difference.

    I’m still leaning toward cache.  If you ftp in, make a change.  Make sure it is not reflected on the frontend.  Then- still via ftp- go into system/cache and delete the full contents of cache.

    Any difference?  If not, I may get you to reduction test, as my test was really simple.  But still- it should just work.

  • #15 / Dec 03, 2008 10:00am

    elemental

    77 posts

    ISSUE solved!

    I left this annoying issue on side back in october, but while trying to make the ImageResizer plugin work with MSM it struck me if it;s not the same with these flat file template writing issue, so:

    When creating the template_files folder for additional sites create the group template folder manually and write the 777 writings rights manually. If you let EE create the group template folders automatically it will not be able to read them directly but only after you open them in CP and update.

    In less words: recreate the Template Groups as folder MANUALLY and assign writing rights before you start saving the templates as files to your server.

    Thank you Robin, Lisa and Ryan Irelan for you help and suggestions.

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

ExpressionEngine News!

#eecms, #events, #releases