You're on the home page :) From: Chris Bower [mailto:[email protected]] Sent: Tuesday, February 15, 2011 2:08 PM To: [email protected] Subject: Re: Common Areas of a Site
Figured it out, and wrote a blog post on how to accomplish what we're doing here: http://chrisbower.com/2011/02/15/orchard-shape-wizardry/ From: Chris Bower <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Tue, 15 Feb 2011 11:07:39 -0800 To: <[email protected]<mailto:[email protected]>> Subject: Re: Common Areas of a Site Also, whenever I first start the application after making a code change as long as the offending code is still in place, this exception gets thrown at first launch every time: TransactionScope nested incorrectly. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: TransactionScope nested incorrectly. Source Error: Line 41: Line 42: Logger.Debug("Final work for transaction being performed"); Line 43: _scope.Dispose(); Line 44: Logger.Debug("Transaction disposed"); Line 45: } From: Chris Bower <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Tue, 15 Feb 2011 11:02:48 -0800 To: <[email protected]<mailto:[email protected]>> Subject: Re: Common Areas of a Site This is continuing to be quite baffling: I set some breakpoints around other data calls being made in the same request lifetime, as well as on the dispose method on the transaction manager. The following call (which is throwing the error) is being called immediately after another one of my data calls, and before the transaction is disposed: _contentManager.Query(VersionOptions.Latest, "Case").Join<CasePartRecord>().Where(c=>c.IsFeatured == true).OrderBy(c=>c.Priority); Yet I'm still getting the operation is not valid exception. From: Chris Bower <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Tue, 15 Feb 2011 10:15:51 -0800 To: <[email protected]<mailto:[email protected]>> Subject: Re: Common Areas of a Site Well, Bertrand and I figured out a solution that more or less accomplishes what I was trying to do over IRC, which I'll blog about as soon as I get it working. However, right now I'm getting a strange issue whenever I try to access any data using this method. I'm basically using the OnCreated event of a shape from a IShapeTableProvider description to try to pass data down to a shape. When I do though I get the following error: [TransactionException: The operation is not valid for the state of the transaction.] System.Transactions.TransactionState.EnlistVolatile(InternalTransaction tx, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions, Transaction atomicTransaction) +44 System.Transactions.Transaction.EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions) +178 NHibernate.Transaction.AdoNetWithDistrubtedTransactionFactory.EnlistInDistributedTransactionIfNeeded(ISessionImplementor session) +276 NHibernate.Impl.AbstractSessionImpl.EnlistInAmbientTransactionIfNeeded() +237 NHibernate.Impl.AbstractSessionImpl.CheckAndUpdateSessionStatus() +232 NHibernate.Impl.SessionImpl.get_Batcher() +15 NHibernate.Loader.Loader.GetResultSet(IDbCommand st, Boolean autoDiscoverTypes, Boolean callable, RowSelection selection, ISessionImplementor session) +245 NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +186 NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +70 NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +141 From: Michael Cramer <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Mon, 14 Feb 2011 22:06:41 -0800 To: <[email protected]<mailto:[email protected]>> Subject: Re: Common Areas of a Site This sounds a lot like what I was trying to do with containers which I had to edit the ItemController.cs in Orchard.Core, but I could not find a better way to get the shape to the razor view. He wants to use a razor view to rendor his shape and to inject the shape into another area of the layout, but he needs to pass the data to the proper shape from the controller that creates it and has access to the data he wants. Here is a link to a discussion where we are talking about this: http://orchard.codeplex.com/discussions/245584 --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>.--- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]<mailto:[email protected]>. To unsubscribe send a blank email to [email protected]<mailto:[email protected]>. --- You are currently subscribed to orchard-discuss as: [email protected]. To unsubscribe send a blank email to [email protected].
