Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-10874

Error when subscribing to a page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.4.4, 4.5.0
    • None
    • Skin Doc
    • None

      On skin documentation, when subscribing to a page, there is a JS error

      Uncaught TypeError: errors.size is not a function

      Error is in callback function

      function result(data)
                              {
                                   var s = "";
                                   $j('errors error', data).each(function () { s += $j(this).text() + "\n"; });
                                   if (s == "")
                                   {
                                       var errors = $j('error > error', data);
                                       if (errors.size() == 0)
                                       {
                                          registered = !registered;
                                          _update_subscribe_mode();
                                       }
                                       else
                                       {
                                           var errorInfo = "";
                                           $j.each(errors, function(i) {
                                               errorInfo += "\n* " + $j(errors[i]).text();
                                           }); 
                                           alert("<i18n:text i18n:key="PLUGINS_PAGE_SUBSCRIBE_FORM_ERROR_DESCRIPTION"  i18n:catalogue="plugin.page-subscription"/>" + errorInfo)
                                       }
                                   }
                                   else
                                   {
                                       alert(s);
                                   }
                               }
      

            Unassigned Unassigned
            laurence Laurence Aumeunier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: