I created this simple nav bar following an example I found on StackOverflow. 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"))
What exact version of Umbraco 7 are you using? And have you tried to refresh the XML cache to see if that helps? You do that by going to the "CONTENT" node, right click and choose "Republish entire site".
I did try republishing the whole site actually, and that didn't do anything for me. Tried empty cache with hard reload, too.
As for version, when I click on "About" it says 7.2.0, though I don't think this is correct, as about a week ago I upgraded to 7.2.2 using the steps here - https://our.umbraco.org/documentation/installation/upgrading/general. (So I guess I must have maybe missed a step if it's still saying that?)
Could this be related to another (bigger) problem I'm having? Right after I posted this originally I noticed I can no longer get into my doctypes. It gives me this error when I try to expand my topmost parent doctype:
I tried fixing it by deleting the directories in my App_Data/TEMP/. After I did that,it started giving me this when trying to click on the parent doctype:
Server Error in '/' Application.
The best overloaded method match for 'System.Tuple.Tuple(bool?, int?)' has some invalid arguments
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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'System.Tuple.Tuple(bool?, int?)' has some invalid arguments
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.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212'
So now I'm basically stuck. =/
~ Stacy
Edit: Now, in addition to all the above, I'm noticing if I make changes in the content, and then save and publish, those changes do not show up on the front end. (Although the changes appear to save properly in the back end, as they're still there if I navigate away and come back.)
Ok, this might be related to the upgrading, which does not seem to have been finished correctly for some reason.
When you did the upgrade did you then ever see an upgrade screen? I think you should try doing the upgrade once more - Perhaps try downloading the 7.2.2 zip file once again and then right click it and unblock it before unzipping it - Then copy over the folders mentioned in the general upgrade guide.
Also make sure to read any specific upgrade instructions that might be mentioned on the download page as well. Also make sure to check that permissions are still correct for the network and iusr accounts as well.
Yup, I sure did see the upgrade screen. That's the main thing that made me think I did it correctly... that and the fact that it seemed to work just fine for several days, and I was working on the site constantly.
When I went through the uprgrade, the only thing I was confused about was the "finalize" steps... I'm not sure what "update the version number in the web.config" means exactly, nor do I know how one goes about "upgrading your database in case there are any changes."
I'd be glad to go through it again if I knew how to do that stuff.
Ok, but the point is that you should not do much more than simply copy over
/bin
/umbraco
/umbraco_client
That should be enough since the rest should just happen under the hood.
The stuff that is mentioned under the finalize steps is just a summary of what the installer does behind the scenes and some mentions of potentiel issues if one is coming from some older versions (below 7). So it's really just some information - Not action steps that one should do manually at all.
However in some situations it's a good idea to merge the files found in /config/ using a tool like WinMerge - But if I remember correctly it should not be necessary when upgrading from 7.2.0 to 7.2.2.
So I think you should try doing it one more time - Once the files have been copied over and the upgrade wizard has run you should also try doing hard resetting the cache again and then go to the /config/ClientDependency.config file and increment the version number and then recycle the app pool (You can do that by simply saving the web.config file). This should bust the backoffice cache.
All righty. I copied over /bin, /umbraco, and /umbraco_client. I went back to the site, and the upgrade screen appeared. I had to log in, and the loading bar went for a while, and then it took me into the CMS. Then I republished the site. Nothing new happened, but the same problems were still there. The only thing that is fixed is that my changes to the content appear to publish properly now.
I still have hope because of what you said about the clientdependency.config file, though, so I think this is going to work... What does increment the version number mean? I assume you're referring to these lines:
Ok, good that you're at least able to publish now. Incrementing means that you add 1 to the current version number :) So currently it says 505531674 - Simply just change it to 505531675 - Basically all you need to do is just change the version number to something else as long as it keeps the proper format. Otherwise it can cause a yellow screen with an error message. So that's why it's easier to just instruct people to increase the number by 1 :)
Well, I incremented it and saved the ClientDependency.config. It still is giving me all the same errors. =[ It's also giving me this message when trying to click on the Content node in the Content section:
Server error: Contact administrator, see log for full details. Failed to retrieve data for content id -1
Oh yes, there are errors. In the most recent trace log from 3/9, there are all these: http://dumptext.com/c0LiYZ5f (I figured it'd be better not to clutter up the thread with the text of them, as they are long.)
I'm not working locally, so I can't tell right now. I can check later. I'm also going to have a coworker look over it before the end of the day. (They were at uWestFest until today so I wasn't able to talk to them. ;-))
Ok, could be due to some missing files on your machine I suppose - Not quite sure what is going on though. Hopefully your coworker can shed some more light on things. Do he/she see the same issues or is it just your machine?
Well Jan, my coworker was just as lost as me. She thinks this may have happened when I copied and then deleted an old doctype - like maybe I didn't change the doctype on the content node before deleting the old one, although we couldn't find any real evidence of this. Her recommendation is to back up all my content into a word file or what have you, then make a new database, plug that into the web.config, go through a new install, and then remake all my doctypes/reenter in all the content. But at least I will still have my templates and such.
I just wanted to give you an update. It's good news. Haha.
So, I ended up completely wiping everything and doing a fresh 7.2.2 install. I go in there, readded a few templates I'd done, and started making some doctypes to see if everything was going to be okay... All I did was make 4 doctypes with no properties or tabs beneath a base doctype with no properties or tabs. That's about the time that stupid red box started showing up again and an error - the same runtime error from before. So I googled the first line of it and it led me to this thread here:
And the solution there, to download the dev version of umbraco, build it, and then copy the umbraco.core.dll into my /bin/ folder seems to have fixed everything for me. At least I am learning a lot... heheh.
Thanks for the heads up. Good to hear that you managed to get it solved - But I'm a bit puzzled. The approach should not be necessary...however it seems to be in some situations.
Why isn't @node.Url working?
I created this simple nav bar following an example I found on StackOverflow. 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>
<a href="@node.Url">@node.AsDynamic().Name</a> |
</li>
}
</ul>
Hi Stacy
What exact version of Umbraco 7 are you using? And have you tried to refresh the XML cache to see if that helps? You do that by going to the "CONTENT" node, right click and choose "Republish entire site".
Looking forward to hearing from you.
/Jan
Hey Jan, thanks a lot for getting back to me. =)
I did try republishing the whole site actually, and that didn't do anything for me. Tried empty cache with hard reload, too.
As for version, when I click on "About" it says 7.2.0, though I don't think this is correct, as about a week ago I upgraded to 7.2.2 using the steps here - https://our.umbraco.org/documentation/installation/upgrading/general. (So I guess I must have maybe missed a step if it's still saying that?)
Could this be related to another (bigger) problem I'm having? Right after I posted this originally I noticed I can no longer get into my doctypes. It gives me this error when I try to expand my topmost parent doctype:
Server error: Contact administrator, see log for full details.
Failed to retrieve data for child nodes undefined
I tried fixing it by deleting the directories in my App_Data/TEMP/. After I did that,it started giving me this when trying to click on the parent doctype:
Server Error in '/' Application.
The best overloaded method match for 'System.Tuple.Tuple(bool?, int?)' has some invalid arguments
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: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'System.Tuple.Tuple(bool?, int?)' has some invalid arguments
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.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212'
So now I'm basically stuck. =/
~ Stacy
Edit: Now, in addition to all the above, I'm noticing if I make changes in the content, and then save and publish, those changes do not show up on the front end. (Although the changes appear to save properly in the back end, as they're still there if I navigate away and come back.)
Hi Stacy
Ok, this might be related to the upgrading, which does not seem to have been finished correctly for some reason.
When you did the upgrade did you then ever see an upgrade screen? I think you should try doing the upgrade once more - Perhaps try downloading the 7.2.2 zip file once again and then right click it and unblock it before unzipping it - Then copy over the folders mentioned in the general upgrade guide.
Also make sure to read any specific upgrade instructions that might be mentioned on the download page as well. Also make sure to check that permissions are still correct for the network and iusr accounts as well.
Hope this helps.
/Jan
Yup, I sure did see the upgrade screen. That's the main thing that made me think I did it correctly... that and the fact that it seemed to work just fine for several days, and I was working on the site constantly.
When I went through the uprgrade, the only thing I was confused about was the "finalize" steps... I'm not sure what "update the version number in the web.config" means exactly, nor do I know how one goes about "upgrading your database in case there are any changes."
I'd be glad to go through it again if I knew how to do that stuff.
Thanks Jan. =)
~ Stacy
Hi Stacy
Ok, but the point is that you should not do much more than simply copy over
/bin
/umbraco
/umbraco_client
That should be enough since the rest should just happen under the hood.
The stuff that is mentioned under the finalize steps is just a summary of what the installer does behind the scenes and some mentions of potentiel issues if one is coming from some older versions (below 7). So it's really just some information - Not action steps that one should do manually at all.
However in some situations it's a good idea to merge the files found in /config/ using a tool like WinMerge - But if I remember correctly it should not be necessary when upgrading from 7.2.0 to 7.2.2.
So I think you should try doing it one more time - Once the files have been copied over and the upgrade wizard has run you should also try doing hard resetting the cache again and then go to the /config/ClientDependency.config file and increment the version number and then recycle the app pool (You can do that by simply saving the web.config file). This should bust the backoffice cache.
Hope this helps :)
/Jan
All righty. I copied over /bin, /umbraco, and /umbraco_client. I went back to the site, and the upgrade screen appeared. I had to log in, and the loading bar went for a while, and then it took me into the CMS. Then I republished the site. Nothing new happened, but the same problems were still there. The only thing that is fixed is that my changes to the content appear to publish properly now.
I still have hope because of what you said about the clientdependency.config file, though, so I think this is going to work... What does increment the version number mean? I assume you're referring to these lines:
The file on the live site says this:
<clientDependency version="505531674" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
Hi Stacy
Ok, good that you're at least able to publish now. Incrementing means that you add 1 to the current version number :) So currently it says 505531674 - Simply just change it to 505531675 - Basically all you need to do is just change the version number to something else as long as it keeps the proper format. Otherwise it can cause a yellow screen with an error message. So that's why it's easier to just instruct people to increase the number by 1 :)
Haha, you're welcome - Hope this helps!
/Jan
Well, I incremented it and saved the ClientDependency.config. It still is giving me all the same errors. =[ It's also giving me this message when trying to click on the Content node in the Content section:
Server error: Contact administrator, see log for full details.
Failed to retrieve data for content id -1
Hi Stacy
Ok that's weird - Could you go to the /App_Data/Logs file and see if it reveals any further details? Anything marked with ERROR or WARNING?
Is it happening locally? Does your colleague have the same issues?
/Jan
Oh yes, there are errors. In the most recent trace log from 3/9, there are all these: http://dumptext.com/c0LiYZ5f (I figured it'd be better not to clutter up the thread with the text of them, as they are long.)
I'm not working locally, so I can't tell right now. I can check later. I'm also going to have a coworker look over it before the end of the day. (They were at uWestFest until today so I wasn't able to talk to them. ;-))
Hi Stacy
Ok, could be due to some missing files on your machine I suppose - Not quite sure what is going on though. Hopefully your coworker can shed some more light on things. Do he/she see the same issues or is it just your machine?
/Jan
Well Jan, my coworker was just as lost as me. She thinks this may have happened when I copied and then deleted an old doctype - like maybe I didn't change the doctype on the content node before deleting the old one, although we couldn't find any real evidence of this. Her recommendation is to back up all my content into a word file or what have you, then make a new database, plug that into the web.config, go through a new install, and then remake all my doctypes/reenter in all the content. But at least I will still have my templates and such.
Hi Stacy
Yeah, maybe it's better to just start out on a fresh installation then. Fingers crossed that everything is going to be allright :)
/Jan
Hi Jan,
I just wanted to give you an update. It's good news. Haha.
So, I ended up completely wiping everything and doing a fresh 7.2.2 install. I go in there, readded a few templates I'd done, and started making some doctypes to see if everything was going to be okay... All I did was make 4 doctypes with no properties or tabs beneath a base doctype with no properties or tabs. That's about the time that stupid red box started showing up again and an error - the same runtime error from before. So I googled the first line of it and it led me to this thread here:
https://our.umbraco.org/forum/getting-started/installing-umbraco/60101-Upgrade-to-721-Document-Types-Break
And the solution there, to download the dev version of umbraco, build it, and then copy the umbraco.core.dll into my /bin/ folder seems to have fixed everything for me. At least I am learning a lot... heheh.
~Stacy
Hi Stacy
Thanks for the heads up. Good to hear that you managed to get it solved - But I'm a bit puzzled. The approach should not be necessary...however it seems to be in some situations.
As long as it's working :)
Happy coding.
/Jan
is working on a reply...