I created this simple nav bar, and everything is working great except the URLs for the links. When I click on the links, it just gives me "#" after the current page's url, so the links look great but go nowhere. So I assume that #node.Url isn't working for some reason. Any ideas?
<ul>
#{
var homeNode = Model.Content.AncestorOrSelf("Homepage");
}
#foreach (var node in homeNode.Children.Where("Visible"))
{
<li>
#node.AsDynamic().Name |
</li>
}
</ul>
This sounds like an issue directly related to the upgrade.
Assuming you took a backup of the code and database before performing the upgrade, I would recommend rolling back to the backups and updating again, being sure to follow the specific instructions supplied in the upgrade guide
The reason this was happening was because of a database error related to nested doctypes. The way I solved it was to completely reinstall Umbraco 7.2.2, and then download the dev version of the next Umbraco version. Then I had to build the dev version, in order to get the resulting umbraco.core.dll and copy it into my own /bin/ folder. After doing this, my code worked perfectly, as well as fixing a number of other errors. If anyone else is experiencing this, the steps to fix it may be found here: https://our.umbraco.org/forum/getting-started/installing-umbraco/60101-Upgrade-to-721-Document-Types-Break
Related
currently, I am learning Bootstrap 4 at ASP.NET MVC project (only change index.cshtml, nothing else) in JetBrains Rider and I have some weird problem I can`t deal with.
Every day when I start to write new code in HTML it seems to be okay - dotnet watch run works great, inline styling is okay. But when I change site.css it doesn't see changes, I don't know why. After some time it fixes itself randomly (weird but ok), for example, yesterday I couldn't do anything with CSS until I ran the project in JetBrains Rider, but now it doesn't work. Two days ago it fixed itself when I wasn't using my computer (xD). Do you have any idea what's going on or how to fix it? I didn't find anything interesting on Google
P.S. I updated JetBrains IDE to the latest version but nothing is changed
Its browser-cache related. You should cache bust your css file ( add rand number or guid at the end of your css stylesheet declaration, ex : <link rel="stylesheet" href="style.css?v=3.4.1"> 3.4.1 should be generate randomly. ). Before doing that, you can also clear-cache or hard reload your page and you should see your changes.
Take a look at : https://css-tricks.com/strategies-for-cache-busting-css/
when I start meteor like this:
meteor --production
I get a blank page where my app should be and the following error shows up in my browser console:
No such function: navClassName
However if I start meteor normally like this:
meteor
My app runs without problem.
What could be the problem? Do meteor template helpers need to be loaded differently during production?
Relevant files:
client/navigation/navigation.html:
<template name="navigation">
<ul class="nav navbar-nav">
<li class="{{navClassName 'home'}}">
home
</li>
<li class="{{navClassName 'blog'}}">
Blog
</li>
</ul>
</template>
client/navigation/navigation.js:
Template.navigation.helpers({
'navClassName': function (route) {
if (Router.current()) {
return Router.current().route.options.navbarSelected.search(route) != -1 ? "active" : "";
}
}
});
Move navigation.js to the client/lib directory, or at least the Template.navigation.helpers part and fix/remove any other JavaScript that is causing errors.
I wish I could elaborate more, but this issue seems to be related to the file load order. Files in the lib directory are loaded first and moving the helpers there solved the problem for me.
A typical file structure can be found in the documentation. See the comments in the Example File Structure to learn about some of the special behaviors.
While this may work for you, finer control over dependencies can most easily be achieved through packages, as explained in this other answer from SO. This is specially necessary for code that should be available to both client and server.
I am setting up an ASP.netstorefront site and when I edit the menudata.xml, no changes appear. No matter what I do I can not get it to update the menu on the website. Any ideas?
what version are you using?
With ASPDSNF you can find that there are duplicate xml packages. There is a xmlpackages folder within the root /web folder but you may find that copying your xml packages to the relevant App_Templates/Skin1/XmlPackages folder may work
If you are on Multistore then each store would have Skin1, Skin2 etc..
I figured out the problem. In this build, the menu is pulled from topnav.xml.config, not the typical menudata.xml that the manual says the menu comes form.
I'm having trouble getting my custom error page to work. I have followed the instructions on http://docs.ghost.org/themes/ and added an error.hbs template into the root of my theme. The code inside this template is really simple:
{{!< default}}
<section class="error">
<h1>{{code}}</h1>
<p>{{message}}</p>
</section>
Each time I try to test it by going to a non existent page, the blog shows the default ghost error page every time.
Have I missed anything crucial?
If you are using ghost 0.4.2 I'm sorry this is a bug and would be fixed in 0.5 release
see the bug issue at github
https://github.com/TryGhost/Ghost/issues/2513
Have you restarted Ghost? Whenever you add or remove a theme file you need to restart the application for it to become aware of the changes to your file structure. Edits to files are detected automatically, but new or removed files need this extra step.
I received this error when trying to put a couple of C# projects live. The sites were working locally in VS 2010 but on live they threw the following error:
CS0117: 'System.Web.UI.HtmlControls.HtmlAnchor' does not contain a definition for 'Text'
This was the code having the issue in the code file of the master page:
litHome.Text = "active";
In the source the master page I had this:
<li>home</li>
The error being thrown appeared to think I was setting the text property of an HTML Anchor.
I've just fixed this myself but after not being able to find the solution on here (or Google) I thought I'd post it for anyone else having the problem. Please see my comments below as I'm not allowed to answer this yet.
sir
html controls doesn't have (.Text) extensions in this case you can use (.Value) instead to solve your problem ,it will return u same thing which in returned in case of .Text.If u still face ant problem just let me know which control u r using
in code behind
string abc=htmlTextbox.Value;
Issue was down to having a literal inside an anchor tag (used to dynamically set a CSS class) with quotes instead of apostrophes. Done this many times but only today when putting 2 new sites live did this problem come up (perhaps someone can explain why it's only coming up now, new validation in VS service pack perhaps?) Anyway, the following code errors:
<li>home</li> Needs to be:
<li>home</li> Hope that helps someone