Umbraco bugging out from time to time (Can't explain better in title)
Hello everyone,
I came across a problem a few times and each time it's stopping me a few days from accomplishing the things I need to accomplish. Here's the most recent example that actually got me pissed off.
I'm on a tight schedule and I have this code (using Nested Content this time):
@inherits Umbraco.Web.Mvc.UmbracoViewPage
@using blabla.Web.Models;
@{
Layout = "MasterPage.cshtml";
}
@Html.Partial("_HomePageHeroBlock")
@*items collection*@
@foreach (var item in Model.GetPropertyValue<IEnumerable<IPublishedContent>>("custFeedback2"))
{
//this takes the partial view name
var partialViewName = "_" + item.DocumentTypeAlias;
if (partialViewName == "_contactForm")
{
//if it matches the contact form name then render the contact form in a specific way with a specific model
{Html.RenderPartial("_ContactForm", new BrochureRequestFormModel());}
}
else
{
//if it doesn't, then render the partial this way
@Html.Partial(partialViewName, item);
}
}
Here's what happened. I tried doing that on Friday, but the outcome is going successfully through my code (I used breakpoints to check) and then it was deciding to render ONLY the contact form. For absolutely no reason.
I tried cleaning the solution, building again, rebuilding, closing and opening Visual Studio, restarting the pc, threatening it, crying, performing satanic rituals, summoning Cthulu and the outcome was always the same. It would just freaking render ONLY the contact form.
Eventually I gave up. I just went home. Came back today, opened the solution, BOOM works as intended. I've came across this problem a few times throughout the last years and I still don't know how to fix it on time. It almost threw me off my deadlines.
Just to check... you weren't in Preview view were you?
I was helping a new dev the other day and she had viewed a page in preview. Umbraco kind of gets stuck in that view until you close the preview. This means your changes aren't reflected on refresh?!
Hello! Thanks for the response. No I never use Preview exactly because I know it gets stuck. It feels like a global problem but it happens so rarely that I don't know when it actually happens and I spend a lot of time trying to fix a problem that's not there.
Umbraco bugging out from time to time (Can't explain better in title)
Hello everyone,
I came across a problem a few times and each time it's stopping me a few days from accomplishing the things I need to accomplish. Here's the most recent example that actually got me pissed off.
I'm on a tight schedule and I have this code (using Nested Content this time):
Here's what happened. I tried doing that on Friday, but the outcome is going successfully through my code (I used breakpoints to check) and then it was deciding to render ONLY the contact form. For absolutely no reason.
I tried cleaning the solution, building again, rebuilding, closing and opening Visual Studio, restarting the pc, threatening it, crying, performing satanic rituals, summoning Cthulu and the outcome was always the same. It would just freaking render ONLY the contact form.
Eventually I gave up. I just went home. Came back today, opened the solution, BOOM works as intended. I've came across this problem a few times throughout the last years and I still don't know how to fix it on time. It almost threw me off my deadlines.
Anyone have a clue?
Just to check... you weren't in Preview view were you?
I was helping a new dev the other day and she had viewed a page in preview. Umbraco kind of gets stuck in that view until you close the preview. This means your changes aren't reflected on refresh?!
Hello! Thanks for the response. No I never use Preview exactly because I know it gets stuck. It feels like a global problem but it happens so rarely that I don't know when it actually happens and I spend a lot of time trying to fix a problem that's not there.
is working on a reply...