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.

Lost access to templates in CP

November 25, 2008 10:13am

Subscribe [2]
  • #1 / Nov 25, 2008 10:13am

    Hey Form
    I have a large EE site running with MSM.

    I have just found out that i have lost access to all the templates when i try to access them from the CP. take a look at this screendump:

    http://imageload.dk/files/c7aaf54cd0d47824c0945fd7336832d5.png

    The content and data about the template is gone, but when i am browsing the frontend of the site the design is fine.
    When i look at the mysql the template code is there.

    What do i do?

  • #2 / Nov 25, 2008 10:20am

    Sue Crocker

    26054 posts

    Niklas, is this from one MSM in particular, or all templates?

    Did you also update your MSM files when you updated to 1.6.6?

  • #3 / Nov 25, 2008 10:25am

    Hvordan.nu

    1 posts

    Hey Sue
    I am runing msm 1.1 and yes it is on all sites :(

  • #4 / Nov 25, 2008 10:27am

    That was my on a clients account, ups!

  • #5 / Nov 25, 2008 10:27am

    Sue Crocker

    26054 posts

    When did this start happening? Are you logged in as a SuperAdmin?

  • #6 / Nov 25, 2008 10:30am

    Well i first experienced it today, but the update to 1.6.6 was a week og two ago (havent checked the template section since) so it could be under the update.

    Yes i am a super admin.

  • #7 / Nov 25, 2008 10:47am

    Sue Crocker

    26054 posts

    What I’d do next is back up your database, and attempt to make a brand new template group. See if you’re able to save templates correctly to it.

  • #8 / Nov 25, 2008 10:53am

    No problems making the template groupe, but i cant save data to the index template. Again blank fields like in the screenshot. :(

  • #9 / Nov 25, 2008 10:56am

    Sue Crocker

    26054 posts

    I didn’t notice.. but are you saving templates as text files? If so, is the path accurate?

    Edited to add: You aren’t saving templates as files, at least as far as the screen shot shows. Can you export the template?

  • #10 / Nov 25, 2008 10:58am

    In this test the templates are not saved as files.

    No i cant export.

    Do you want a login for the admin page? Can pm one to you

  • #11 / Nov 25, 2008 11:08am

    Sue Crocker

    26054 posts

    Please check the email address associated with this account.

  • #12 / Nov 25, 2008 11:09am

    Please check the email address associated with this account.

    My account?

    Or what?

  • #13 / Nov 25, 2008 11:15am

    Sue Crocker

    26054 posts

    I sent you an email to the email address associated with your account. In other words, check your regular email.

  • #14 / Nov 25, 2008 11:18am

    i havent recived a mail from you:(

    edit: got it now, the data is send
    [mod edit: removed email address]

  • #15 / Nov 25, 2008 12:44pm

    Robin Sowell

    13255 posts

    Just to note- it’s always a good idea to have php errors shown to superadmins.  I flipped that on in ‘Admin- System Prefs- Output and debug’ and we get a mysql error:

    Description: Unknown column 'last_author_id' in 'field list'
    
    Query: SELECT group_id, template_name, save_template_file, template_data, template_notes, template_type, edit_date, last_author_id FROM exp_templates WHERE template_id = '14'

    That field is added in the 1.6.5 update.  (On the plus side, there were no db changes in 1.6.6, so if we can fix anything that was missed in 1.6.5 you’ll be good to go.)

    To see what changed in 1.6.6, open up system/updates/ud.165.php.  We need to check all the queries and make sure the changes went through.

    Do you have access to phpmyadmin?  That’s likely the easiest way to approach this.

    Go in- and see if the first db change was made:

    $Q[] = "ALTER TABLE `exp_search` CHANGE `query` `query` MEDIUMTEXT NULL DEFAULT NULL";

    Look at the structure of exp_search in phpmyadmin.  Is the ‘query’ field set to mediumtext?  If so, that query went through.  If not, it failed.

    Now- if it was changed?  I would comment out that query a la:

    //$Q[] = "ALTER TABLE `exp_search` CHANGE `query` `query` MEDIUMTEXT NULL DEFAULT NULL";

    Do that until you get to where the db change didn’t happen.  At that point, you could either put up a backup config.php from 1.6.4 or edit your config.php file back to version 164 and then run the updates to 1.6.5 and 1.6.6. 

    Make sense in general?

    We can walk you through it, but the first step will be to find where the db changes failed.

    Oh- and I’m going to shift to ‘Install’ since the core issue is really the failed update.

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

ExpressionEngine News!

#eecms, #events, #releases