Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Greasley 15 posts 97 karma points
    Jan 29, 2014 @ 15:06
    David Greasley
    0

    Button OnClick event not firing when deployed

    Hi,

    I have a user control which dynamically loads content using the Item class from the umbraco.presentation.templateControls namespace. I specify a node id and the content from that node will be included in the output of this user control.

                Item item = new Item();

                item.NodeId = widgetNode.Id.ToString();

                item.Field = "widgetContent";

                contentPlaceHolder.Controls.Add(item);

    If the node I am trying to include has a macro within it then none of the OnClick methods from within the macro will fire on my production web server. have tested it on a number of development machines and all works fine.

    I am literally copying all the files from the development machines to the production server so don't think it will be an issue with the umbraco config. 

    Does anyone have any ideas as to why this might be?

    I am using umbraco v 4.9.0 (Assembly version: 1.0.4633.18696)

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jan 29, 2014 @ 15:22
    Ismail Mayat
    0

    David,

    What version of iis on dev and live? Also on live using chrome inspector or firebug do you see any js issues?

    Regards

    Ismail

  • David Greasley 15 posts 97 karma points
    Jan 29, 2014 @ 15:41
    David Greasley
    0

    Hi Ismail, 

    Thanks for your reply.

    Both dev and production environments use IIS7.

    Inspecting both Live and Dev environments using Chrome Inspector show's no JS errors.

     

    Regards,

    David

  • David Greasley 15 posts 97 karma points
    Jan 29, 2014 @ 15:51
    David Greasley
    100

    Right I have figured it out.

    I had setup caching on all macros on the production system to improve performance. As soon as I removed the caching the button OnClick events fired again.

Please Sign in or register to post replies

Write your reply to:

Draft