We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13445 ☆ A M B ☆
    • 18 Posts
    I thought I would reach out to other community members to see if anyone has done this to an larger site.

    Most sites I've built from scratch, at max have 200-400 resources. This particular site has 3000+ resources in Evo 1.0.5, and our client is wanting it upgraded to a Revo site. I've just started to look through the site to understand how it is built in Evo and to replicate the functionality once it's migrated. The vast majority of the snippets look to be saved as static resources and doing raw database queries rather than using plugins or packages.

    I've been reading over the Provisioner package (http://modx.com/learn/modx-college/migrating-from-evo-to-revo/) and it seems straightforward. I am more interested in preserving the template variables and resource content and structure rather than all the snippets. That would save weeks on the site build time for the estimate I am working on.

    So. What can I expect from this move? What are some of the pitfalls, challenges you've come across, that I could look out for? I'd appreciate any advice I could get on this one, as it's pretty new territory for me.

    Thanks!

      Senior Designer at Arketi Group - http://www.arketi.com
      Twitter - @jalterixnar - https://twitter.com/jalterixnar

      “There is no dishonor in failing, only in the failure to try.” – Elder fire dragon Kaernyth
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It all depends on how well organized the existing site is. Badly done javascript, content pasted from Word or poor Tree organization can be just accepted and carried across, or a complete site reorganization and optimization can be done. Assets organization can also come into play; again poorly organized images, js and other supporting files can be left as they are or re-organized.

      If it's just a straight-across conversion, and Provisioner works for you (I've never actually been able to get it to connect properly, but others have) it should go easily enough. Snippets and plugins could be a problem. Revo's xPDO and basic PHP MySQL queries generally aren't compatible; they take different connections to the database. So most of any custom database access queries would have to be re-written.

      Most of the basic add-on snippets are fairly easy to convert to their closest Revo equivalents. I'll insert a suggestion here to take a look at pdoResources (part of the pdoTools package) as a drop-in replacement for getResources as the Ditto analog for Revo. Forms are handled differently, so these will need to be re-done, which would complicate things if forms are AJAX-ified. Galleries will also need to be re-done; personally I much prefer a simple MIGx-based gallery to the available Revo gallery add-ons, although Gallery does have some nice features.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3749
        • 24,544 Posts
        The good news is that once you understand xPDO, it's usually very easy to convert the CRUD code to work with Revolution (and the code is briefer and easier to understand and maintain).

        There's some information here that might help you: http://bobsguides.com/migrating-revolution.html.

        I'm kind of surprised that no one has yet written a pair of snippets: one to export the site_content table in Evo, and another one to import it into Revo.

        I think one reason is that once you start working with Revo code, you don't want to go back (and soon forget how to do things in Evo). wink

        I did port Bob's Guides from Evo to Revo some time ago with Provisioner, which worked very well. The problem is that Provisioner doesn't work with the current versions of Evo and Revo.

        Maybe someone will take the Provisioner code and split it in two parts, one that runs in Evo and writes the site to a file, and another that runs in Revo and imports that file.

        Another way to go would be to import the Evo DB into the Revo DB manually but with a different table prefix (evo_). Then cannibalize the Provisioner code to copy it over to the Revo part of the DB.

        BTW, one thing to try for the content would be to just export the Evo site_content table and import it to the Revo site_content table in PhpMyAdmin. Then run the utility snippet below to retrieve and save every resource. I haven't tried it, but most of the fields are the same and I think most of the new ones (maybe all of them) either have sensible default values, or are populated correctly when you save a resource if they're empty.

        <?php
        /* RevoUpdate snippet */
        $docs = $modx->getCollection('modResource');
        foreach ($docs as $doc) {
            $doc->save();
        }


          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
          • 44258
          • 33 Posts
          Quote from: BobRay at Jul 30, 2013, 11:50 PM
          The good news is that once you understand xPDO, it's usually very easy to convert the CRUD code to work with Revolution (and the code is briefer and easier to understand and maintain).

          There's some information here that might help you: http://bobsguides.com/migrating-revolution.html.

          I'm kind of surprised that no one has yet written a pair of snippets: one to export the site_content table in Evo, and another one to import it into Revo.

          I think one reason is that once you start working with Revo code, you don't want to go back (and soon forget how to do things in Evo). wink

          I did port Bob's Guides from Evo to Revo some time ago with Provisioner, which worked very well. The problem is that Provisioner doesn't work with the current versions of Evo and Revo.

          Maybe someone will take the Provisioner code and split it in two parts, one that runs in Evo and writes the site to a file, and another that runs in Revo and imports that file.

          Another way to go would be to import the Evo DB into the Revo DB manually but with a different table prefix (evo_). Then cannibalize the Provisioner code to copy it over to the Revo part of the DB.

          BTW, one thing to try for the content would be to just export the Evo site_content table and import it to the Revo site_content table in PhpMyAdmin. Then run the utility snippet below to retrieve and save every resource. I haven't tried it, but most of the fields are the same and I think most of the new ones (maybe all of them) either have sensible default values, or are populated correctly when you save a resource if they're empty.

          <!--?php
          /* RevoUpdate snippet */
          $docs = $modx--->getCollection('modResource');
          foreach ($docs as $doc) {
              $doc->save();
          }




          thanks for this .