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

    I’m getting the following error on items in my admin that use the MM tagging widget

    ManagerManager: An error has occurred: ReferenceError - Statement on line 32: Undefined variable: TagCompleter

    have you ever seen this before? it was working fine for days and I haven’t changed anything.

    will set up a sandbox account to login if needed! pm me
      ________

      Anne
      Toad-in-Chief
      Red Toad Media - Web Design, Louisville KY
      Hear me tweet: http://www.twitter.com/redtoadmedia
      "Bring on the imperialistic condiments." - Rory Gilmore
    • I've tried Firebugging it. 
      
      it says I have to post again, the response in Firebug is then:
      
      var $j = jQuery.noConflict();
      // If we haven't yet got the function
      if (typeof(TagCompleter) != 'function') {
      function TagCompleter(tagEntryField, tagIndicatorList, delimiter) {

      var theEntry = $j('#'+tagEntryField);
      var theList = $j('#'+tagIndicatorList);

      // Make sure the elements that have been supplied exist
      if (!theEntry.length) {
      return;
      }

      // Attach events
      // Add hilights every time the tag field changes
      $j(theEntry).change(function(e) { addHilights(); });

      // Add tag every click on a tag in the list
      $j('#'+tagIndicatorList + ' li').click( function(e) { addTag(e); } );

      // Get an array of the current tags in the field
      var getTags = function() {
      // Get the contents of the field
      // Split is by commas
      // Trim each item of whitespace at the beginning and end
      var theTags = $j(theEntry).val().split(delimiter);
      $j.each(theTags, function(i,v) {
      theTags[i] = $j.trim(v);
      if (theTags[i] == '') {theTags.splice(i, 1); } // Remove any empty values
      });
      return theTags;
      };

      // Add the tag that has been clicked to the field
      var addTag = function (e) {
      var newTag = $j.trim($j(e.target).text());
      var oldTags = getTags();

      // Mark the document as dirty for Modx by triggering a "change" event
      $j(theEntry).trigger("change");

      // Is the tag already in the list? If so, remove it
      var thePos = $j.inArray(newTag, oldTags);
      var tagSpacer = (delimiter == ' ') ? '': ' ';
      if (thePos != -1) {
      oldTags.splice(thePos, 1);
      $j(theEntry).val(oldTags.join(delimiter+tagSpacer));
      } else { // Not in the list, so add it
      oldTags.push(newTag);
      $j(theEntry).val(oldTags.join(delimiter+tagSpacer));
      }
      addHilights();
      };

      // Highlight any tags in the tag list which are already in the field
      var addHilights = function() {

      var tagsInField = getTags();

      $j('#'+tagIndicatorList + ' li').each( function() {
      if ($j.inArray($j.trim($j(this).text()) , tagsInField) != -1) {
      $j(this).addClass('tagSelected');
      } else {
      $j(this).removeClass('tagSelected');
      <br /> }<br /> });<br /><br /> };<br /><br /> addHilights();<br /><br /> }<br /><br /> }

      I guess that is where it is choking and then the error is:


      netProgress has no properties
      http://smokymtguitars.com/build/manager/index.php?a=27&id=17
      Line 827

      (?)()()index.ph...=27&id=17 (line 827)
      F()()jquery-1....2.min.js (line 22)
      init()([function(), function(), function(), 1 more...], function(), undefined)jquery-1....2.min.js (line 15)
      F()()jquery-1....2.min.js (line 22)
      F()()

      var tv36_tags = new TagCompleter("tv36", "tv36_tagList", ",");
        ________

        Anne
        Toad-in-Chief
        Red Toad Media - Web Design, Louisville KY
        Hear me tweet: http://www.twitter.com/redtoadmedia
        "Bring on the imperialistic condiments." - Rory Gilmore
      • I found out I had the wrong &tagDocumentID set and thought that had fixed it, but it did not, can’t figure it out, am removing the MM_TagWidbget and doing this another way.
          ________

          Anne
          Toad-in-Chief
          Red Toad Media - Web Design, Louisville KY
          Hear me tweet: http://www.twitter.com/redtoadmedia
          "Bring on the imperialistic condiments." - Rory Gilmore