How do I remove this "fatal error" message from the bottom of my forum please?

Started by platinummack, November 23, 2014, 12:37:44 AM

Previous topic - Next topic

platinummack

Fatal error: Call to undefined function template_ad_position() in /home/content/m/a/a/maaxseduction/html/viplounge/Sources/Load.php(2151) : eval()'d code on line 273 is the message I am seeing at the bottom of my forum. I did install ad management which is a mod, then uninstalled it and now I am left with this message. I want to get rid of it. How do I do that?


shadow82x

I'd recommend double checking all the files that the ad management mod made edits too and ensure all the mod edits are properly removed. It looks like the uninstall process didn't quite remove all the modification code.


http://custom.simplemachines.org/mods/index.php?action=parse;mod=255;attach=229882;smf_version=2.0.9
Colin B
Former Spammer, Customize, & Support Team Member

Kindred

When you uninstalled, you apparently had errors noted, which you los, apparently ignored.

So, now you will have to either restore the backup which you should have taken before attempting to install the mod... Or manually remove the remaining code from the failed uninstalation which is causing the error.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

Well after installing/uninstalling the ad management mod, everything below my navbar was gone. I then went to GoDaddy and then restored my site to an instance before I had installed it. Luckily I got it back minues that line.  Any idea what file this may be in and what piece of code it maybe? I am not a coder, even though I am quite technically savvy.

platinummack

Also mcblaber don't know what I am supposed to do with the link you gave me. If you can give me some steps and some context as to what that is, it will help. I am NOT a coder nor an SMF expert. Thanks.

shadow82x

Quote from: platinummack on November 23, 2014, 07:29:16 AM
Also mcblaber don't know what I am supposed to do with the link you gave me. If you can give me some steps and some context as to what that is, it will help. I am NOT a coder nor an SMF expert. Thanks.
If you were to remove the modification code manually that link would be handy. You don't need to be a coder or know coding to do that. ;)

Quote from: platinummack on November 23, 2014, 07:26:42 AM
Well after installing/uninstalling the ad management mod, everything below my navbar was gone. I then went to GoDaddy and then restored my site to an instance before I had installed it. Luckily I got it back minues that line.  Any idea what file this may be in and what piece of code it maybe? I am not a coder, even though I am quite technically savvy.
You would of had to disable template eval when you had that error to determine where the error was coming from. There is a setting under server settings in the admin panel.
Colin B
Former Spammer, Customize, & Support Team Member

platinummack

So disable eval in the SMF admin panel and that should do it you're saying? and see if it still retains or that's what I did to cause this?

shadow82x

Quote from: platinummack on November 23, 2014, 04:30:49 PM
So disable eval in the SMF admin panel and that should do it you're saying? and see if it still retains or that's what I did to cause this?
If you disable template eval under server settings the error still would have appeared but it would of told you specifically what file is generating that error. As Kindred mentioned earlier you should be cautious when you have uninstall errors, that would also help pinpoint what files to manually remove modification code from.
Colin B
Former Spammer, Customize, & Support Team Member

platinummack

What about commenting out the call to the function and seeing if that removes it.
Or what shall I do? If I disable eval , then you are saying I'll still get the error but it will tell me what is causing it? huh?
How and what will tell me? Not clear.

Arantor

OK, so what happens is that all the templates are actually run twice, once in a preliminary pass (known as template eval) to check there aren't any fundamental errors in templates, before being run the second time.

Now this template is being run the first time and tripping over this function that doesn't exist. Eval will let the error be caught in a way it wouldn't otherwise - but it can get the location of the error wrong.

In this case I don't think it makes a lot of difference; you have a call to template_ad_position being asked for and this doesn't exist, which is usually a symptom of a mod modifying a theme and not cleaning up after itself - and if it's everywhere, it's going to be in your theme's index.template.php file.

platinummack

So Arantor, you are saying that whatever injection of code or lines of code that is causing this will be in the index.php file of the main SMF folder(outside) of the theme or in the theme I'm using? Do you know what I should erase there?

Arantor

I'm not being funny but did you even read what I said?

Quoting for relevance:
Quoteit's going to be in your theme's index.template.php file.

Kindred

Quote from: Kindred on November 23, 2014, 01:03:01 AM
When you uninstalled, you apparently had errors noted, which you apparently ignored.

So, now you will have to either restore the backup which you should have taken before attempting to install the mod... Or manually remove the remaining code from the failed uninstalation which is causing the error.

Quote from: mcblaber on November 23, 2014, 01:01:58 AM
I'd recommend double checking all the files that the ad management mod made edits too and ensure all the mod edits are properly removed. It looks like the uninstall process didn't quite remove all the modification code.


http://custom.simplemachines.org/mods/index.php?action=parse;mod=255;attach=229882;smf_version=2.0.9
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

So using this link
http://custom.simplemachines.org/mods/index.php?action=parse;mod=255;attach=229882;smf_version=2.0.9

Is it telling me what things should be added where to properly install the mod?
If so, then I can go to each of those files and figure out what is left and just remove it right?

Like the stuff it says to add after a section?

Just located that content and then if I see any vestige of it, remove it? Is that what I should be referencing this link for?


Arantor


Sir Osis of Liver

If this was the last mod you installed, look in /Packages/backups, there should be a backup before ad mod was installed.  Download it, unzip it, and upload to your forum to restore it to where it was before you installed the mod.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

platinummack

So here is what I did.
I went through that link that shows what the Mod ads and where.
I checked for the code it places before, in replacement of and after
as well as the include files. No instance of the code or files anywhere

However it says that in the load.php file, which I do have in the sources directory
there is an invalid function.
Well I used notepad++ and found this piece of code on line 273

273 is where apparently I have some error based on the Fatal error message I have on my site.

Fatal error: Call to undefined function template_ad_position() in /home/content/m/a/a/maaxseduction/html/viplounge/Sources/Load.php(2151) : eval()'d code on line 273

and I can't make out what to do with it and what it means, how it is invalid.


Here is what the code says on line 273....


// Is post moderation alive and well?
   $modSettings['postmod_active'] = isset($modSettings['admin_features']) ? in_array('pm', explode(',', $modSettings['admin_features'])) : true;

Do I erase this part or what?




Kindred

You are not reading, again....

Is that code part of the mod installation?   
I don't believe that it is... So why are you even looking at it?

We have alreayd told you that the ACTUAL error is not where it is being reported...  That's what the (eval?) means. Arantor suggests that the actual error is probably in index.template.php...   However, you should be going through the mod install instructions in reverse, checking each and every add before, add after and replace.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

You are very confusing to understand Kindred.
You implied that the link you all gave me is for me to "manually" remove the code, did you not?
It states where and what files code was added as part of the mod, yes or no?
So now you are saying I am doing it all wrong?

Then please be clear and don't keep on say. "We told you, we told you".
I know you did, but I DON'T GET YOU

So if you want to help, please give me steps.
Also do you respond to every single thread on here?

platinummack

McBlaber states this

I'd recommend double checking all the files that the ad management mod made edits too and ensure all the mod edits are properly removed. It looks like the uninstall process didn't quite remove all the modification code.


http://custom.simplemachines.org/mods/index.php?action=parse;mod=255;attach=229882;smf_version=2.0.9

What do you think this imples?
That these are the files the ad management tool made edits to(files)
So he is giving this to me as a reference to check all of those files and make sure all of those bits of code are not there.

This is why I did what I did.


platinummack

To Arantor, what is in my theme's index.php file? What is the piece of code that I should get rid of?
Also why is it telling me to look at the load.php file?

See here is the error message again



Fatal error: Call to undefined function template_ad_position() in /home/content/m/a/a/maaxseduction/html/viplounge/Sources/Load.php(2151) : eval()'d code on line 273


Or I have both the load.php file and template.index.php file backed up in the original state. Should I just upload them and override these versions?


Kindred

Oh, for the love of all gods, are you really that dense?

Three times, you have been told now.

Index.template.php in your theme directory

Also, you are obviously NOT following the instructions we have given you, since the mod instructions do not tell you to modify load.php in the location that you posted.  So, stop saying "I did that" since, very obviously, you did not do that.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

Kindred, please refrain from personal attacks. I asked you a million times, what do I do in the index.template.php file? DO you not understand basic linear logic or English?

You follow this pattern of

"Just do it

"I told you"

I know you mentioned that it is the index.template.php file, but if you can read or care to understand what others have to say, I asked multiple times "
WHAT CODE OR LINE OF CODE AM I LOOKING FOR IN THIS INDEX.TEMPLATE.PHP FILE
THAT I NEED TO REMOVE

Even in my other thread, you respond in this manner(just blurting out a response,without giving steps or specifics)

Lastly, I can understand everyone else, even the guys at godaddy who are awesome and brilliant over you So it is not I, but You that my Reptile, Limbic and NeoCortex that just doesn't connect with.

You can choose to reply to this with more nonesense or let others reply. Honestly, if I don't get an answer on here over your arrogant, disconnected, "cut throat" responses, I'm 100 percent fine with that. I will solve this and I will solve this without you. I can bet you my last dollar on this.

So either help me in the manner in which I want to be helped, or please do not respond to any of my threads as everytime I look around on here, you are in my face, on my threads. I honestly, don't need that nor really want that at this point. Let someone else answer me. If no one will answer me, I have the gift of pooling resources globally to get the job done.



Arantor

Quoteyou have a call to template_ad_position being asked for and this doesn't exist, which is usually a symptom of a mod modifying a theme and not cleaning up after itself - and if it's everywhere, it's going to be in your theme's index.template.php file.

Maybe that's the code you have to look for? Just spitballing here.

platinummack

can't find template_ad_position in my theme's index.php file either Arantor.

In fact, there is no instance of the word ad/ads in any of the files that the ad management tool may have modified. They all appear to be clean from the post mod install edits.

So I still seek a resolution....


Arantor

Did you look in index.template.php or index.php? Your theme will have both, one is wrong.

You also realise that was merely a *first* guess? I can think of other places where there might be code lurking but since you never actually said where you were actually getting the error, I *guessed* that it would be there based on how I know SMF.

You say 'the footer', but you never said if that was 'on the footer on every page' or 'on the footer on certain page(s)', so I assumed the first one.

I'm sorry I'm not a mind reader, but I also overestimated your ability to follow instructions.

platinummack


platinummack

May be I should post here

http://www.smfads.com/

Just found this. Specific forum for the Ad Management tool.

Lastly, I did check both index.php and template.index.php and no remnant of ad mgmt edits/snippets of code to be found, but then again maybe I am over looking something. I would need someone to actually go into my forum and use their technical/coding experience and also who can go into my db and clear things up.

Arantor

In which case it is BoardIndex.template.php and Display.template.php, which will be in your theme's folder, or if your theme doesn't have them, it will be in the default theme's folder instead (i.e. Themes/default/)

You see, the more detail you provide and don't expect us to just mind-read (and answer when these questions have been asked of you), the faster you will get an answer that might actually be useful.

platinummack

Okay so look into boardindex.template.php and display.template.php for any ad management tool "cod" Arantor?
Is that what you are saying? What do I look for in there? Not sure what code to look for. I kind of have an idea of what looks normal or fishy and I don't see any thing "alien". Once again, I'm not coding savvy to know what function is undefined, what variable declarations look obtuse, etc. I would need someone to look into this. Would you be willing to. I don't mind paying you hourly.
I don't see a display.template.php in my theme's folder.

Kindred

platinummack,

My attitude comes from the fact that you seem to be incapable of listening or following instructions unless someone hands it to you on a silver platter.

regardless of where we have suggested that you look - you have, at your fingertips - as we have told you several times now - the EXACT instructions which your system used to install the mod's code changes.   We have asked you to use the mod parser and the do the edits in reverse.
You have said that you did that....

except, since you still have the error, you, very obviously, have not done that.

So... you want step by step instructions?
1- run the mod parser
2- check EVERY edit made to EVERY file - as defined in the mod parser.
3- confirm that the edits have been UNDONE, in the reverse of the mod parser's instructions on how it will get applied.


--- I guarantee you that there is (at least) one edit which was not undone when you uninstalled.


Finally -- sorry, you don't get to determine how you get helped. If you post on this site, there is a good chance that I will see (and possibly attempt to answer)  ...and I am not stalking you... I respond to your threads -- along with hundreds of others because the questions are (under normal circumstances) fairly easily answered.  I have to say, in 20 years... I have never had someone have such difficulties in understanding basic instructions as you seem to have.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

No problem, in this case. Let's close this thread as there appears to be a disconnect. I will go to that specific ad management forum or outsource to a few brilliant PHP coders I know globally to help me. FYI I did follow your steps and even consulted with a few people that I did. Yet you and other want to believe I did not. So I can't change your mind. Nevertheless, I want to thank you and every else for trying but at this point, it is not worth at least my time to have a back and forth exchange where neither of us is connecting with the other. I am too busy running my businesses and living life to be sitting here like a keyboard Jockey . Once again, best and thanks. case closed.

vbgamer45

 template_ad_position is not part of ad management mod. More than likely another ads mod.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

QuoteOkay so look into boardindex.template.php and display.template.php for any ad management tool "cod" Arantor?

Yes, look in those files and you will find calls to template_ad_position.

QuoteNot sure what code to look for.

Despite me having repeatedly said 'template_ad_position', as per the error message.

QuoteI kind of have an idea of what looks normal or fishy and I don't see any thing "alien". Once again, I'm not coding savvy to know what function is undefined, what variable declarations look obtuse, etc.

Wait, what?

QuoteI don't see a display.template.php in my theme's folder.

So, like I said, look in Themes/default/ for it if your theme doesn't have one.

As for whether I would be willing to? The answer is no. Even if I charged $100/hour, the sheer frustration of this would be enough to put me off.

Kindred

Ah yes...    if I recall correctly, the user also tried installing and failed an uninstall on one of the other advert mods.

Which explains why the parsing of ad management resolved nothing...  because he was parsing the wrong mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack

FYI a wonderful woman at Godaddy solved my issue.
My old forum is back and the fatal error code is gone.


Thanks for all of your help guys!

Kindred

And what, exactly did she do?

(bets? I'd say she did exactly what we've been trying to tell you what to do)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

platinummack


Arantor

Yes because winding up the project manager (and forum administrator) here is a good idea. His title of "the mean one" is not accidental.

I bet she did did exactly what we were trying to get you to do, after all, Kindred and I only have over 15 years SMF experience between us, and I happen to be former SMF developer team, as well as being certified in PHP by the company that makes PHP... I am sure we don't know much about it or anything.

platinummack

That wasn't the issue.

So there is another thread that I had saying I had an older db with all of my posts, board categories, members and i  wanted to use a specific theme for a new install and connect that to the old db so that I would get all of that info back.

GoDaddy has a history view where you can modify files to a time stamp. I had apparently changed my DB password a few days ago and so in settings. php the password did not match. I thought it did. So I did update that and input the db connection settings to the old Db and it works. I was also able to restore the entire folder where SMF was installed to a time before this file was updated to generate the error and start from scratch. Now in doing so, my front end was showing, but my backend/dashboard was cut off. So I needed to find a way to get admin access back. Hence, I did a google search and some guy said just type in www.forumurl.com/index.php?theme=1 and my original theme came back which gave me access to the admin and I was able to switch themes and be back in business.

So now I have the theme I want
My old DB info back
The error message gone

I am happy!

SO you and I were both right in the DB settings being matched with the settings.php thing but I was wrong to think they were matched. they weren't. as the settings.php file was changed when I restored them to another time stamp. I now have them matched and the forum is up.

See

I just want to know how to

1. Upgrade to version 2.09 as I am running 1.1.1.
Any ideas

2. How to add social sharing icons or ideally a floating bar on the left so that users can share my content

3. I want to put a banner ad in the section that is above the main board.

Any ideas?


Arantor

Upgrading SMF

And you will have to get a new theme since no 1.1 theme will work on 2.0 without significant changes (and no, we can't talk you through that, it's a huge amount of work and even experienced theme authors don't like doing it)

platinummack

I'll figure that out.

What about adding an advert in that section and a social sharing feature?

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


platinummack

These are only compatible with 2.0. My forum is 1.1.2. So anything for that or do I upgrade my FORUM?

Arantor


platinummack

Okay so can I follow these steps.

1. Download a new theme that is 2.0 compatible, before the upgrade.
2. Upgrade to 2.0

that's it?


Irisado

Given that you have started a new topic on this issue, this topic can be locked.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Advertisement: