This project is read-only.


Last try to solve issue 'wrappers should have alternates' is breaking - not solved


This should be reveresd

Many of my pages are broken when I apply it.


CSADNT wrote Nov 7, 2013 at 9:50 PM

After looking at the video of last meeting and hearing that teh Alternate change was finally ok, I tried again pulling 1.7.x.
It still breaks: in fact in my theme the document.cshtml is no more loaded ???
I will try to understand why but my time is actually short to debug (I have my own bugs to....)

CSADNT wrote Nov 7, 2013 at 9:56 PM

I know it is very fast no having simply <html><head></head>then the normal body.
We gain a lot of time without all these css and .js

CSADNT wrote Nov 7, 2013 at 9:57 PM

..very fast now...

sebastienros wrote Nov 7, 2013 at 11:17 PM

Could you provide some repro steps ?

I have tried to put a Dcoument.cshtml in my theme, and it's taken correctly.

CSADNT wrote Nov 7, 2013 at 11:27 PM

Very strange code
        foreach (var wrapperType in wrappers) {
            // clearing wrappers and alternates to prevent infinite loop
            shape.Metadata.Wrappers = new List<string>();
            shape.Metadata.Alternates = new List<string>();
            shape.Metadata.BindingSources = new List<string>();
            shape.Metadata.WrapperType = wrapperType;

            shape.Metadata.ChildContent = Execute(context);

        shape.Metadata.WrapperType = currentWrapperType;
        shape.Metadata.BindingSources = bindingSources;
        shape.Metadata.Wrappers = wrappers;
        shape.Metadata.Alternates = alternates;

CSADNT wrote Nov 8, 2013 at 12:12 AM

I am using also url alternate on layout.cshtml ?
when i revert only the manager class everything get back ok.

sebastienros wrote Nov 8, 2013 at 12:51 AM

Could you please explain what the issue is and give some repro steps ?

sebastienros wrote Nov 8, 2013 at 2:09 AM

Here is some repro steps I would have liked:
  • Enable URl Alternates
  • Create a Layout-url-homepage.cshtml custom layout
  • Go to the home page
The custom layout is used

There is no more layout

pszmyd wrote Nov 8, 2013 at 3:29 AM

@CSADNT This code is not strange, but simply clears up shape metadata when rendering each wrapper shape and finally brings the original values. Wrapper templates need to share the same shape (model) object with the wrapped template. And there are a few properties we don't want to share, but which need to stay intact before and after wrappers are rendered.

Will fix it soon.

CSADNT wrote Nov 8, 2013 at 3:40 AM

Sure I can understand my evaluation and reaction to this problem has been more similar to the one a guy let appear faced with a bloody and gore doom movie just before sleeping than a factual and ordered one..
This Is the side effect of social networks and lack of good politicians.
Time is also shifting.
Sorry. Have you succeeded in the repro you mentionned or is it an example of good p

CSADNT wrote Nov 8, 2013 at 3:41 AM


pszmyd wrote Nov 8, 2013 at 3:43 AM

Fixed in changeset ff67e7917de912680811bd49b4907d570d621323

pszmyd wrote Nov 8, 2013 at 3:49 AM

Everything's back to normal now.

Even more - as a side effect alternates based on URL, as well as alternates based on zone/content type (for widget-related shapes) are also applied to wrappers! In other words - you can now have eg. Document-url-homepage.cshtml or Widget.Wrapper-RecentBlogPosts-AsideFirst.cshtml.

CSADNT wrote Nov 8, 2013 at 3:55 AM

@Piotr thanks.
I had understood that your code was something as pushing/restoring a context but not wrapped in an 'official method'.
Do you think your change could impact other modules implementing additional alternates ?

CSADNT wrote Nov 8, 2013 at 9:04 AM

Ok I checked and its running fine now thanks again.

sebastienros wrote Nov 8, 2013 at 8:12 PM

The changes have been reverted, it was too risky for a minor version. This work will happen on a separate branch based on 1.x

CSADNT wrote Nov 12, 2013 at 10:49 AM

Good choice because I just realized my site have lost their dedicated login page ....