Preview not working...

Started by CDM, August 11, 2009, 04:30:04 AM

Previous topic - Next topic

CDM

Hello!

I just changed some stuff around on my SMF (only background colors, etc.), and added a button to my menu bar. Now, however, the "preview" function is not working with posts. It just says, "Fetching preview..." and then nothing happens.

I don't know if this is a result of my tinkering, or if this is due to something else. Should I paste my template code here? Has anyone had this prob before?

Oh- I am using 1.1.10, Darking theme.

Thanks!

Arantor

That could be a variety of things.

Do you get any errors in the forum error log?

CDM

No, nothing in error log.  Once I get the "Fetching preview" message, nothing happens at all- it just sits there. If I refresh the page, my post is still there, but the "fetching preview" thing is gone. If I click "preview" again, same thing happens.

Arantor

Do you get a Javascript error on that page?

CDM

No, nothing. It just sits there.

N3RVE

Do you experience the problem on the default theme?
Run file_check.php (What is file_check.php?) ...and a link to your forum will help :).

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

CDM

OK- installed the file_check.php thing, and ran it, and got a bunch of errors... The first one was on the index page:

/forum/index.php

    * File does not end with ?>

So I went there, and saw that I had put my web stats code in there after the ?>, so I moved the ?> to the bottom of the page (end of file), and then my forum page had a parse error, pointing to the line where my web stats code begins. Could this be causing problems I am unaware of? I moved the ?> back to where it was and my forum page is back to normal. But nothing is fixed as far as the preview, obviously, and that web stats code may be causing problems because I couldn't put it in the theme/template/index.php file and get it to work.

I am afraid now to correct the other errors... :(

Here is the filechecker url (I don't know if you can see it or not):
http://www.conciergedumonde.com/forum/file_check.php

And my forum is at:
http://www.conciergedumonde.com/forum

Thanks so much for all your help so far!! :)

CDM

Oh- forgot to ask- is the default theme the theme I set for the board default, or is it the core default theme that came with SMF? Either way, I experience it on both themes. :(

N3RVE

You shouldn't add the code to ./index.php. Add it to ./Themes/../index.template.php (somewhere before </body>).

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

CDM

So then do I have to add it to every theme in there? I think I tried that and got a parse error of some sort. I will try it again...

But the preview button was working even while my web-stats code was in there (it's been there since July 29th or 30th). It was only 4 days ago (when I first posted this thread) that it stopped working, after I changed the colors. And the way I changed the colors was that I just changed the original images in photoshop and uploaded them with the same names as the old ones (renaming the old ones as something different).

Arantor

You should only need to change Themes/yourtheme/ and Themes/default/ files - not any others.

Do you need any more support with this?

CDM

Yes, unfortunately I still don't know why the preview option doesn't work.  :(

Any help would be greatly appreciated! But if nobody can figure it out, I suppose it isn't the worst feature to be missing.  :D

Arantor

So did you try adding ?> to files flagged by file_check.php ?

If you get a parse error, what files (and can you attach them here please)?

CDM

Hi! OK- so I ran the file check thingy again and then went to each file:

/forum/Themes/default/languages/_vti_cnf/ManagePermissions.english.php

    * File does not begin with <?php
    * File does not end with ?>

It does begin and end with those, so I don't know why it is telling me it doesn't.

/forum/Themes/default/languages/_vti_cnf/Login.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same- those characters are in there right at the beginning and at the end.

/forum/Themes/default/languages/_vti_cnf/Reports.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/Stats.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/Who.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/Help.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/Wireless.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/ManageCalendar.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

/forum/Themes/default/languages/_vti_cnf/Install.english.php

    * File does not begin with <?php
    * File does not end with ?>

Same.

As a matter of fact, I think it lists each and every file in the forum folder! And then other theme folders. And each and every one so far seems to be the same- those characters are in there.  :(


Arantor

Can you attach one or two of them please?

N3RVE

If this is solved feel free to mark it as solved otherwise reply with what was requested :)

-[n3rve]
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

CDM

I am coming back with the files requested- I just had a crash on my main computer so I need to get the old one up and running again (thank goddess I saved everything on the old one!!!).

CDM

Sorry this took so long. Here are two of the files: Manage permissions and display template.

JimM

Nothing wrong with those files other than you saved them as a txt file.  Normally when we ask for a file to be attached it is best to use your FTP client and copy the file to your desktop, then attach the file here.  Never edit php files with word, notepad, or wordpad.  Instead use a great text editor like Notepad++.

I'm curious.  Does your spellcheck work?
Jim "JimM" Moore
Former Support Specialist

CDM

You mean on my forum? Or on this (simple machines) forum? On my forum we don't seem to have a spell check.  :(

Advertisement: