We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36604
    • 268 Posts
    Hi,

    I yesterday upgraded my production web site from 2.2.14 to 2.5, doing aaallll the way long from 2.1.15, 2.2.16, 2.3.6, 2.4.4 and 2.50.

    Each steps went ok and I tested each time the manager and the frontend (with Babel)
    All was ok.

    However we use a specific snippet (done by a partner used to synchronize an Openerp (Odoo) catalog to a custom database in my web server.
    Another specific snippet deal with online search into the ~160K articles list and display then with a specific price for registered partners depending on a type of partner (defined into Odoo) the sniped find for the current logged in modx user.
    This is working since 2013.
    Data from the modx users are imported each night into our specific DB.

    And today this online catalog was just 'empty'.
    We realized, in fact, there was NO MORE finding of the type of user, so the snippet is not able to display the correct price list, meaning NOTHING is returned on frontend.

    Downgrading Modx to 2.4.4 (I'm using a DB duplication and a rsync of all the modx trees, so I can swith easely to any version)
    Everything came back on.

    This indicates in 2.50, something is actually different around modx users ..but ..what ?

    thank you
    here's the snippet used in frontend.

    ########################################################################
    # snippet [[tarif_id]] 
    # retourne le tarif-id de l'utilisateur ou "1"
    ########################################################################
    $base2 = $modx->getOption('base2');
    
    $value=1;
    
    $utilisateurid =$modx->user->get('id'); //$modx->getLoginUserId();
    
    if ($utilisateurid){
      $rs = $modx->query( "SELECT tarif_id from  $base2.user_tarif  where user_id=".$utilisateurid);
    
      if($rs) {
      $row= $rs->fetch(); 
      $value = $row[0];
       }
    }
    $modx->setPlaceHolder("tarif_id", $value);
    
    return $value;


    And attached is the majsql, a part of the sql routine used, just in cas some guru had an ideea.


      • 3749
      • 24,544 Posts
      DB changes are often done in the major versions, so it might have worked to upgrade to 2.3.0 and 2.4.0 first. That said, I'm not aware of any changes to the modx_users table.

      You might try deleting all files in the core/cache directory, turning off the compress_js and compress_css System Settings, and clearing your browser cache and cookies. Sometimes stuff left in the caches can mess things up after an upgrade.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 36604
        • 268 Posts
        hi
        thx

        That's what I did .

        I upgraded from 2.2.14 to 2.2.15, 2.2.16, 2.3.6, 2.4.4 and 2.50.

        caches were all times deletes within ssh (rm -rf *)

        local cache and cookies have nothing to do with the planned cron job running on the server itself (out of modx) the sql program at night.(see the attached 'majsql')
        • The createdon column was added in the user table. That should be all in 2.5

          In 2.5.1 some xpdo schema changes are done, because of MySQL compatibility.
          • But maybe your query code with modx->query and modx->fetch is not valid anymore.

            Look in the docs, how an xpdo query is created and switch to that access method.