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.

Template files no longer synchronize with database

February 21, 2012 4:01pm

Subscribe [1]
  • #1 / Feb 21, 2012 4:01pm

    Sean O'Brien

    78 posts

    I recently updated an MSM installation from 2.3 to 2.4. A few weeks after upgrading and updating all of my add-ons, my template files stopped synchronizing with the EE database files. This was just last week.

    The only major change I made was to set up a new MSM site and start to build a small JQuery mobile page after starting with HTML Boilerplate and the 320 and Up framework. I don’t see how any of these pieces would have broken EE’s ability to synchronize my flat files, but it appears that problems started sometime after I created the new site.

    Here’s a detailed account of what I tried and the oddities I am encountering.

    1. I update an existing flat file and save it to the server on EngineHosting. The changes fail to show up in my rendered template.

    2. Clear the cache multiple times to no avail.

    3. Check my template through the ExpressionEngine CP and notice the changes I made to the flat file do not match the template in the database.

    4. Attempt to Synchronize Templates in the template manager repeatedly in several of my 6 MSM sites. Sometimes a green check mark shows up, falsely indicating synchronization, sometimes not. Always, if I click away from that screen and click back, the files remain unsynchronized. They are also grayed out when files are listed, apparently indicating lack of synchronization.

    5. Check the Basepath to Template File Directory and verify that they have not changed since each MSM site was set up. Double-check with the EE docs to make sure they are set correctly.

    6. Attempt to save unsynchronized files by opening the files in the CP and checking that all the settings are correct. Nothing appears to have changed.

    7. Notice a failure in the CP after a template is saved. The rounded corner styling and most CP button functionality fails and the list of files fails to reappear. I have attached a screenshot. I’m using Chrome, so I check Safari and don’t get this same result. I disable ad-block plus and Ghostery in Chrome and it doesn’t help. The main problem—failed synchronization—is the same in Safari.

    8. Check EE message board for possible bug report or similar complaint. I find a bug where, if PHP is turned on in a template, it won’t synchronize. Go back and check a number of templates to verify that PHP is still turned off. It is.

  • #2 / Feb 22, 2012 3:54pm

    Dan Decker

    7338 posts

    Hi Sean,

    Thank you for the detailed report! I’m sorry you’ve bumped into this, but this sounds like a known bug.

    The good news is that the bug report contains a fix for this.

    Let me know if that doesn’t get you back in shape!


    Cheers,

  • #3 / Feb 22, 2012 4:45pm

    Sean O'Brien

    78 posts

    Hi Dan,

    The bug you linked to is the bug I referenced in #8, perhaps with less clarity than I could have:

    8. Check EE message board for possible bug report or similar complaint. I find a bug where, if PHP is turned on in a template, it won’t synchronize. Go back and check a number of templates to verify that PHP is still turned off. It is.

    Just in case I was wrong about this not being the problem because I never allow PHP in my templates, I replaced the code as directed in the Bug Report Solution. It didn’t help.

    Template synchronization still does not work. I can neither save a template to a flat file from the CP nor save a flat file via FTP and have it show up in my control panel. Somehow my installation became unable to save or read templates as files.

    Thanks,
    Sean

  • #4 / Feb 23, 2012 1:37pm

    Sean O'Brien

    78 posts

    It appears that my primary syncing problems were a result of EngineHosting issues. My active website files were moved to a temporary server and I was still trying to manipulate files on the old server. Now that I’m connected with the correct server, I can see that files are still saving and synchronizing.

    Now I do have the problem outline in the bug report Dan linked to, but it is not caused by changes to my PHP setting. Templates are saving, but a new flat file is created with no extension. The bug report solution does not help. If I verify that this is not an EngineHosting issue, should I post the problem as comment in the bug report?

  • #5 / Feb 24, 2012 3:20pm

    Robin Sowell

    13255 posts

    Hrm- first, glad you spotted why they weren’t syncing properly.  As to being created with no extension- I had to flip ‘save php’ off and then back on to get the extension added correctly.  (I was replicating the problem- and only with files where php was already turned on.)  Looking at the js… I completely fail to see why that would matter.  But can you give it a quick try?  Does that help at all?  And are all of your template flat files being saved with no extension when you save as text file from the template edit page?

    (If it turns out the bug is still in play- you’ll want to add a comment to the bug report- I just want to be sure that’s the case.)

  • #6 / Feb 24, 2012 5:58pm

    Sean O'Brien

    78 posts

    Hi Robin,

    It looks like that took care of it - mostly.

    Turning Allow PHP on and then back off for the affected files caused them to save with proper extensions. I tested several files and then all save correctly now.

    The remaining problem is relatively minor. When I go to the Synchronize Templates window files recently synced have red File Edit Dates and no green check mark next to them. The files are synced, and if they are changed on either end, they will re-sync. The problem is that continue to appear in need of syncing.

    Because the files are definitely synced, this is more of an issue of inaccurate feedback rather than a functional problem.

    Sean

  • #7 / Feb 25, 2012 6:18pm

    Sean C. Smith

    3818 posts

    Sean,

    Glad to see that things are working for you. Will wait for Robin to respond and see if she has any thoughts on why you would be getting incorrect feedback on the status of your file sync.

    Sean

  • #8 / Feb 29, 2012 3:07pm

    Robin Sowell

    13255 posts

    Hrm- first, glad flipping the php setting worked.

    As to the sync issue- do you think it’s related to the files without extensions?  I tried replicating, but can’t.  As soon as I save in the template editor, they show in the ‘sync’ with green checkmarks and comparing the times they are the same.

    Are all of yours out of sync?  And they stay that way after you a. save the template w/‘save as file’ checked; b. run the sync with the file checked to sync?

    And what do your dates look like on some that say they are out of sync (red date/no check) despite being synced? 

    Like I say- I’m not replicating, and I played around a bit with it.

  • #9 / Jun 14, 2012 8:26pm

    Sean O'Brien

    78 posts

    I just needed to sync my files again and I’m still seeing this error even after updating to 2.5.1. I guess that makes sense if I’m the only one who’s seeing it.

    Some templates continue to indicate being out of sync, but saved dates and times show that they are synced.

  • #10 / Jun 15, 2012 12:11pm

    Robin Sowell

    13255 posts

    That’s odd.  And annoying.  Let’s see about getting it fixed up.

    Since I can’t replicate?  I’m thinking a closer look might be advised.  I’ve dropped you an email.

  • #11 / Jun 15, 2012 1:03pm

    Sean O'Brien

    78 posts

    Hi Robin,

    I was in the process of gathering information in response to your email when I tried again to synchronize. It worked on every page and I realized what the problem was.

    I started using Cloudflare yesterday and noticed their “Rocket Loader” creates problems with the Javascript in the control panel. When I turn that feature off, the problems go away. Thought I had it turned off yesterday, but apparently not before noticing and reporting this issue. The Rocket Loader interference just happened to recreate the problem I reported in this thread.

    It looks like this issue is resolved and can be closed. Thanks for offering to help.

    Sean

  • #12 / Jun 15, 2012 1:06pm

    Robin Sowell

    13255 posts

    Ah!  Thanks for the details on the problem- will help a lot if it crops up for someone else!

    And very glad you got it all figured out.  It was definitely a puzzler.

    Let us know if you run into anything else- and I’ll close the case on this one.

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

ExpressionEngine News!

#eecms, #events, #releases