We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52254
    • 7 Posts
    First time user of MODX and just launched my first install. Just to let you know that I am using XAMPP and have installed this locally.

    What I am facing is that when I install the TinyMCE add-on and then click "Home" (or any other page) I am met with an error:

    Fatal error: Call to a member function get() on array in C:\xampp\htdocs\modx\manager\controllers\default\resource\resource.class.php on line 152

    I can install other add-ons just fine. But every time I download and install TinyMCE I get this error when I click on any page on the left side.

    How can I fix this.

    Kevin
      • 52254
      • 7 Posts
      I should also let you all know now that this is only happening with the GIT install version. It doesn't happen with the downloaded "basic installation" version.
        • 42562
        • 1,145 Posts
        What TinyMCE Extra are you using?
          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • 52254
          • 7 Posts
          Its TinyMCE 4.3.3-pl from splittingred.

          I should also state that after rolling back to the GIT install version 2.4 there is no error. It is only happening on the GIT install version 2.5 with TinyMCE
            • 42562
            • 1,145 Posts
            My suggestion is to move on - no need sitting in a version that is harmful.

            https://modx.com/extras/package/tinymcewrapper (instant joy!)

            https://modx.com/extras/package/tinymcerichtexteditor
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 52254
              • 7 Posts
              That is not an option. This is not my personal sight. This is a corporations website that has about 10 sub sites all using MODX 2.4 and TinyMCE 4.3.3 extra by splittingred. Now they want to upgrade all the sites to 2.5 and continue using TinyMCE since all the contributors which range from 15-20 people that have no coding knowledge are familiar with the look, style and feel of TinyMCE. And this company is very picky. But what the don't do is enjoy things that don't work properly or stay broken.

              All the installs are the GIT install version and will be updated through GIT to 2.5. But once that happens it will break all the sites right? Right..They will not use another version of TinyMCE. Use another extra doesn't seem like a fix for a product that obviously has some errors in the code (MODX GIT version 2.5 not TinyMCE). Something needs to be fixed in that version of MODX.

              And now what I am wondering is why there is an obvious bug (or a conflict) in that version of MODX that needs to be fixed but no one has commented about that. Who knows if other add-ons cause the same error.

              If this bug doesn't get fixed my company will more that likely move everything to WordPress (since I am a WordPress and Drupal developer) and I will have retrain everyone in a more stable CMS. Which so far based on this install Wordpress seems to be. Since all I did was a GIT install and added TinyMCE and the boom it broke. Not very good folks. The fact is I would rather use MODX but with this happening it makes it hard for me to accept it as being stable. [ed. note: agon024 last edited this post 7 years, 11 months ago.]
              • That's a really weird error. Can you just confirm the mentioned file/line number there is the first line in the firePreRenderEvent method?

                If so, it's having issues getting the resource ID which is really odd, especially when it is apparently triggered by adding tinymce to the mix. That part of the core hasn't changed much since 2014 and i don't think tinymce has either, so that sounds like an interesting problem to debug right there...
                  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.
                • I did a bit of testing and can confirm this issue on my local 2.5 install... narrowed it down to core/components/tinymce/tinymce.class.php line 229. Commenting out that line, and the error is gone.

                              $this->config['resource'] = $this->config['resource']->toArray();


                  $this->config['resource'] is being set in the initialisation of the Tiny class in the plugin, which passes $scriptProperties to the $config in the constructor. So $scriptProperties['resource'] is the resource object from the system event. Perhaps something subtly changed where that system event is being called that is causing that line to cause an error later on?

                  (So far though I've been unable of finding any changes related to the event being fired in manager/controllers/default/resource/resource.class.php line 205 or the invokeEvent method in core/model/modx/modx.class.php line 1564 that could explain why it's broken in 2.5.)

                  I'll echo donshakespeare though in recommending to upgrade to one of the newer RTEs as the one you're using now is really old and not really maintained anymore. There are several options including TinyMCE RTE, TinyMCE Wrapper, CKEditor and Redactor as a paid option by my company.

                  Surely retraining 15-20 people to use the same system but a slightly different RTE is a much better option than retraining 15-20 people on a completely different platform and a different RTE? wink [ed. note: markh last edited this post 7 years, 11 months ago.]
                    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.
                    • 52254
                    • 7 Posts
                    Mark Hamstra, donshakespeare thanks for the info. I didn't realize how out of date that extra is. Like I said this is my first time using MODX. But honestly after looking at TinyMCE Wrapper it looks like donshakespeare did a seriously good job designing that. We are going to start using that now and I will spend the weekend learning how to use it so I can show the other developers. Thanks you all your guys' help. I really appreciate it.

                    Kevin