Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jun 2008
    Location
    Bordeaux, France
    Posts
    69
    Plugin Contributions
    6

    Default Re: [not a core ZC bug] zc_install doesnt recognize my 1.3.8 database

    Ok guys, I re-explain in details as you didn't understand all the points. I take a concrete example of upgrading from 1.3.5

    In 'zc_install\includes\classes\class.installer_version_manager.php', the code for checking this version is:
    Code:
    function check_version_135() {
      global $db_test;
      $got_v1_3_5 = false;
      $got_v1_3_5a = false;
      $got_v1_3_5b = false;
    
      //1st check for v1.3.5
      $sql = "select configuration_title from " . DB_PREFIX . "configuration where configuration_key='PRODUCT_LIST_PRICE_BUY_NOW'";
      $result = $db_test->Execute($sql);
      if (ZC_UPG_DEBUG==true) echo "135a-configkey_check PRODUCT_LIST_PRICE_BUY_NOW =" . $result->fields['configuration_title'] . '<br>';
      if  ($result->fields['configuration_title'] == 'Display Product Add to Cart Button (0=off; 1=on; 2=on with Qty Box per Product)') {
        $got_v1_3_5a = true;
      }
    
      //2nd check for v1.3.5
      $sql = "select configuration_title from " . DB_PREFIX . "configuration where configuration_key='PRODUCT_LIST_ALPHA_SORTER'";
      $result = $db_test->Execute($sql);
      if (ZC_UPG_DEBUG==true) echo "135b-configkey_check PRODUCT_LIST_ALPHA_SORTER =" . $result->fields['configuration_title'] . '<br>';
      if  ($result->fields['configuration_title'] == 'Include Product Listing Alpha Sorter Dropdown') {
        $got_v1_3_5b = true;
      }
    
      if (ZC_UPG_DEBUG==true) {
        echo '1.3.5a='.$got_v1_3_5a.'<br>';
        echo '1.3.5b='.$got_v1_3_5b.'<br>';
      }
      // evaluate all 1.3.5 checks
      if ($got_v1_3_5a && $got_v1_3_5b ) {
        $got_v1_3_5 = true;
        if (ZC_UPG_DEBUG==true) echo '<br>Got 1.3.5<br>';
      }
      return $got_v1_3_5;
    } //end of 1.3.5 check
    In our ZC.1.3.8aFR Full, all English text of 'zc_install\sql\mysql_zencart.sql' has been translated to have all config-options displayed in French.

    Here an example for PRODUCT_LIST_ALPHA_SORTER [original, translation]:
    Code:
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Include Product Listing Alpha Sorter Dropdown', 'PRODUCT_LIST_ALPHA_SORTER', 'true', 'Do you want to include an Alpha Filter dropdown on the Product Listing?', '8', '50', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Inclure la liste de classement alphabétique de produits', 'PRODUCT_LIST_ALPHA_SORTER', 'true', 'Voulez-vous inclure la liste de classement alphabétique de produits?', '8', '50', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());
    There NO modification on SQL core, FIELDS names and TABLE names are untouched. Only the text has changed.
    So the function check_version_135() always return FALSE for us (as Polish and Italians I suppose) because of :
    Code:
    if  ($result->fields['configuration_title'] == 'Include Product Listing Alpha Sorter Dropdown') {
      $got_v1_3_5b = true;
    }
    Tests like this one are absolutely english dependant and the db-update process is bad for anyone that has TABLE_CONFIGURE translated.

    QUESTION: Why a test like the following one was not sufficient ?
    Code:
    function check_version_135() {
      global $db_test;
      $got_v1_3_5 = false;
    
      //check for v1.3.5
      $sql = "select project_version_date_applied from " . DB_PREFIX . "project_version_history where project_version_key = 'Zen-Cart Database' and project_version_major='1' and project_version_major='3.5' and project_version_comment='Version Update 1.3.0.2->1.3.5'";
      $result = $db_test->Execute($sql);
      if (ZC_UPG_DEBUG==true) echo "135-date_applied =" . $result->fields['project_version_date_applied'] . '<br>';
      if ($result->RecordCount() > 0) {
        $got_v1_3_5 = true;
        if (ZC_UPG_DEBUG==true) echo '<br>Got 1.3.5<br>';
      }
      return $got_v1_3_5;
    } //end of 1.3.5 check

  2. #12
    Join Date
    Jan 2004
    Posts
    66,385
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: zc_install doesnt recognize my 1.3.8 database

    Quote Originally Posted by gob33 View Post
    Tests like this one are absolutely english dependant and the db-update process is bad for anyone that has TABLE_CONFIGURE translated.
    Okay, I see your point. You had explained it differently the first time.
    I understand now.
    Quote Originally Posted by gob33 View Post
    QUESTION: Why a test like the following one was not sufficient ?
    The inspections look for individual new features added, not merely whether a certain version step was "attempted". We've seen cases where people incorrectly apply upgrade patches, thus resulting in more serious problems caused by skipped statements.

    We will revisit the matter for future upgrades with respect to translations.

    Thanks for your patience.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Jun 2008
    Location
    Bordeaux, France
    Posts
    69
    Plugin Contributions
    6

    Default Re: zc_install doesnt recognize my 1.3.8 database during upgrade (specific languages)

    Ok, now you got it. The first time, I have not looked deeply in the code, just have seen the message 'Your version is 1.3.0.2'. I had also difficulties to explain my ideas in English.

    By making 2 checks only in TABLE_CONFIGURE doesn't mean the full upgrade has been applied too.

    Think of it for future versions (1.3.9?)...
    Last edited by gob33; 21 Nov 2009 at 06:58 PM.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 11
    Last Post: 19 Jan 2016, 03:38 PM
  2. Replies: 4
    Last Post: 5 Dec 2012, 01:45 AM
  3. v151 Upgrade to 1.5 from a 1.3 version error during zc_install
    By marie893 in forum Upgrading to 1.5.x
    Replies: 5
    Last Post: 6 Oct 2012, 04:52 AM
  4. Oops screen disallowing the zc_install to upgrade database.
    By notageek in forum Upgrading from 1.3.x to 1.3.9
    Replies: 8
    Last Post: 19 Nov 2010, 04:44 AM
  5. Doesnt recognize database or missing something?
    By stefanl in forum Upgrading from 1.3.x to 1.3.9
    Replies: 2
    Last Post: 15 Jun 2010, 10:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR