News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Corrupt Code where? (Solved)

Started by picano, July 11, 2009, 11:31:57 AM

Previous topic - Next topic

picano

Currently fixing up a forum after a host change disaster. Adding a few missing posts here and there that didn't quite seem to import properly... when I ran across...

[nofollow]

QuoteCode corrupted. Insert fresh copy. \n'); smileyPopupWindow.document.close(); } // ]]>

Any idea which file that is in? (Using the efsane theme right now if that matters)

Norv

This message is not in SMF. Are you using 1.1.9?
Does it happen on default theme as well?
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

picano

Nice seeing ya again!

And yeah, it seems to affect the default as well.

Norv

Hello there!
Please post as attachment here your file Themes/default/Post.template.php.
Also, list the mods you have installed now on the forum.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

picano

#4
Wow, nice timing. I just ran across that file myself. (Found a reference to it in... http://www.simplemachines.org/community/index.php?topic=306310.0)

And the forum does not have any installed mods (that I know of --- nothing listed in packages)

EDIT:

Also... could this explain why attempting to preview sticks on "fetch preview"?

EDIT2:

From firefox's error console

QuoteError: mismatched tag. Expected: </preview>.
Source File: http://kittycorp.freei.me/index.php?action=post2;board=7;preview;xml [nofollow]
Line: 6, Column: 3
Source Code:
</noscript>

Norv

#5
Can you please provide a temporary test account on the forum, to see the issue?
(normal member account).
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

picano

Sure thing.

user/pass: pictest / picana

(Also side question... does this forum ever stop asking for verification upon posting?)

Norv

Thank you, though, it was nice timing: I was just posting that there is no need anymore:  it seems it's the statcounter javascript code, that is complaining about "code corrupted", no SMF, no mod. Please check that one out.

And yes :) it stops at 10 posts I think.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

picano

Alright, I'll be checking that out.

I'm getting sick of other stuff being embedded into my pages. >.<

Speedy_Luck

Hi I'm sorry to post again in this thread, but I have this problem too, how can I solve this?

Norv

Speedy_Luck: please check your statcounter piece of code, eventually replace it all with a newly downloaded code.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Speedy_Luck

I'm sorry I'm noob in this what is StatCounter? :S

Norv

If you're getting the same error as stated here, "Code corrupted. Insert fresh copy. ", then it is probably resulted from a piece of code taken from: http://www.statcounter.com/. That has nothing to do with SMF, and if this is the case indeed, and this piece of code is in the files, then perhaps you (or another admin, or the host perhaps) inserted it in the files. Its purpose is to count the visits to the site.
Either way, please tell exactly what error message you are getting.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Speedy_Luck

If you check my forum for example, in the shoutbox you can see the error Code corrupted. Insert fresh copy.  \n'); smileyPopupWindow.document.close(); } // ]]>  it also appears when posting.

URL: http://clickvirtual.co.cc/

Norv

I cannot see the shoutbox (is it only for members?).
But regardless, the code from www.statcounter.com is in the sources of every page:

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4828498;
var sc_invisible=1;
var sc_partition=54;
var sc_click_stat=1;
var sc_security="7b4a84ec";
</script>

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div
class="statcounter"><a title="wordpress stats "
class="statcounter"
href="http://www.statcounter.com/wordpress.org/"><img
class="statcounter"
src="http://c.statcounter.com/4828498/0/7b4a84ec/1/"
alt="wordpress stats " /></a></div></noscript>
<!-- End of StatCounter Code -->

If you or another admin didn't place it in the .php files so it appears in every file on your forum, then perhaps your host did.
You can search for this piece of code in your forum files, and see all the places where it is, and do what they say perhaps, replace it with a fresh copy from their site (www.statcounter.com). Or, if you don't want this code there in your files, you can remove it safely. Perhaps you can check with your host how come it's there.
As you wish, really. Either way, you did not get this piece of code from SMF, and it should not do any harm to SMF functionality if you remove it.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Speedy_Luck

Well I dont know which files you are saying, are they of SMF?

EDIT: I made shoutbox visible

Norv

In your site's first page, the code exists. That means it is in your forum files. You might check the file BoardIndex.template.php. Or index.template.php. (from your theme directory, that is, /Themes/your_theme or /Themes/default)
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Speedy_Luck

I cant see the code please cab you give a look? I'm sorry for every work I am give you  :'(

Files are anexed

Norv

I'm afraid it's not there. Perhaps in index.php, from your forum directory. Please feel free to attach that one if you want.
Load.php could be another possibility.

You can also check, in a text editor supporting search in many files. For example: you can download all your forum files in a directory on your computer. Then, in an editor like Notepad++, you can set the search for "statcounter", *.php files, and give it this directory. To search in all files. Then at least you will know for sure that you found all occurrences of this piece of code.
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Advertisement: