Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: cristianoportela on May 29, 2015, 05:41:45 PM

Title: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 29, 2015, 05:41:45 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: DSystem on May 29, 2015, 06:16:51 PM
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';
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 29, 2015, 08:43:36 PM
Removing the semicolon is wrong and will break other things
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 01:51:38 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 30, 2015, 03:15:12 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 04:35:49 PM
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

[]s
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 30, 2015, 04:41:03 PM
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.
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 05:03:18 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Illori on May 30, 2015, 06:22:46 PM
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.
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 07:26:40 PM
well, something does that

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

[]s
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 07:43:27 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Illori on May 30, 2015, 07:56:18 PM
i had JUST installed that language package before i posted. it was not present before.
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 08:21:21 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Steve on May 30, 2015, 09:08:59 PM
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.
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 30, 2015, 09:09:31 PM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 30, 2015, 10:24:24 PM
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

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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 30, 2015, 11:26:27 PM
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.
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: cristianoportela on May 31, 2015, 08:15:45 AM
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
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Kindred on May 31, 2015, 08:29:34 AM
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?)
Title: Re: Settings.portuguese_brazilian-utf8.php bug found
Post by: Antes on May 31, 2015, 09:39:56 AM
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 :)