News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Undefined variable: smf_version_1

Started by MESWEB, December 28, 2014, 07:31:44 AM

Previous topic - Next topic

MESWEB

I see this error in errol logs:
Undefined variable: smf_version_1
QuoteFile: /Themes/default/languages/index.english.php (eval?)

Arantor

Can you at least quote the full error please?
Holder of controversial views, all of which my own.


Kindred

the full error... plus, please disable eval so that we can actually see the REAL 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."

Arantor

Eh, with the full message it should be easy enough to find the error without worrying about turning off eval ;)
Holder of controversial views, all of which my own.


Kindred

we're not all psychic code-whisperers like you :P
Сл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."

Arantor

Well, it's not actually that hard. :P The line number is, invariably, correct when supplied (assuming we're talking about a conventional undefined error) and after that the function name should also be correct, meaning the only question mark is to where that function is - and a simple find 'function functionname' in Notepad++ will give you that.

It's only more complex when you start dealing with parse errors in eval'd code because the line number it invariably gives you is the eval() call itself, e.g. all the errors we see in Load.php around line 2047 which is the eval() call on template code, in which case we're then looking at 'what was called to examine the line number thereafter'. Same sort of deal with create_function, too.
Holder of controversial views, all of which my own.


MESWEB

Sorry for my time. This is a full error message:

/index.php?pretty;action=admin&area=logs;c4d57f882=9b2477f037b2c6cba8d42fae4ca2abc1
8: Undefined variable: smf_version_1
File: /home/messiah/domains/obeznany.pl/public_html/Themes/default/languages/index.english.php (eval?)
Line: 477

There is lot of urls with error like:
/index.php?action=viewsmfile;filename=latest-news.js
/index.php?action=viewsmfile;filename=current-version.js

And more.

Arantor

Strange, there is no mention of smf_version_1 anywhere in the 2.0 source, which leads me to believe it's a mod.

OK, so try as Kindred says to turn off eval because something about your setup prevents even basic debugging.
Holder of controversial views, all of which my own.


MESWEB

All errors are going to one file:
Themes/default/languages/Modifications.english.php

Arantor

So what's in that file then? Especially line 477?
Holder of controversial views, all of which my own.


MESWEB

I found it. This error are from Cffp mod:
$txt['cffp_records'] = 'Records';
if (!$smf_version_1)
$txt['cffp_moderation_area'] = 'Groups of fields on posts';
else
$txt['cffp_moderation_area'] = 'Moderate groups of fields on posts';

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Holder of controversial views, all of which my own.


MESWEB


margarett

Well, a quick fix would be to use !empty
But language files should not have conditionals... The mod should define both independent strings and then perform the conditional on the code
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MESWEB


margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MESWEB


Kindred

So, instead of actually correcting the code, you would rather just hack it further?
Сл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."

margarett

Well, it's up to the mod author to property fix it ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: