Options

Popular and Keyword galleries

AllenAllen Registered Users Posts: 10,011 Major grins
edited April 2, 2010 in Bug Reporting
These two galleries are locked in single image and changing style to
"Smugmug" in style picker does not work. FF3.5.8 IE8 Flock

Only Pop gallery has style picker.

Firebug error
SM.pageDetails.Album is undefined
http://www.photosbyat.com/include/js/gallery_ajax-min-20100306103928.js
Line 51

Also noticed not all js is working, not inserting buy option in drop.
Al - Just a volunteer here having fun
My Website index | My Blog

Comments

  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 6, 2010
    Which two galleries, Allen?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited March 6, 2010
    jfriend wrote:
    Which two galleries, Allen?
    Popular and keyword.

    Your pop gallery shows the same single image view although Smugmug is checked in style drop.
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 6, 2010
    Thanks - We're aware and will fix, stay tuned.
  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 6, 2010
    Allen wrote:
    Popular and keyword.

    Your pop gallery shows the same single image view although Smugmug is checked in style drop.
    Allen, this is likely unrelated, but I noticed you have a JS error on this page, you have a JS error caused by an older version of the slideshow customization here. The latest version of the code on that page will not cause this error. Probably unrelated to the issue you posted about, but is something worth fixing.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited March 6, 2010
    Andy wrote:
    Thanks - We're aware and will fix, stay tuned.
    Whew .. little things like this can get to ya :D Thanks
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited March 6, 2010
    jfriend wrote:
    Allen, this is likely unrelated, but I noticed you have a JS error on this page, you have a JS error caused by an older version of the slideshow customization here. The latest version of the code on that page will not cause this error. Probably unrelated to the issue you posted about, but is something worth fixing.
    Thanks John, changed to new js and error cleared. thumb.gif

    btw, is this related of the lost drop under the purchase option button?
    Didn't show up after updating js.
    Existing in bottom js, made no change to this
    // http://www.dgrin.com/showthread.php?t=107735&highlight=button
    .onContentReady('buyButton', function() {YAHOO.widget.Button.getButton("buyButton").set("label", "Purchase Options");});
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited March 6, 2010
    fixed
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited March 6, 2010
    Andy wrote:
    fixed
    Wow!! That was fast. Super response time.clap.gif
    Now just have to figure why I lost part of the drop under the buy button.:D
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 6, 2010
    Allen wrote:
    Wow!! That was fast. Super response time.clap.gif
    Now just have to figure why I lost part of the drop under the buy button.:D
    It's some kind of timing issue. Smugmug apparently changed the timing of when the buy button is created and it isn't created yet when your script runs and tries to modify it so the script ends up doing nothing. I'll have to look into this later (don't have time right now) to see what can be done to fix it.

    It's a general symptom of something I've mentioned to Smugmug several times before. They don't provide us customizers any page level event when they are done modifying the page so we have a hard time finding a reliable way to make modifications AFTER they are done creating the page. The more things they start creating with JS (like the buyButton), the worse the problem gets. The fact that this used to work fine and now no longer works (probably because of some innocent change on either their end or your end) is an indication of why we need a better way to know when they're done modifying/building the page.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    nyteshadenyteshade Registered Users Posts: 10 Big grins
    edited March 6, 2010
    Timing issue with buy button after packages
    Packages require some dynamic checks to determine how to render the buy button. In the future I can make this fire if you subscribe late but for the mean time, try adding the following to your code.
    [FONT=Courier New]SM.util.RequestManager.getInstance().on('BuyButton.onComplete', function() {
      // your code here
    });
    [/FONT]
    
    Currently this function will only execute for you if your code subscribes before the BuyButton ajax rpc completes. So write the code that goes in the function accordingly.

    Gabriel
    jfriend wrote:
    It's some kind of timing issue. Smugmug apparently changed the timing of when the buy button is created and it isn't created yet when your script runs and tries to modify it so the script ends up doing nothing. I'll have to look into this later (don't have time right now) to see what can be done to fix it.

    It's a general symptom of something I've mentioned to Smugmug several times before. They don't provide us customizers any page level event when they are done modifying the page so we have a hard time finding a reliable way to make modifications AFTER they are done creating the page. The more things they start creating with JS (like the buyButton), the worse the problem gets. The fact that this used to work fine and now no longer works (probably because of some innocent change on either their end or your end) is an indication of why we need a better way to know when they're done modifying/building the page.
    Gabriel Harrison
    SmugMug Sourcerer
  • Options
    AllenAllen Registered Users Posts: 10,011 Major grins
    edited March 6, 2010
    nyteshade wrote:
    Packages require some dynamic checks to determine how to render the buy button. In the future I can make this fire if you subscribe late but for the mean time, try adding the following to your code.
    [FONT=Courier New]SM.util.RequestManager.getInstance().on('BuyButton.onComplete', function() {
      // your code here
    });
    [/FONT]
    
    Currently this function will only execute for you if your code subscribes before the BuyButton ajax rpc completes. So write the code that goes in the function accordingly.

    Gabriel
    Thanks, worked like a charm.thumb.gif
    Al - Just a volunteer here having fun
    My Website index | My Blog
  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 7, 2010
    nyteshade wrote:
    Packages require some dynamic checks to determine how to render the buy button. In the future I can make this fire if you subscribe late but for the mean time, try adding the following to your code.
    [FONT=Courier New]SM.util.RequestManager.getInstance().on('BuyButton.onComplete', function() {
      // your code here
    });
    [/FONT]
    
    Currently this function will only execute for you if your code subscribes before the BuyButton ajax rpc completes. So write the code that goes in the function accordingly.

    Gabriel
    Gabriel, thanks for solving this particular problem. It sounds like you understand the predicament we're in when trying to customize pages using JS. Is there any sort of plan to make a consistent, documented and cross-browser safe way that we can use to customize things that you are dynamically adding to the page?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    RogersDARogersDA Registered Users Posts: 3,502 Major grins
    edited March 7, 2010
    How does one implement this? Put all Top Javascript in place of the "//your code here"?
    SM.util.RequestManager.getInstance().on('BuyButton.onComplete', function() {
    // your code here
    });
  • Options
    jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited March 7, 2010
    RogersDA wrote:
    How does one implement this? Put all Top Javascript in place of the "//your code here"?
    You put javascript in there that is trying to modify the buy button. This code is specific to the buy button only. No need to change anything else.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • Options
    nyteshadenyteshade Registered Users Posts: 10 Big grins
    edited April 2, 2010
    All the old customizations for the buy button should start working as they did before packages launched. The ajax call has been removed. Sorry for any inconvenience. My interim solution using the RequestManager will no longer function as its not used on that page.
    jfriend wrote:
    You put javascript in there that is trying to modify the buy button. This code is specific to the buy button only. No need to change anything else.
    Gabriel Harrison
    SmugMug Sourcerer
Sign In or Register to comment.