SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Emulation Support

Open smfbigguy opened this issue 11 years ago • 19 comments

I was playin with the package manager and went to emulation support. This is what mine looks like. It's not supposed to be like that: screenshot-www smfhelper com 2015-06-11 17-29-03

smfbigguy avatar Jun 11 '15 21:06 smfbigguy

i can duplicate this issue. using the revert link does not correctly revert the field.

i wonder if because http://www.simplemachines.org/smf/latest-versions.txt has not been updated to include beta 2 this is happening. you are using the beta 2 from github? maybe we can ask the site team to update that file as that is what stores that list and see if that fixes the issue?

illori avatar Jun 12 '15 14:06 illori

I am using beta 2 yes.

smfbigguy avatar Jun 12 '15 21:06 smfbigguy

seems that there is an issue with the emulate_versions array, when SMF Beta 2 is missing from the list the array does not have the right number of keys in it.

Array
(
    [0] => 2.0 RC2
SMF 2.0 RC3
SMF 2.0 RC4
SMF 2.0 RC5
SMF 2.0
SMF 2.0.1
SMF 2.0.2
SMF 2.0.3
SMF 2.0.4
SMF 2.0.5
SMF 2.0.6
SMF 2.0.7
SMF 2.0.8
SMF 2.0.9
SMF 2.0.10
SMF 2.1 Beta 1
)

instead of

Array
(
    [0] => 2.0 RC2
    [1] => 2.0 RC3
    [2] => 2.0 RC4
    [3] => 2.0 RC5
    [4] => 2.0
    [5] => 2.0.1
    [6] => 2.0.2
    [7] => 2.0.3
    [8] => 2.0.4
    [9] => 2.0.5
    [10] => 2.0.6
    [11] => 2.0.7
    [12] => 2.0.8
    [13] => 2.0.9
    [14] => 2.0.10
    [15] => 2.1 Beta 1
    [16] => 2.1 Beta 2
)

the code does not know how to handle the drop down box with the first array.

illori avatar Jun 13 '15 10:06 illori

It is indeed caused by Beta 2 been missing from that file.

Code can be added to prevent this:

    $context['default_version'] = preg_replace('~^SMF ~', '', in_array($forum_version, $context['emulation_versions']) ? $forum_version : end($context['emulation_versions']));

But it will cause some confusion among users, plus, this will only happen until 2.1 reaches a stable release, after that, releases will not be that frequent and that latest-file will be updated before an actual release is made.

MissAllSunday avatar Jun 16 '15 16:06 MissAllSunday

Is this still an issue?

live627 avatar Jul 20 '15 00:07 live627

yes still an issue, the file above has not been updated to include beta 2.

illori avatar Jul 20 '15 09:07 illori

I have no idea which file it is... is it on the sm server?

On Mon, Jul 20, 2015 at 2:16 AM, Illori [email protected] wrote:

yes still an issue, the file above has not been updated to include beta 2.

— Reply to this email directly or view it on GitHub https://github.com/SimpleMachines/SMF2.1/issues/2899#issuecomment-122820188 .

live627 avatar Jul 20 '15 23:07 live627

yes, it is the file i linked above. i also posted to the site team to update the file.

illori avatar Jul 21 '15 00:07 illori

How would the developers like to fix it?

We used to not list any beta/dev versions in things like latest-versions and other information files from our site.

The correct fix should be in the code, but we can add beta 2 easily to the site.

jdarwood007 avatar Jul 23 '15 00:07 jdarwood007

we can add beta 2 easily to the site.

Do it..

live627 avatar Jul 23 '15 01:07 live627

Beta 2 has been added to the site now (I meant to do it prior to the release but overlooked it somehow). We can look into adding code to prevent these problems in the future as well.

Oldiesmann avatar Jul 23 '15 14:07 Oldiesmann

Well, I just installed the latest from here about an hour ago and this is not fixed yet. What are the strange characters right at the start, lol. screenshot-www smfhelper com 2015-07-23 22-01-11

smfbigguy avatar Jul 24 '15 02:07 smfbigguy

Also when installing a mod I no longer get a server error as I reported before. I get an error that tells me a backup could not be made...going back a page and trying again to install the same package resolves this and the package installs fine.

smfbigguy avatar Jul 24 '15 02:07 smfbigguy

looks like this file has an empty line below the beta 2 line, this is breaking the drop down.

if the empty line is removed there is no problem.

illori avatar Jul 24 '15 10:07 illori

Not sure how that blank line got in there, but it should be fixed now, and you'll see a fix whenever the "Fetch Simple Machines Files" task is run again.

Oldiesmann avatar Jul 27 '15 16:07 Oldiesmann

i dont know why but this seems to still add something that is breaking the function at the end of the Beta 2 line... if you delete that line and type it again in the database the drop down goes back to normal.

illori avatar Jul 27 '15 20:07 illori

It does not properly split it by line endings. It expects /r/n but does not always get that.

I've almost fixed this.

NanoSector avatar Jul 28 '15 14:07 NanoSector

I've been editing the file on Linux, so it should have UNIX line endings if that makes any difference.

Oldiesmann avatar Jul 30 '15 16:07 Oldiesmann

The weird character at the beginning was a Byte Order Mark which apparently KWrite adds by default, but the code has been changed to use a different format so we don't have to worry about different line endings.

Oldiesmann avatar Jul 30 '15 18:07 Oldiesmann