News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Template Parse Error!

Started by Jimmy05, April 09, 2011, 12:40:29 AM

Previous topic - Next topic

Jimmy05

Hi,

I am receiving this message after I attempted to make some edits to my index.template.php. I attempted to remove the smfads.com copyright, as well as update the Share This buttons to a newer version. Yes, I have a backup of the old way it was but I think this is a really simple fix.

There was a problem loading the /Themes/androidrtk_rev4n/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
syntax error, unexpected T_STRING, expecting ',' or ';'

Sounds like I need a ',' or ';' somewhere... Is there a good free program that can help me search and correct errors? Also, when I open my index.template.php, its really spread out and skips a line every line of code. I don't think it was written that way, so why does it show it like that?

Thanks for any help!

Illori

ideally you should not use any text editor that comes with windows by default, they dont work well with code. take a look at notepadd++ or other text editors like it. I would also suggest attaching your index.template.php file and what line number the error is reported on so someone can review it.

CapadY


Is this also happening with the default SMF-theme ?

If not, contact the theme author.

Please, don't PM me for support unless invited.
If you don't understand this, you will be blacklisted.

Illori

well since they did the change i am not sure the theme author would help, although maybe those in coding discussion or graphics and templates may be able to help more.

Jimmy05

I got that Notepad++ but I couldnt find a way to search for errors on there.

Yeah the default theme works fine because I just edited my custom theme's index.template.php.

Im going to try again off the backup and hope to do things correctly. Is there a function in Notepad ++ to search for errors and to remove blank lines?

Thanks for the help!

Illori

no but it is a better text editor then what you are using currently.  there is no text editor that will find and correct errors but syntax highlighting in notepad++ can sometimes help find errors. again i suggest you attach your file to your next post so someone can review it.

Jimmy05

I tried again from the backup and same result.

It's attached and here is what I did:
Replaced code from 393-395
Removed copyright on 999
Replaced code from 533-540

Thanks for any help!

Illori

what copyright did you remove? if it is for a mod you are currently using or your theme you are not allowed unless you pay for its removal.

Jimmy05

I understand, it was the Ad Management mod that I don't use and still had the copyright info there after the uninstall/delete

Illori

does the error message give a line number?

Jimmy05

No, that's why I was wondering if Notepad++ would help with that

Jimmy05


Illori

what theme do you use? can you attach the clean unmodified index.template.php file to your next post?

Jimmy05

It's a custom theme, here is a backup I made from before any edits (attached)

Illori

i cant do a proper compare and i dont have time right now to look further into this issue. can you restore the backup copy and see if that helps?

whatever text editor you used changed all the line ending making a diff on the 2 files very hard to read.

Jimmy05

Oh I know it's brutal. Thanks for trying

Advertisement: