News:

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

Main Menu

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.


Advertisement: