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.  :(

JimM

I meant on your forum.  Sometimes when we see the preview not working we also see some problems with spellcheck.  I was just curious.  So you have it turned off?
Jim "JimM" Moore
Former Support Specialist

CDM

No, I don't think so. At least, I have never turned it off. I have just never seen it, and supposed it was a mod I needed to add.

JimM

It's an option you turn on.  Admin > Forum > Post and Topics > Post Settings > Enable spell checking
Jim "JimM" Moore
Former Support Specialist

CDM

Yes, it was enabled. I remember that now- and remember that it said it doesn't work on all browsers. But I use both ie and firefox, and I don't have it on either. Could it be the theme (Darking) I am using?

JimM

Try turning off spell check and see if your preview works.
Jim "JimM" Moore
Former Support Specialist

CDM

Nope, that didn't work either.  :(

Arantor

Do you get any errors in the forum error log if you try to preview?

CDM

No, I don't. So confusing! But nobody seems to be yowling about it for now, so maybe it isn't going to be a huge problem on our forum...

JimM

Try moving your Web-stat code in front of the </body> tag,  Right now if I look at your source, you have that code outside the <html> tags as well and this is a common cause of the preview not working.
Jim "JimM" Moore
Former Support Specialist

CDM

Hmmm... I had a look at the code, and there isn't a /body> tag, or any html in there whatsoever. It is a php page so maybe it isn't supposed to have html? Should I add it in? I really don't know a whole lot about coding...

Kill Em All

I am looking at your sourcecode now to and there is a </body> tag.

// ]]></script>

</div>
<div id="ajax_in_progress" style="display: none;">Loading...</div></div>
</body></html><!-- Begin Web-Stat code 2.0 http -->
<script type="text/javascript" src="http://server4.web-stat.com/wtslog.js">
</script><script type="text/javascript">
//<![CDATA[

// BEGIN PARAMETERS
var page_name = '#';
var invisible = '#';
var text_counter = '#';
// END PARAMETERS

//]]>
wtslog('al182165','3','http',page_name,invisible,text_counter);
</script><noscript><p><a href="http://www.web-stat.com">
<img src="http://server4.web-stat.com/3/al182165.gif"
style="border:0px;" alt="web stats"/></a></p></noscript>
<!-- End Web-Stat code v 2.0 -->

That is all the way at the bottom.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

JimM

Take a look at the code that Kill Em All posted and just before
Quote<!-- Begin Web-Stat code 2.0 http -->

you will see the tags.  This code should be before the </body> tag.
Jim "JimM" Moore
Former Support Specialist

Kill Em All

* Kill Em All is marking this solved due to inactivity.

Please feel free to mark this unsolved and respond with further details.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Advertisement: