Other pages work fine. Even if I'm using the wrong URL when I browse to it...the preview button URL I can't screw up, and it's not working. Which tells me something is wrong.
As far as the URL I'm using...
Here's my top nav code...
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
<!-- Top Nav -->
@{
var homePage = CurrentPage.AncestorsOrSelf(1).First();
// The menu items we want are all of the children of the homepage
// We also check if "Hide in navigation" is on in the menu, we shouldn't show hidden items
var menuItems = homePage.Children.Where("includeInNavigation == true");
}
<ul class="nav navbar-nav">
@{int i = 0;}
@foreach (var item in menuItems){
if (i==3){
<li class="sticky-logo hidden-xs"><a href="#"><img src="/img/logo.png" /></a></li>
}
if (item.Children.Where("includeInNavigation == true").Count() > 0){
<li class="dropdown @(i < 2 ? "border-right" : "") @(i > 2 ? " right" : "")"><a href="@item.Url" role="button" aria-haspopup="true" aria-expanded="false">@item.Name <i class="fa fa-chevron-down blue" data-toggle="dropdown" aria-hidden="true"></i></a>
<ul class="dropdown-menu">
@foreach (var subMenuItem in item.Children.Where("includeInNavigation == true")){
<li><a href="@subMenuItem.Url">@subMenuItem.Name</a></li>
}
</ul>
</li>
}else
{
<li class="@(i < 2 ? "border-right" : "") @(i > 2 ? "right" : "") @(item.Name == "Connect" ? " connect" : "")"><a href="@item.Url">@[email protected]((item.Name == "Connect" ? " <i class='fa fa-chevron-right hidden-xs' aria-hidden='true'></i>" : ""))</a></li>
}
i++;
}
</ul>
@AlexSkypnyk I'd love to do a screen share with you and show you my setup, so you could see what I've got going on and if anything appears to be setup incorrectly. But, I realize that's a lot to ask. Please let me know if you're interested.
404 When Previewing a Content Page
I'm getting a 404 error when I click the preview button on a content page. I also get a 404 when I browse to the published page.
When I look in the /views folder the appropriate *.cshtml page is there.
Any ideas where I should be looking?
Hi Bh
What about normal view of page, is it working?
Thanks,
Alex
@AlexSkrypnyk "normal view" is not working either.
What if you republish the node?
Maybe the node is restricted from access?
What version of Umbraco are you using?
@AlexSkrypnyk
I've published the node a half dozen times. Still 404.
Restricted from access...I don't beleive so. I don't have any security groups setup.
I'm running Umbraco 7.6.4
What about some rewriting rules?
There are no rewrite rules specified in my web.config
If you would have the problem with template - then the error will be:
404 error - something with wrong url
What URL Umbraco shows in backoffice and what you are trying to access?
Everything ok with domain binding or it's local installation?
Other pages work fine. Even if I'm using the wrong URL when I browse to it...the preview button URL I can't screw up, and it's not working. Which tells me something is wrong.
As far as the URL I'm using...
Here's my top nav code...
This view looks like ok, what about view of pages and master template?
I have multiple other pages that work fine using the same master template.
what about page templates?
custom routing?
RenderControllers?
I've commented out everything on the page template except one h1 just so it doesn't come back null. Don't think it's the page template.
I'm not doing any custom routing.
I'm not familiar with RenderControllers.
RenderController is a controller that does the stuff before rendering the page for certain document type, read more here -
https://our.umbraco.org/documentation/reference/routing/custom-controllers
I'm not using any RenderControllers.
@AlexSkypnyk I'd love to do a screen share with you and show you my setup, so you could see what I've got going on and if anything appears to be setup incorrectly. But, I realize that's a lot to ask. Please let me know if you're interested.
Hi Ben
Yes, I can look, how can I do it?
Write me on twitter, I started following you.
Thanks,
Alex
Figured it out. I didn't have a template selected on my content node.
is working on a reply...