Debugging Composer

Vote:
 

Today I came across a situation where I'd developed a simple layout Composer Block, was ready for testing in my local environment - but was unable to catch the error when it came to dropping the Composer Block onto the page. With a little help from the Firebug plugin (and my trusty colleague) the source of the problem was found.

The first step of the testing process involved the usual setting up the permissions for the block, then testing the block within a composer content area. After dropping the block into the content area, I noticed that the block displayed for a couple of seconds then dissapeared. Nothing unusual here, my first and usual step was to go to the Windows Event Log to see what .NET errors had been generated - but no luck there. 

My second step to debugging was to run the site in debug mode from Visual Studio. After running through the same steps, still no luck. 

After consulting my colleague, he showed me a quick trick:

  • Turn on the FireBug add-on in Firefox.
  • Navigate to the "Net" tab and click "Clear".
  • Navigate to the "XHR" view within the Net tab.
  • Drag and drop the composer block.

Hey presto! The error now appeared! Because Composer is using AJAX, the error can be missed by the event log, Visual Studio and the UI of the web site.

My error ended up being something relativaly striaght forward - the reference to the User Control was missing a character and hence the error message, "The file '/Templates/MyProject/Composer/Blocks/Layout/Accordion.ascx' does not exist.", was being returned in the AJAX call and not to the UI.

So, if you ever feel like you're bang out of luck getting a composer block to display, try the above debug tip.

#58582
May 02, 2012 5:33
Vote:
 

you should be able to pick this error up if logging has been enabled as well

#58737
May 02, 2012 17:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.