All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

EE1 -> EE2 / Low Reorder 1.2.1 -> 2.1.2 Upgrade; All reorder sets missing?

Sandwich 10 Apr 2013 16:35 problem, complete

Doing a test upgrade from EE1.7.1 / Low Reorder 1.2.1 --> EE2.5.5 / Low Reorder 2.1.2, and all the reorder sets are missing. In EE1 I had 2 sets with custom orders.

Did I miss anything?

Replies

  1. Low 10 Apr 2013 17:43

    Did you follow the upgrade instructions? Specifically this bit:

    When upgrading to 2.0, only combos that have settings and a custom order saved at least once are migrated, which could lead to less sets than before. So, when upgrading, make sure the channel/field combos you want to migrate to Sets have their settings/order saved at least once.

  2. Sandwich 10 Apr 2013 19:35

    Not sure TBH. I mean, I know the orders had to have been saved at least once as both sets had non-standard ordering, but I'm not as sure about the settings pages for each set.

    Since this was the first test run of upgrading a client site, I'm taking notes of everything as I go. I've made note of this for the next test run; I just wanted to know if the process was the same as outlined in the instructions for the combo upgrade of both EE and Reorder together, as opposed to just upgrading Reorder from 1.x to 2.x without having the EE1 -> EE2 upgrade in the picture.

  3. Low 10 Apr 2013 19:44

    There should be records present in the exp_low_reorder_settings table before upgrading to LR2. If the table is empty, try saving the settings for each channel/field combo.

    If that still doesn't work, we'll go from there.

  4. Sandwich 10 Apr 2013 19:54

    Ahh, ok. Looking at the live site from which the test run upgrade was cloned, only one of the sets had settings. Perhaps back when the test run clone was created, even that didn't exist.

    In any case, I'll ping you again if I run into any complications on the next runthrough. Thanks, Low!

  5. Sandwich 17 Jun 2013 13:15

    Ok, I'm on the second trial run, and I ensured that there were 2 rows in the exp_low_reorder_settings table in EE1. I installed Low Reorder via DevDemon's Updater, and got PHP Notice "errors":

    ---------------------------------------------------

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: channel_id

    Filename: helpers/low_reorder_helper.php

    Line Number: 183

    ---------------------------------------------------

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: channel_id

    Filename: helpers/low_reorder_helper.php

    Line Number: 183

    ---------------------------------------------------

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: channel_id

    Filename: low_reorder/upd.low_reorder.php

    Line Number: 312

    ---------------------------------------------------

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: channel_id

    Filename: low_reorder/upd.low_reorder.php

    Line Number: 312

    ---------------------------------------------------

     
    {
    "success":"yes",
    "body":"",
    "queries":
    [
    "CREATE TABLE IF NOT EXISTS exp_low_reorder_sets
    (
    set_id int(10) unsigned NOT NULL AUTO_INCREMENT,
    site_id int(4) unsigned DEFAULT 1 NOT NULL,
    set_label varchar(100) NOT NULL,
    set_name varchar(50) NOT NULL,
    set_notes text NOT NULL,
    new_entries enum('append', 'prepend') DEFAULT 'append' NOT NULL,
    clear_cache enum('y', 'n') DEFAULT 'y' NOT NULL,
    channels varchar(255) NOT NULL,
    cat_option enum('all', 'some', 'one', 'none') DEFAULT 'all' NOT NULL,
    cat_groups varchar(255) NOT NULL,
    parameters text NOT NULL,
    permissions text NOT NULL,
    PRIMARY KEY (set_id)
    )
    CHARACTER SET utf8 COLLATE utf8_general_ci;",
    "ALTER TABLE exp_low_reorder_sets ADD INDEX ('site_id')",
    "ALTER TABLE exp_low_reorder_sets ADD INDEX ('set_name')",
    "CREATE TABLE IF NOT EXISTS exp_low_reorder_orders
    (
    set_id int(10) unsigned NOT NULL,
    cat_id int(10) unsigned NOT NULL,
    sort_order TEXT, PRIMARY KEY (set_id,cat_id)
    )
    CHARACTER SET utf8 COLLATE utf8_general_ci;",
    "SELECT *
    FROM ('exp_low_reorder_settings')",
    "SELECT 'field_id', 'site_id', 'field_name', 'field_label', 'field_instructions'
    FROM ('exp_channel_fields')
    WHERE 'field_id' IN ('156', '17') ",
    "SELECT 'channel_id', 'channel_name', 'channel_title', 'cat_group'
    FROM ('exp_channels')
    WHERE 'channel_id' IN (NULL, NULL) ",
    "SELECT 'status_id', 'status'
    FROM ('exp_statuses')",
    "UPDATE 'exp_channel_fields' SET 'field_type' = 'text', 'field_settings' = 'YToxOntzOjE4OiJmaWVsZF9jb250ZW50X3R5cGUiO3M6NDoidGV4dCI7fQ' WHERE 'field_type' = 'low_reorder'",
    "DELETE FROM 'exp_fieldtypes'
    WHERE 'name' = 'low_reorder'",
    "DROP TABLE IF EXISTS 'exp_low_reorder_settings'",
    "INSERT INTO 'exp_extensions' ('class', 'method', 'hook', 'settings', 'priority', 'version', 'enabled') VALUES ('Low_reorder_ext', 'entry_submission_end', 'entry_submission_end', '', 5, '2.1.3', 'y')",
    "INSERT INTO 'exp_extensions' ('class', 'method', 'hook', 'settings', 'priority', 'version', 'enabled') VALUES ('Low_reorder_ext', 'channel_entries_query_result', 'channel_entries_query_result', '', 5, '2.1.3', 'y')",
    "SHOW COLUMNS FROM exp_low_reorder_sets WHERE Field = 'new_entries'",
    "SELECT *
    FROM ('exp_low_reorder_sets')",
    "UPDATE 'exp_modules' SET 'module_version' = '2.1.3' WHERE 'module_id' = '23'"
    ]
    }

    ---------------------------------------------------

    And of course, the Low Reorder module page is empty. :(

    Here's the exp_low_reorder_settings table from EE1:

     

    SQL Query
    SELECT * FROM exp_low_reorder_settings
    Total Results: 2

    Query Result

    weblog_id field_id settings
    15 156 YTo3OntzOjEwOiJjYXRlZ29yaWVzIjtzOjM6ImFsbCI7czo4OiJzdGF0dXNlcyI7czoxOiI2IjtzOjEyOiJzaG93X2V4cGlyZWQiO3M6MToibiI7czoxMToic2hvd19mdXR1cmUiO3M6MToibiI7czoxMDoic29ydF9vcmRlciI7czozOiJhc2MiO3M6MTE6ImNsZWFyX2NhY2hlIjtzOjE6Im4iO3M6MTE6InBlcm1pc3Npb25zIjthOjM6e2k6NztzOjE6IjEiO2k6NjtzOjE6IjAiO2k6OTtzOjE6IjAiO319
    4 17 YTo3OntzOjEwOiJjYXRlZ29yaWVzIjtzOjA6IiI7czo4OiJzdGF0dXNlcyI7czo2OiIxfDE4fDIiO3M6MTI6InNob3dfZXhwaXJlZCI7czoxOiJ5IjtzOjExOiJzaG93X2Z1dHVyZSI7czoxOiJ5IjtzOjEwOiJzb3J0X29yZGVyIjtzOjM6ImFzYyI7czoxMToiY2xlYXJfY2FjaGUiO3M6MToibiI7czoxMToicGVybWlzc2lvbnMiO2E6MTp7aTo3O3M6MToiMSI7fX0=


    Any ideas?

  6. Low 17 Jun 2013 13:41

    Hmm, okay.

    Open up upd.low_reorder.php and go to line #278 (in the latest version). That will read:

    // Return if no settings exist 
    if ( ! empty($rows))
    {


    Below that, add this:

    if ( ! isset($rows[0]['channel_id'])) 
    {
    foreach ($rows AS &$row)
    {
    $row['channel_id'] = $row['weblog_id'];
    }
    }


    ...and try again. I think that should solve it.

    Sandwich 17 Jun 2013 13:48

    Since the exp_low_reorder_settings table has already been dropped, should I do this on the next trial run, or on the current database that's already been modified as shown above (below the PHP Error bits)?

    Low 17 Jun 2013 13:50

    On the next trial run. The update script takes into account coming from a V1 of Low Reorder, but not coming from EE1 (since the EE1 version of Low Reorder was a back-port of the EE2 version...)

    Sandwich 17 Jun 2013 14:03

    Ok, thanks. Are you going to roll those changes in to the next version of Low Reorder?

    Low 17 Jun 2013 14:04

    Yeah, although once you've upgraded, there's no need for that code ever again. :)

    Sandwich 17 Jun 2013 14:05

    Right, thanks Low!

  7. Sandwich 22 Dec 2013 14:14

    Hate to bump this, but I finally was able to do the 3rd trial upgrade, using Low Reorder 2.2.2, and I've run into a new error.

    After upgrading EE 1.7.1 to 2.7.3 and then uploading the new low_reorder folder, I went to the Modules page and saw it said Low Reorder v1.2.1 was installed. I guess this is a combination of the add-on being registered in the database from EE1, and the folder existing now.

    In any case, I clicked on the module to trigger the update script, and got this error:

    Fatal error: Cannot use object of type stdClass as array in /www/system/expressionengine/third_party/low_reorder/upd.low_reorder.php on line 341


    Going back to the modules page still shows 1.2.1 installed, so I think that means that the upgrade function will be triggered next time I click on Low Reorder. So, any new ideas you want me to try? ;)

  8. Low 22 Dec 2013 15:00

    I'll need to take a look myself. Please send SuperAdmin and FTP login credentials to hi at gotolow dot com if you can.