Crop thumbnail error in IE9

jfriendjfriend Registered Users Posts: 8,097 Major grins
edited March 27, 2011 in Bug Reporting
Did crop thumbnail in IE9 and got this script error:

2011-03-25_1216.png
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 25, 2011
    hm, it just worked for me fine (IE9, Win7 64 bit). Can you post again if this continues to happen?
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 25, 2011
    Andy wrote: »
    hm, it just worked for me fine (IE9, Win7 64 bit). Can you post again if this continues to happen?
    It happens to me every time in IE9 in the gallery I was working it in. This was not just something I saw once. I set 17 cropped thumbnails and got the error every time. I suppose there's a remote possibility it's an interaction with my customization, but I only see the issue in IE9.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 25, 2011
    jfriend wrote: »
    It happens to me every time in IE9 in the gallery I was working it in. This was not just something I saw once. I set 17 cropped thumbnails and got the error every time. I suppose there's a remote possibility it's an interaction with my customization, but I only see the issue in IE9.

    Can I have gallery link and also exact steps - using single crop thumbnail tool.
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 25, 2011
    Andy wrote: »
    Can I have gallery link and also exact steps - using single crop thumbnail tool.

    0) IE9 on Vista
    1) Go here: http://friend.smugmug.com/Sports/Egan-Soccer-2011/Sara/16331812_mEDV9#1228181540_NwNHs.
    2) Select Tools/This Photo/More/Crop Thumbnail.
    3) Set any crop on the thumbnail (I just move a few pixels in on each side)
    4) Hit "Save Crop".
    5) Javascript error occurs


    When I turn on the IE JS debugger, the error occurs in this js (which is embedded in the crop thumbnail page) on the line in red (because btn_status is not a valid object).
    var init = function() {
        var attr = {"imageScale":0.20689655172414,"ratio":"false","minWidth":32,"minHeight":22},
            returnUrl = 'http://friend.smugmug.com/Sports/Egan-Soccer-2011/Sara/16331812_mEDV9#1228181540_NwNHs',
            doneUrl = '/photos/tools/crop.mg?tool=newthumb&ImageKey=NwNHs&ImageID=1228181540&url=http%3A%2F%2Ffriend.smugmug.com%2FSports%2FEgan-Soccer-2011%2FSara%2F16331812_mEDV9%231228181540_NwNHs',
            buttonText = 'Back to Gallery',
            statusHead = 'Updating Thumbnail Image',
            statusBody = 'Updating...',
            buttons = {},
            cropper = new SM.photo.Cropper('crop-photo', attr),
            saveCrop = function(postData) {
                var statusPanel = new YAHOO.widget.Panel('statusPanel',  {
                    width: '500px', 
                    constraintoviewport: false,
                    underlay: 'shadow',
                    close: false,
                    visible: false,
                    draggable: false,
                    modal: true,
                    fixedcenter: false,
                    monitorresize: false
                });
                
                statusPanel.setHeader('<h1>' + statusHead + '</h1>');
                statusPanel.setBody('<div id="sm-crop-status" class="sm-content" style="text-align: center;">' + statusBody + '... <img style="vertical-align: middle;" class="ajaxBusy_small" src="/img/spacer.gif" /></div>');
                statusPanel.setFooter('');
                statusPanel.render(document.body);
        
                statusPanel.center();
                statusPanel.show();
                
                var tx = Connect.asyncRequest('POST', '/rpc/tools.mg', {        
                    success: function(o) {
                        try {
                            var raw = YAHOO.lang.JSON.parse(o.responseText);
                        } catch (err) {
                            return;
                        }
        
                        if (raw.status === 'success') {
                            location.href = doneUrl;
                        } else {
                            var errMsg = '<h3>Oops, something happened and we couldn\'t crop your photo:</h3><ul>';
                            
                            for (var i = 0, len = raw.msg.length; i < len; i++) {
                                errMsg += '<li>' + raw.msg[i] + '</li>';
                            }
        
                            errMsg += '</ul><p>If this problem continues, please contact a <a href="/help/emailreal">SmugMug Support Hero</a>.</p>';
                            
                            statusPanel.setBody('<div id="sm-crop-status" class="sm-content">' + errMsg + '</div>');
                            statusPanel.setFooter('<span id="btn-status" class="yui-button yui-push-button sm-button-prev" style="float: right;"><span class="first-child"><button type="button">' + buttonText + '</button></span></span>');
                            var btn_status = new YAHOO.widget.Button('btn-status', {
                                 onclick: {
                                    fn: function() {
                                    location.href = returnUrl;
                                    }
                                }
                            });
        
                        }
                        
                        [color=red]btn_status.set('disabled', false);[/color]
                    },
                    failure: function(o) {
                        YAHOO.log('call to /rpc/tools.mg failed: ' + o.responseText);
                    },
                    scope: this,
                    timeout: 0
                }, 'method=crop&markup=0&' + postData.join('&'));
                
            };
    
    
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 25, 2011
    jfriend wrote: »
    0) IE9 on Vista

    I just cropped it aggressively so you'd see it - on IE9 Win 64. No error. I can't try it on Vista right now (I'm on the plane home from California), but I'll ask Doc to look!
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 25, 2011
    Andy wrote: »
    I just cropped it aggressively so you'd see it - on IE9 Win 64. No error. I can't try it on Vista right now (I'm on the plane home from California), but I'll ask Doc to look!
    Just so you realize, the crop has been succeeding for me, it just has this error after the crop. I'm going to reset the crop because this is a public gallery.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • docwalkerdocwalker Registered Users Posts: 1,867 SmugMug Employee
    edited March 27, 2011
    John,

    Sorry about that. Its a new known bug. I have a report filed on it.

    --Doc
    SmugMug Support Hero
    http://help.smugmug.com
Sign In or Register to comment.