Jump to content
  • Importing an exported theme crashes


    I downloaded a theme, deleted it, then uploaded it and crashed the system

    I did not get a screenshot of it, but the theme is not restorable.

    Here is the system log entry:

    INSERT INTO `core_themes` ( `set_by_skin_gen`, `set_editor_skin`, `set_order` ) VALUES ( 0, 'ips', 1 )
    IPS\Db\Exception: Unknown column 'set_by_skin_gen' in 'field list' (1054)
    #0 /home/community/system/Db/Db.php(1010): IPS\Db->preparedQuery('/*everybum_devc...', Array)
    #1 /home/community/system/Patterns/ActiveRecord.php(511): IPS\Db->insert('core_themes', Array)
    #2 /home/community/system/Node/Model.php(2815): IPS\Patterns\ActiveRecord->save()
    #3 /home/community/system/Theme/Theme.php(1201): IPS\Node\Model->save()
    #4 /home/community/applications/core/modules/admin/customization/themes.php(358): IPS\Theme->save()
    #5 /home/community/system/Dispatcher/Controller.php(128): IPS\core\modules\admin\customization\themes->upload()
    #6 /home/community/system/Node/Controller.php(117): IPS\Dispatcher\Controller->execute()
    #7 /home/community/applications/core/modules/admin/customization/themes.php(112): IPS\Node\Controller->execute()
    #8 /home/community/system/Dispatcher/Dispatcher.php(169): IPS\core\modules\admin\customization\themes->execute()
    #9 /home/community/admin/index.php(15): IPS\Dispatcher->run()
    #10 {main}

    User Feedback

    Recommended Comments

    All Astronauts

    Posted

    Legit bug.

    'by_skin_gen' is a 4x database column in the themes table that gets removed in 5x upgrades and is not present in new installs.

    When you upload a theme the system initializes a new theme prior to reading in the uploaded stuff and it inits it with that column variable.

    When it saves this new blank theme you get your error since that column does not exist to stick stuff into any more.

    /* Create a default theme */
    $theme = new Theme;
    $theme->by_skin_gen  = 0;
    $theme->editor_skin	 = 'ips';
    $theme->order        = $max + 1;
    $theme->save();

    Line 355 and another by_skin_gen instance at 435 in core/modules/admin/customization/themes.php

    Easy fix/es but you are stuck until the next beta unless you want to hack the lines out manually (provided you are not on CIC).


×
×
  • Create New...