e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

Question : upgrading versions #613

Closed tgtje closed 10 years ago

tgtje commented 10 years ago

What would be considered as MINIMAL existing version to eventually upgrade to v2 ? Due to many changes which have been on versions prior to v1 (starting at v 0.7.24 and upwards).

Although there will still be users who did never upgrade up to version 1.0.4 (which should have been made overall), it is probably expected that present files will not accommodate certain settings in (guessing) pre v 0.7.26 versions.

So basically : what is the pre-requisite (# required or necessary as a prior condition) before an update is entended ?

Moc commented 10 years ago

The differences between 0.7.25 (.26?) and 1.0.0 are minimal.... This is just a version renaming, it's not like there have been significant changes which break functionality. I don't see any reason why people would not upgrade to the latest version being v1.0.0.

Having said that, I suppose technically one could upgrade from any 0.7.x version to v2... I however strongly recommend updating to the latest version of e107 at all times.

willem010 commented 10 years ago

the last upgrade i did was a 0.7.24, it's not flawlwss, but in the end all seems to function. (except for some already reported issues)

I do have to mention: in my first upgrade attempt i used v2 themes, overwriting the v1 one before upgrading. (using the same folder names .. ) this turned out to be a nightmare as the admin theme blanked out for the biggest part and i was unable to open the thememanager. (links were not showing at all). make sure to set the theme to a default theme before upgrading or you will need to manually edit the database. in my second attempt i used different folders for the themes and all went well.

tgtje commented 10 years ago

The purpose of an upgrade is to use the Original theme what is running. Except for some misbehaviour (jquery and alike sometimes) i did not run into any real errors. I imagine it could happen when the ADMIN theme is not a core one. (either Jayya or Core). Else it should work just fine. (of course a dodgy theme will have its own influences, but still it should revert to a base one)

To set the 'old' version to default theme will not really work, it will destroy (when own themes should be the one) the whole plugin (sidebar) settings. There will be no real solution to overcome such things (1000 + 1 possibilities). If the theme is nicely build, one should not expect any real trouble. about admin templates, a warning might be a simple workaround).

Moc commented 10 years ago

@willem010

the last upgrade i did was a 0.7.24,

There are security vulnerabilities in that version, please upgrade to the latest version 1.0.4.

in my first upgrade attempt i used v2 themes, overwriting the v1 one before upgrading. (using the same folder names .. )

I don't understand. You cannot use v2 themes on v1 installations, they're not compatible that way. You can use v1 themes on v2 installations (frontend only, not the admin area!). First upgrade, then set v2 themes.

make sure to set the theme to a default theme before upgrading or you will need to manually edit the database.

So you were using a custom v1 admin theme (not core or jayya for example?) and you then upgraded to v2. After overwriting the v1 files with v2 files, did the admin theme change to 'bootstrap 1.0' or not ?

To clarify: in v2, the admin theme is currently 'bootstrap 1.0'. This admin theme can not be changed to any other theme. You can change the frontend theme (so the 'site theme') but not the admin theme. Possibly this may be enabled again in the future but for now, v2 only supports 'bootstrap 1.0' as admin theme.

willem010 commented 10 years ago

the last part explains why it went wrong on my first attempt.

what i did (at first) .. set site to maintenance just copy all v2 files (including my themes using the same folders) over the v0.7.24 files.. (i should have set the admin theme to something default first, that would have helped) then started the upgrade process

when upgrade was done i was unable to change the theme (thememanager wasnt visible), and the theme i got wasnt working at all. big mess and i needed to set the theme to bootstrap1 using phpamin to get it working again.

this is why i warned about not using that method

.. yeah.. my old site had that risk, that's why i started looking at v2 in the first place.. (skipping 1.0.4) and thats why i was a bit fast in upgrading it to v2

Moc commented 10 years ago

All right, apparently the admin theme did not change to bootstrap 1.0 then (which it should have done, regardless of which admin theme was used before the upgrade). Will look into this.

willem010 commented 10 years ago

i think this was caused by the upgrade not completing due to the old errors (those are solved now.)

btw, you asked why pepople would not update to 1.0.4 in the first place.. well ..

my old site had a lot of adaptations to the original code. updating this would render my own stuff useless again.. and i didnt feel like doing it all again.. and again.. so i left it the way it was.

v1,0.4 didnt really offer the options i needed to get my own code running, with this i would have had to redo a lot of my own stuff, on each upgrade again

but v2 did look promising on this part: using templates and a few rewritten plugins it enables me to do it just once .. . that's why i started creating a v2 theme, adapted and created some plugins .. and here we are .. :P

Moc commented 10 years ago

btw, you asked why pepople would not update to 1.0.4 in the first place.. well..

Gotcha :)

i think this was caused by the upgrade not completing due to the old errors

I just checked and line 26 to 35 in e107_admin/auth.php should set ANY admin theme to the bootstrap one.

// Required for a clean v1.x -> v2 upgrade. 
$core = e107::getConfig('core');        
if($core->get('admintheme') != 'bootstrap' && $core->get('admintheme') != 'bootstrap3')
{
    $core->update('admintheme','bootstrap');
    $core->update('adminstyle','infopanel');
    $core->update('admincss','admin_dark.css');
    $core->set('e_jslib_core',array('prototype' => 'none', 'jquery'=> 'auto'));
    $core->save();  
    e107::getRedirect()->redirect(e_SELF);      
}

Think this issue can be closed :)