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

    var descriptionHtml = tv.child('.modx-tv-label-description').dom.innerHTML;


    after

    if(description){


    does fix it
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 4172
      • 5,888 Posts
      if you need translated TV-descriptions, you could translate them within a plugin for OnResourceTVFormRender in a loop something like that could work:

              foreach($categories as $key => $category){
                  foreach($category['tvs'] as $tv){
                      $tv->set('description','replace lexicon-tags with lexicon-strings here, may be by modx-parser');
                  }    
              }
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 23018
        • 353 Posts
        Quote from: Bruno17 at Apr 14, 2014, 01:23 PM
        Activating this plugin, I get

        TypeError: tv.child(...) is null
        	
        
        var descriptionHtml = tv.child('.modx-tv-label-description').dom.innerHTML;
        
        ?a=30&id=60 (Zeile 100)
        TypeError: parent.MODx.helpWindow is undefined
        	
        
        parent.MODx.helpWindow.getEl().unmask();


        and the save,duplicate,view,close,help - buttons get not displayed

        What version do you run?

        I'll have a look tomorrow morning.

        Nevermind. In the last update I moved some code around for "better readability". The problem should be fixed now. Please try again.

        Good night. [ed. note: pepebe last edited this post 12 years, 5 months ago.]
          Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
          • 23018
          • 353 Posts
          Quote from: Bruno17 at Apr 14, 2014, 01:42 PM
          moving

          var descriptionHtml = tv.child('.modx-tv-label-description').dom.innerHTML;


          after

          if(description){


          does fix it

          Yeah, this was the problem. Didn't see your reply before I posted the prior post. Thanks for fixing it. Also thanks for the advise on how to handle multilingual captions and descriptions. I really think I should spend some time on this problem as it seems to be a blind spot in MODX manager.
            Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe