News:

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

Main Menu

Settings.portuguese_brazilian-utf8.php bug found

Started by cristianoportela, May 29, 2015, 05:41:45 PM

Previous topic - Next topic

cristianoportela

in the latest version for this file, there's an bug. the problem: admins are unable to force themes on users, users are unable to change his own theme. happens with the version that is right now online. the problem that happens is this, if running an vm:

Parse error: syntax error, unexpected ';' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\Themes\core\languages\Settings.portuguese_brazilian-utf8.php on line 7

on forum live version, the most common result is an blank page, nothing is done. in that line, you can find this:
$txt['theme_thumbnail_href'] = ;

just remove the ; then save it. issue fixed

please, fix it on the file that is online

[]s

DSystem

Use this same file on my forum and this correct.

I just download and matches in Forum->  http://download.simplemachines.org/?smflanguages;lang=portuguese_brazilian

<?php
// Version: 2.0; Settings

global $settings;

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'O tema padrão do Simple Machines.<br /><br />Autor: Equipe Simple Machines';

?>



linha 7 -> $txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';

Kindred

Removing the semicolon is wrong and will break other things
Сл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."

cristianoportela

fact: update that file from live version. deploy an clean version of smf 2.0.10, install that language pack. you will be unable to change theme, doesn't matter if it's right or wrong. something is wrong on code

please, test it on live version. if you wish, i can record the issue and upload it to prove the issue

[]s

Kindred

I did not say that there was not an issue -- I said that your method of fixing the issue is incorrect.

the correct way to fix your issue is to use the code that DSystem listed.

However, I just checked the download for smf_2-0-10_portuguese_brazilian-utf8 and I will now state that you are INCORRECT. There is no problem with the download. If you are seeing a problem, then there is some issue with YOUR system or your editor that is removing the perfectly VALID string declaration.


The file Settings..portuguese-brazilian-utf8.php from our download site has the exact following code in it...


<?php
// Version: 2.0; Settings

global $settings;

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'O tema padrão do Simple Machines.<br /><br />Autor: Equipe Simple Machines';

?>



and this code is correct.

I tested on 3 sites -- they all worked correctly - even after installing the language and changing it back and forth
Сл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."

cristianoportela

so, we have an problem, because i said that you didn't fully checked it. in hope that you find and see the issue happening, i've recorded for you, ok? i hope that you don't mind, i've just forgot to change back to default theme before erase an perfectly good test site, but no problem. the worst thing is that there's no theme at all until i install it. this video has about 6 minutes, just check utf 8 when installing and then deploy the same language, ok? as you will see, nothing has changed on that, except utf-8. as you know, if not enabled, utf 8 will not do nothing at all... so, don't forget to set is at default on install, ok?

http://youtu.be/c-cEkbpMhaU [nofollow]

[]s

Kindred

Ummmm....  YOU have a problem, which seems to be related to YOUR system doing something to the file which breaks it.

If the file from our download site was broken as you suggest, I would acknowledge it and fix it...   But it is not broken.
Сл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."

cristianoportela

my system? no. that also happens on live hosts. i just have vms to test things before set it online and i've found the issue online. i've also found an issue that i've reported long ago about global headers and footers don't working with scripts on it. well, now i had to download the latest version once again and i've found the issue as well. guess if theres not an php out of place... working now

the issue seems to be related to that utf-8 that i check on install. i didn't tried without it, but as an wild guess, due your language, you didn't set is as default. it's understandable, isn't required that in english

[]s

Illori

i just downloaded the portuguese_brazilian utf-8 package on to my local install i see no issues with this file.

<?php
// Version: 2.0; Settings

global $settings;

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'O tema padrão do Simple Machines.<br /><br />Autor: Equipe Simple Machines';

?>


this issue has nothing to do with you selecting utf-8 on install.

cristianoportela

well, something does that

edit: oh yes, i've just noticed that on fresh installs. i didn't tried on upgraded ones

[]s

cristianoportela

ok, issue found. it's downloaded this:
<?php
// Version: 2.0 RC2; Settings

global $settings;

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['theme_thumbnail_href'] = ;
$txt['theme_description'] = 'O tema padrão da antiga versão do SMF, com o codinome Core.<br /><br />Autor: A equipe Simple Machines';

?>


as stated, yours say that should be this:
<?php
// Version: 2.0; Settings

global $settings;

// Important! Before editing these language files please read the text at the top of index.english.php.
$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';
$txt['theme_description'] = 'O tema padrão do Simple Machines.<br /><br />Autor: Equipe Simple Machines';

?>

someone other than me noticed that yours state that should be this:
$txt['theme_thumbnail_href'] = $settings['images_url'] . '/thumbnail.gif';

when in fact in a fresh install of that file, you have just this:
$txt['theme_thumbnail_href'] = ;

so, there's only an ; when you should have:
$settings['images_url'] . '/thumbnail.gif';

that isn't the same. so, conclusions:
all yours that say that works ok, then yours tested in a upgraded version, the file was in there and not updated at all. so, try fresh in a vm...

the problem is on live version. the youtube video that i've posted proves it. at least, now someone knows what to fix

[]s

Illori

i had JUST installed that language package before i posted. it was not present before.

cristianoportela

so, you saw that video i suppose, yes? if so, you have noticed that nothing in that video was edited, everything was downloaded from smf himself. the problem is in the live files and fresh installs

flame war will not fix this

i don't have ftp access to smf and i suppose that you too don't. in hope that someone with ability to fix that on server, i've reported, nothing else. my idea was help others with their issues, that have nothing to do with "doesn't happen here, so doesn't exist". the problem is there, the cure for it also is. fix that isn't allowed to me

at least, i hope that someone that can fix, fix it in fact instead "doesn't happen here, so doesn't exist", with the proves that i've already gave

cheers

[]s

Steve

After your post just before this one, I downloaded that language pack and as both Kindred and Illori has told you, it is correct.

You can argue all you want but that won't change the fact that it is correct when downloaded from http://download.simplemachines.org/?smflanguages

Something is happening on your end. You are going to have to accept that.
DO NOT pm me for support!

Kindred

I checked the download from the site as of this morning.   The code is present dactyl as I stated.

This is not a flame war...  I am telling you that soemthing that YOU are doing is breaking the file... Because just checked again and the file is absolutely correct as downloaded, installed correctly, and shows no issue with changing themes when it is installed.

Again...   Our files are correct. If you are seeing errors, then something between the download and when you install it is causing issues with your system. -  but the issue is not with our file
Сл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."

cristianoportela

dude, you at least give yourself the trouble of reading #10? you saw the video at #5? if so, then you have noticed that not a single one file has come from another place other than smf repo. in my world, it's impossible something rip this off:
$settings['images_url'] . '/thumbnail.gif'

leaving just the ;

it's in a file that is at smf repo. once again, nobody looked the file that was downloaded. i'm ashamed, but once again, another video, step by step, ok?
http://youtu.be/6nN5Dc8Unlw [nofollow]

yours now are able to see the file that is wrong, booth regular and utf8? so, how was supposed to be in my files, if i've recorded even the download? it's at smf repo

just as an hint to yours: portuguese brazilian isn't portuguese from portugal, different files. the ones for pt portugal is right. the brazilian, don't

[]s

Kindred

You can show us all the videos you want...

Three of us have tested the exact same thing and can not duplicate your issue which really seems to suggest that the issue is solely on your own system...

And yes, we are completely aware that your reported issue was with the Brazilian, UTF8 version.

Just put the correct code in your file and it will be fixed for you.
Сл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."

cristianoportela

dear lord, even proving something that is wrong yours can't see... download just once:
http://download.simplemachines.org/?smflanguages;lang=portuguese_brazilian

http://download.simplemachines.org/index.php?thanks;filename=smf_2-0-10_portuguese_brazilian-utf8.zip

and see. you will see the files as i've posted in #10. i've did my job, i've reported an problem, i've reported how to fix it. you don't wanna see, no problem. close the topic then, send it to the garbage and hide the problem under the carpet. the problem still will be there

the worst kind of blind is the one that don't wanna see

[]s

Kindred

cristianoportela,

I finally see the confusion (and I apologize for yelling at you) You are using the CORE theme, not the DEFAULT.
It does seem that the CORE theme file is incorrect.

one reason this was not noticed earlier is because the only place that you mentioned "core" was in the error message. You never actually SAID that you were using the core theme or that you have problems changing from CORE... and the reason we were confused is because themes are not supposed to redefine language files that are the same as the default file...

(and team...BTW: Why the heck is the core theme defining Settings.language.php?)
Сл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."

Antes

Because some themes may have extra items (Social Media links etc...). Issue with Core theme on your language is fixed. Please use one of the following depending on your encoding.

Marking this solved and moving. Let us know if you need extra assistance :)

Advertisement: