Cannot create a new copy site

Feb 2, 2015 at 9:11 AM
When i create a new copy site, it occurs error:
 Server Error in '/' Application.
Collection was modified; enumeration operation may not execute.
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: Collection was modified; enumeration operation may not execute.

Source Error:


Line 36:             if (options.SiteId.HasValue)
Line 37:             {
Line 38:                 _cloneSiteService.CloneData(site, options);
Line 39:             }
Line 40:         }
if i dont choose copy site, when i go to new site and i will receive error:
Server Error in '/' Application.
Cannot find
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.Web.HttpException: Cannot find

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Coordinator
Feb 2, 2015 at 11:19 AM
What version of Mr CMS are you running?
Feb 3, 2015 at 2:13 AM
I downloaded Mr CMS 0.4.3 source here: http://mrcms.codeplex.com/releases/view/137420
Coordinator
Feb 3, 2015 at 12:48 PM
I have just downloaded a fresh copy of Mr CMS and cloned the basic site OK.

When you click add site, are you choosing to clone everything from another site? How bespoke is your project?
Coordinator
Feb 3, 2015 at 1:13 PM
If it's still there, look in your logs (/admin/log), and there may be some more info, as the line you've posted isn't a collection being enumerated, but something inside of that stack trace will be. If you can spot anything, that'd help get to the bottom of the problem a bit quicker.

I'll have a bit poke about to see if I can spot anything obvious, and get back if I do.
Coordinator
Feb 3, 2015 at 1:33 PM
Can you try updating the AssignLayoutAreaToLayout class in MrCMS.Events to the following and see if this solves your issue?
public class AssignLayoutAreaToLayout : IOnAdding<LayoutArea>
    {
        public void Execute(OnAddingArgs<LayoutArea> args)
        {
            var layoutArea = args.Item;
            var layout = layoutArea.Layout;
            if (layout == null)
                return;

            if (!layout.LayoutAreas.Contains(layoutArea))
            {
                layout.LayoutAreas.Add(layoutArea);
                args.Session.SaveOrUpdate(layout);
            }
        }
    }
I think that may be modifying the collection (layout.LayoutAreas) as it's being looped over, causing the problem you're seeing. If it is, I'll put it in as a fix. Even if it's not, I should probably do that anyway...
Feb 5, 2015 at 5:06 AM
yes. also the same qustion.

add a homepage.and logs :
Message Child actions are not allowed to perform redirect actions.
Detail System.Web.HttpException (0x80004005): 执行处理程序“System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper”的子请求时出错。 ---> System.InvalidOperationException: Child actions are not allowed to perform redirect actions.