We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18373 ☆ A M B ☆
    • 3,141 Posts
    Okay, did some debugging, it looks like it's trying to use the ArticlesContainer's processor instead of the modDocument one for whatever reason.. commenting out the first require_once's shows
    Fatal error: Class 'modResourceCreateProcessor' not found in C:\wamp\www\revolution\core\components\articles\model\articles\articlescontainer.class.php on line 487

    It seems to be related to auto loading of packages through the extension_packages setting - if I change the path to articles in there I can use the processors again properly, but obviously Articles wont work.
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      This was my test script:
      <?php
      try {
        $array = array(
          'pagetitle' => 'test',
          'content' => 'stuff',
          'class_key' => 'modDocument',
        );
      var_dump(class_exists('modResourceCreateProcessor'));
      var_dump($modx->processors);
        $result = $modx->runProcessor('resource/create', $array);
      
      }
      catch (Exception $e) {
        echo $e->getMessage();
      }
      
      var_dump($modx->processors);


      Which returned this with no commented lines in articlescontainer.class.php:
      bool(true) 
      array(0) { }
      Fatal error: Cannot redeclare class modResourceCreateProcessor in C:\wamp\www\revolution\core\model\modx\processors\resource\create.class.php on line 606


      and this when I commented out the first bit:

      Fatal error: Class 'modResourceCreateProcessor' not found in C:\wamp\www\revolution\core\components\articles\model\articles\articlescontainer.class.php on line 487

      -> note that it doesn't show my dumps, so it doesnt actually make it to the test snippet - it fails earlier on in the process.

      With the path to Articles changed, here's my output:
      bool(false)
       array(0) { } 
      array(1) { ["C:/wamp/www/revolution/core/model/modx/processors/resource/create.class.php"]=> string(26) "modResourceCreateProcessor" } 

        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 39663
        • 1 Posts
        I found I was missing 6 files in the core/model/modx/processors/template/ directory. After replacing them, everything works fine (so far). But I did install Articles, and uninstalled it without the issue changing, which is why I followed the directory on the log.
          • 18373 ☆ A M B ☆
          • 3,141 Posts
          The problems with runProcessor and Articles have been fixed in 2.2.1.
            Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

            Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.