Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-9997

Backport 9955 to 10.2 - Image upload functionality is completely broken & can't upload any new image in cms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.1
    • Component/s: None
    • Labels:
    • Similar issues:
    • Story Points:
      1
    • Sprint:
      Tiger Sprint 125

      Description

      Steps to reproduce:-->
      1.Go to images in content perspective.
      2.Click on "Add image" from context perspective.
      3.Notice below javascript error in console
      4.Now try to select a new image by clicking on "select files"
      5.Nothing happens.

      Note:-->This problem affects the CMNG feature branch as well.Cannot test some usecases related to images.
      ---------------------------------------

      Wicket.Ajax:  Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: TypeError: $(...).fileupload is not a function, text: (function(){var element = document.getElementById("id6ff");
      var settings = new Object();
      settings.minWidth=200;
      settings.minHeight=200;
      settings.className="hippo-dialog";
      settings.width=475;
      settings.height=375;
      settings.resizable=false;
      settings.widthUnit="px";
      settings.heightUnit="px";
      settings.element=element;
      settings.title="Add image(s) to the gallery";
      settings.mask="semi-transparent";
      settings.autoSize=false;
      settings.unloadConfirmation=true;
      settings.onClose = function() { Wicket.Ajax.ajax({"c":"id53","u":"./?1-1.IBehaviorListener.1-dialog"}); };
      settings.titleTooltip = "Add image(s) to the gallery";
      Wicket.Window.create(settings).show();
      })();(function(){Wicket.Ajax.ajax({"c":"id6c3","u":"./?1-1.IBehaviorListener.0-root-tabs-panel~container-cards-2-panel-left-sections-list-2-section~view-extension.tree-tree-i-1-link","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"id6c4","u":"./?1-1.IBehaviorListener.0-root-tabs-panel~container-cards-2-panel-left-sections-list-2-section~view-extension.tree-tree-i-1-nodeLink","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"id6c5","u":"./?1-1.IBehaviorListener.0-root-tabs-panel~container-cards-2-panel-left-sections-list-2-section~view-extension.tree-tree-i-1-contextLink","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"id703","u":"./?1-1.IBehaviorListener.0-dialog-content-form-buttons-2-button","e":"click"});})();(function(){Wicket.Ajax.ajax({"sc":"buttons:2:button","c":"id703","mp":true,"u":"./?1-1.IBehaviorListener.1-dialog-content-form-buttons-2-button","e":"click","f":"id702","bh":[function(attrs){$('#id703').prop('disabled', true);}],"m":"POST","coh":[function(attrs, jqXHR, textStatus){$('#id703').prop('disabled', false);}]});})();(function(){/*
       * Copyright 2014-2015 Hippo B.V. (http://www.onehippo.com)
       *
       * Licensed under the Apache License, Version 2.0 (the "License");
       * you may not use this file except in compliance with the License.
       * You may obtain a copy of the License at
       *
       *  http://www.apache.org/licenses/LICENSE-2.0
       *
       * Unless required by applicable law or agreed to in writing, software
       * distributed under the License is distributed on an "AS IS" BASIS,
       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       * See the License for the specific language governing permissions and
       * limitations under the License.
       */
      
      /* global $, window */
      
      (function () {
        'use strict';
      
        /**
         * Notifies Wicket that the selection changed
         */
        function notifySelectionChange(numberOfValidFiles, numberOfSelectedFiles) {
          var url = './?1-1.IBehaviorListener.2-dialog-content-form-uploadPanel';
          Wicket.Ajax.get( {
            u: url + "&numberOfValidFiles=" + numberOfValidFiles + "&numberOfSelectedFiles=" + numberOfSelectedFiles
          });
        }
      
        /**
         * Notifies Wicket that all files have been uploaded
         */
        function notifyUploadDone(numberOfFiles, error) {
          var url = './?1-1.IBehaviorListener.1-dialog-content-form-uploadPanel';
          Wicket.Ajax.get( {
            u: url + "&numberOfFiles=" + numberOfFiles + "&error=" + error
          });
        }
      
        $('#fileUploadToolbar').fileupload({
          messages: {
            maxNumberOfFilesWidget: 'Maximum number of files exceeded. Please remove extra files.',
            maxFileSize: "File is too large. The maximum allowed file size is 4.0MB",
            acceptFileTypes: "Extension is not allowed. Allowed extensions are (jpg, jpeg, gif, png, svg)"
          },
          autoUpload: false,
          url: './?1-1.IBehaviorListener.0-dialog-content-form-uploadPanel',
          onUploadDone: notifyUploadDone,
          onSelectionChange: notifySelectionChange,
          maxTotalFiles: 25,
          maxFileSize: 4194304,
          acceptFileTypes: /(\.)(jpg|jpeg|gif|png|svg)$/i,
          dataType: 'json',
          previewMaxWidth: 32,
          previewMaxHeight: 32
        });
      })();
      
      })();(function(){Hippo.ContextMenu.hide('document.body');})();(function(){$('#id10903d2540b1cbfa71591aa557fcfb78').removeClass('invalid');})();(function(){$('#id59ba3900f2b8ffd1e8d9d9239dad4554').removeClass('invalid');})();(function(){$('#id98e22d7d9533a6912577aed9044d647b').removeClass('invalid');})();(function(){$('#id9306fb12520d78a59f763c7c48184c7e').removeClass('invalid');})();(function(){$('#id8e58973083d19d5b9b98df51ab24336').removeClass('invalid');})();(function(){$('#idbe91c9e4ac70fe913615ded611587b1a').removeClass('invalid');})();(function(){$('#id67d7a8c50c2e8a16fdb4189b0a39678b').removeClass('invalid');})();(function(){$('#id9a6b3c04a6eca848c08899fd6fd1bf82').removeClass('invalid');})();(function(){$('#id57c1ce75eb35b0667427c6f39f211b67').removeClass('invalid');})();(function(){$('#idd59e11d3f3ff44793e8c0b65e8a7c289').removeClass('invalid');})();(function(){$('#ide3600ce0a98370bc94835af4e0018cca').removeClass('invalid');})();(function(){$('#id46f69011dbe819780be517f6375d6ca4').removeClass('invalid');})();(function(){$('#idc9abfa6b1459e46d951d1ce8e519276c').removeClass('invalid');})();(function(){$('#idaea7a1a2a1e7227594a5bcce40582f19').removeClass('invalid');})();(function(){$('#id3a574359d12787a7c6a837f23384983f').removeClass('invalid');})();(function(){$('#id18b427e688d7314cbdca550f1597732b').removeClass('invalid');})();(function(){$('#idcbdc309f0cd82ff024cad777ab86a402').removeClass('invalid');})();(function(){$('#id67df30aebf61b51cde00cca3f74e9dc7').removeClass('invalid');})();(function(){$('#id6e4a5f268e22218c6ffd8bd208c0d420').removeClass('invalid');})();(function(){YAHOO.hippo.TreeHelper.render('id6e');})();(function(){function initid701() {
      	shortcut.add("Enter",function() {
      		
      		document.getElementById('id701').click();
      	},{
      	'disable_in_input':false,
      	'type':'keydown',
      	'propagate':false,
      	'target':document
      	
      	});
      }
      initid701();
      
      
      })();(function(){function initid703() {
      	shortcut.add("Escape",function() {
      		
      		document.getElementById('id703').click();
      	},{
      	'disable_in_input':false,
      	'type':'keydown',
      	'propagate':false,
      	'target':document
      	
      	});
      }
      initid703();
      
      
      })();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pgupta Pankaj Gupta (Inactive)
                Reporter:
                jsheriff Junaidh Kadhar Sheriff
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: