FAQ Database Discussion Community


How do I render a list item differently on the last item?

asp.net,razor,foreach,umbraco
I am trying to make a menu that will appear like this: LOGS | BULLETIN | LOCATIONS | DIRECTORY | POLICIES Note that the last item does not have a | after it. This is my code now: <ul> @{ var homeNode = Model.Content.AncestorOrSelf("Homepage"); } @foreach (var node in homeNode.Children.Where("Visible"))...

Imagemaps in uCKEditor bad performance

performance,plugins,ckeditor,umbraco,imagemap
We have been using the uCKEditor plugin for umbraco for a few months now. We also installed a plugin for it called Image Maps. Recently, one of our content editors noticed a sharp drop in performance while editing some pages. After testing it for a while I noticed that removing...

Why isn't @node.Url working?

asp.net,razor,umbraco
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...

Use a html page as a custom section in Umbraco 7 without a tree

umbraco,umbraco7
I have a HTML page that I want to show in a custom section in Umbraco 7. I want to do this without having any tree within that section, as everything is already handled within the html file - It is being placed into the Umbraco back end for convenient...

Umbraco - Could not load type 'usercontrols_NewContactUs'

c#,asp.net,umbraco
I am trying to duplicate an existing Form in Umbraco (Contour is not installed). I have copied the following files: from: \my-site\usercontrols\Common\ContactUsForm.ascx <%@ Control Language="C#" AutoEventWireup="true" Inherits="usercontrols_ContactUs" Codebehind="ContactUsForm.ascx.cs" %> to: \my-site\usercontrols\Common\NewContactUsForm.ascx <%@ Control Language="C#" AutoEventWireup="true" Inherits="usercontrols_NewContactUs" Codebehind="NewContactUsForm.ascx.cs" %> from:...

Manually deploying Umbraco website on IIS - dashboard, js and css not working

iis,iis-7,umbraco,webmatrix,umbraco7
I have an Umbraco website with an SQl db. I backed up the DB and imported it on the SQL server on the server here. I then copied all the files of my umbraco folder and placed them in a folder on the server here as well. I then made...

Multiple Folders in Multiple Media Picker Umbraco 7

c#,umbraco,umbraco7
I'm trying to add multiple folders in a Multiple Media Picker but when i'm looping through it i'm only getting a single ID. This is the code i'm using to loop through the content: var tabList = Model.Content.GetPropertyValue<string>("containertab").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse); Is it allowed to add multiple folders...

Wont show image instead it gives error on my masterpage layout. Umbraco7, razor

asp.net-mvc,razor,umbraco
Yesterday I posted a question about why i couldn't get my image to show. Cant get the image to show in Umbraco7 with razor I got great and right answers. The problem is when i use those examples of how to get image to show then i get an error...

CreateMediaWithIdentity/CreateContentWithIdentity without raising events in Umbraco

c#,asp.net,asp.net-mvc,umbraco
I am using Umbraco 7 and have written some custom code on the following events Umbraco.Core.Services.MediaService.Saved += new Umbraco.Core.Events.TypedEventHandler<IMediaService, Umbraco.Core.Events.SaveEventArgs<IMedia>>(MediaService_Published); Umbraco.Core.Services.ContentService.Saved += new Umbraco.Core.Events.TypedEventHandler<IContentService, Umbraco.Core.Events.SaveEventArgs<IContent>>(ContentService_Published); For content, I am generating a media folder and vice versa. The following code causes the...

I'm getting an “Invalid length for a Base-64 char array or string” error in generated temp file?

debugging,umbraco,visual-studio-debugging
As the title suggests, I'm getting this error when I run the project from Visual Studio locally at runtime. It builds just fine. Invalid length for a Base-64 char array or string. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace...

Checking Umbraco node length

c#,razor,umbraco
I have a panel that is created and filled via a vacancy page I have created. Im doing it as follows: @{ var root = CurrentPage.AncestorOrSelf(1); var newsNode = root.Descendants("News").First(); var vacanciesNode = root.Descendants("Vacancies").First(); string shortenedSummary = string.Empty; } <ul> @foreach (var vacancyItem in vacanciesNode.Descendants("Vacancy").Take(3).OrderBy("postDate desc")) { <p>here we are...

umbraco public site says “This webpage is not available”

model-view-controller,umbraco
I have downloaded umbraco 7.2.1 and compiled it and published it. its working fine in local, but when i upload it to my hosting smarterasp the admin site works fine but public site says this webpage is not available. database for umbraco is in sql. publicsite url: http://tasminpatel-001-site4.smarterasp.net/ admin site...

Create Database table from model with enum using Umbraco.Core.Persistence

c#,umbraco,umbraco7
Want to create this table on application start if it does not exist. Code: public class Database : ApplicationEventHandler { protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { var db = applicationContext.DatabaseContext.Database; //Cant add this table due to the ENUM if (!db.TableExist("FormData")) { db.CreateTable<FormData>(false); } } } Model: [PrimaryKey("Id")] public...

Custom DataType for Umbraco containing MultiUrlPicker

c#,.net,umbraco,umbraco6
I am trying to create a custom DataType for Umbraco containing group of elements which include a TextBox, MediaPicker and a MultiUrlPicker. I can create a Text Box using the following snippet: var textBox = new TextBox(); and a Media Picker using the following snippet: var mediaPicker = new SimpleMediaPicker();...

Transferring Umbraco Site to Wordpress, keep same url/permalinks?

wordpress,url,mod-rewrite,umbraco,permalinks
We're moving a site from Umbraco to Wordpress and need to find a way to convert the URLs so they still work. The permalink of the Umbraco site is blog/posts/2015/may/ which doesn't work with Wordpress as, although you can create custom permalinks, you can't get the month name in there,...

Register HTTP handler in umbraco project

c#,umbraco,httphandler
I have created this http handler: public void ProcessRequest(HttpContext context) { //write your handler implementation here. string RequestedPage = context.Request.Url.Segments[1].ToString().ToLower(); string queriedRequest = "category1-page"; bool doesUrlContain = RequestedPage.Equals(queriedRequest); if (doesUrlContain) { context.Response.Redirect(context.Request.Url.Segments[0] + "production" + context.Request.Url.Segments[2]); } } Which should handle every call to "test-page" or its subpages and redirect...

Umbraco webmatrix vs nuget

umbraco,umbraco7
Is there any difference in functionality between installing umbraco via the webmatrix installer compared to installing the nuget package?

MVC Api Controller confusion with JSON.stringify

jquery,ajax,json,asp.net-mvc,umbraco
I know how to post to Umbraco's Api Controller, that's not the issue. Question: Let us say that we have (2) Api methods: [HttpPost] public string Test1(string time, string activityType) { return time; } [HttpPost] public string Test2(SomeModel model) { return model.SomeProperty; } On the first method/ajax call, if I...

Umbraco 7 lists

content-management-system,umbraco,umbraco7
I am new to Umbraco, and am trying to get to grips with its concepts, in particular how to create lists. For example, you might want a news listing that appears on a page as a list of headlines with mouseover extra content, but you don't want to be able...

Use Angular-Datatable in Umbraco 7 custom section

angularjs,umbraco,jquery-datatables
I am trying to use an angular datatable with server side processing in my umbraco custom section. My problem is that when I use this line: angular.module('umbraco', ['datatables']) if I include the datatables dependency I get the following error: angular.min.js?cdv=886402897:63 Error: Argument 'Umbraco.MainController' is not a function, got undefined at...

Umbraco: Update Property on specific member

umbraco,umbraco7
I'm running a forum with Umbraco 7, and I wish to update a property on a specific member by hes Id. This is what I tried: var authorId = Model.Content.GetPropertyValue<int>("postAuthor", 0); var author = Members.GetById(authorId); umbraco.cms.businesslogic.member.Member member = umbraco.cms.businesslogic.member.Member.GetMemberFromEmail(author.GetPropertyValue("email").ToString()); member.getProperty("postCounter").Value = Convert.ToInt32(member.getProperty("postCounter")) + 1; member.Save(); But this dont work and...

Umbraco 7 UmbracoViewPage could not be found

c#,asp.net,asp.net-mvc,umbraco
I have downloaded Umbraco 7.2.1 I have opened the website in Visual Studio 2012 and run it It has succesfully compiled and I have run the setup, building the database, and logging in for the first time to the admin panel. On the first login a popup window says that...

How to fix Newtonsoft.Json assembly loading error?

visual-studio-2012,dll,json.net,nuget,umbraco
I'm attempting to load a pre-existing Umbraco CMS site into a Visual Studio project and am caught up in a bit of DLL hell. Here is the error message I get when attempting to compile the site: Could not load types from assembly Umbraco.Core, Version=1.0.5462.37503, Culture=neutral, PublicKeyToken=null, errors: Exception: System.IO.FileNotFoundException:...

Umbraco: Check if current page is child of page with id or name of 'xxx' [closed]

c#,asp.net-mvc,razor,umbraco,umbraco7
I need to check if the current page is a child of another page. var myPage = Umbraco.Content(1086); if(Model.IsChildOf(myPage)) { } ?? ...

Connecting to Umbraco 6.2 from web application

asp.net,umbraco
I need to iterate through the nodes in Umbraco 6.2 in the external web application. But dont know how to make a connection in the code behind to Umbrao cms. Thanks...

Deploying Umbraco Overrides my data

visual-studio-2012,umbraco,deploying
I am fairly new to Umbraco. I am using Visual Studio for development and Deployment. I can deploy my local site to my production server with no problems. This is ok for now because I am the only one adding content to the site. When I pass the website to...

Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'?

c#,asp.net-mvc,umbraco
im pretty new to C# and im getting an error I cant quite figure out? I have a view where I want to loop a series of nodes, so Im trying do to this: @foreach (var crumb in Model.Breadcrumb) { //My code } As in my viewmodel I have this:...

'The call is ambiguous between the following methods or properties' on identical paths

c#,.net,umbraco,umbraco-ucommerce
I'm having a strange error with Umbraco/uCommerce, I built a support library and suddenly I'm getting a strange error preventing compilation. Error 9 The call is ambiguous between the following methods or properties: 'uCommerce_Boilerplate.Web.Controllers.ExtensionFunctions.ToDescription(System.Enum)' and 'uCommerce_Boilerplate.Web.Controllers.ExtensionFunctions.ToDescription(System.Enum)' I have one file that contains several features, and this is the snippet prompting...

uCommerce Installation Error for Umbraco 7

c#,sql,umbraco,umbraco-ucommerce
Using Umbraco version 7.1.4 assembly: 1.0.5261.28127 Download install package from ucommerce.net - uCommerce-for-Umbraco7-6.6.2.15058.zip Attempted to install multiple times. First (10+) times that database was on Azure. The install doesn't "error" out, but I would suspect that I would have more database tables created in the database that I have: The...

Umbraco rendering content using razor from api service that inherits UmbracoApiController

api,razor,umbraco
I have an umbraco api controller that I created that inherits the UmbracoApiController class and returns a list of items. I also have another umbraco site that is to call that api url using razor and to render the content onto the page. I was trying the following: dynamic xmlv...

Umbraco Indexing Error Filling Up Logs

c#,asp.net,umbraco,lucene.net
I am continually getting an Umbraco indexing error in our logs which seem to correspond with very high cpu usage on the site. Here is the error: ERROR UmbracoExamine.DataServices.UmbracoLogService - [Thread 99] Provider=InternalIndexer, NodeId=-1 System.Exception: Error indexing queue items,read past EOF, IndexSet: InternalIndexSet Is this because the node that it...

Ordering Members in Umbraco 7 Back Office

umbraco,umbraco7
We are currently utilising the Umbraco 7 membership service. Our site creates members as part of a sign-up process. In the CMS side of Umbraco I can see that the members should be sorted into folders alphabetically, however it would appear that the Name is being used to sort. This...

Method for Remote Development with Umbraco, ASP.NET

c#,asp.net,iis,umbraco
My setup is as follows [Home Network, Dreamspark Software] : Local workstation w/ Visual Studio 2015 Preview Server VM 1 - Windows 2012 w/ SQL Server Server VM 2 - Windows 2012 Web Server / IIS I am traditionally only experienced with C# application development. I would like to dive...

Null reference on creating table with foreign key in Umbraco on application start

c#,umbraco,umbraco7,petapoco
I am using Umbraco 7.2.1 and wanted to create table on application start. There are two tables project and students, classes are as follows. [TableName("Projects")] public class Project { [PrimaryKeyColumn(AutoIncrement=true)] public int Id { get; set; } [Required] public string Name { get; set; } } and [TableName("Students")] public class...

How can I capture data from Umbraco Forms?

umbraco,umbraco7,umbraco-contour
I have a requirement to provide a GUI forms editor so that non-technical users can create forms. One of the tools I am looking at is the Umbraco Forms tool (formerly Umbraco Contour). I want to be able to capture submitted data in an Action Method, process it in some...

What went wrong with Umbraco version 5?

asp.net,asp.net-mvc,performance,orm,umbraco
I'm not that familair with Umbraco, but I heard that they did a big rewrite for version 5, and actually dropped it in the end because it didn't work out. Killing a lot of hard work. That must have been a very hard decission, but there is probably a lot...

Why do some 'potentially dangerous Request.Path' HttpExceptions ignore httpErrors settings?

asp.net,exception,configuration,umbraco
I have a .Net website with custom error pages configured using the web.config httpErrors section: <httpErrors errorMode="Custom" existingResponse="Replace"> <clear/> <error statusCode="400" path="/page-not-found/" responseMode="ExecuteURL" /> <error statusCode="404" path="/page-not-found/" responseMode="ExecuteURL" /> <error statusCode="500" path="/error/" responseMode="ExecuteURL" /> </httpErrors> and <httpRuntime requestValidationMode="2.0" targetFramework="4.5" /> When I visit...

GetNodeByXpath throws NullReferenceException

xpath,umbraco
This line below throws a NullReferenceException. Node nodeEmail = Node.GetNodeByXpath("//Member/email[text()='xxx']"); and I've got <root id="-1"> <Members> <Member id="15853" ...> <email>xxx</email> </Member> ... Exception: [NullReferenceException: Object reference not set to an instance of an object.] umbraco.NodeFactory.Node.initialize() +172 umbraco.NodeFactory.Node..ctor(XmlNode NodeXmlNode) +179 umbraco.NodeFactory.Node.GetNodeByXpath(String xpath) +168 This is the first time I try XPath....

Failing to Log Into Umbraco admin Area

.net,login,umbraco
Hi Guys I have inherited an Umbraco site but I am getting a splash screen informing me that "Looks like there's still work to do". I am getting three errors in the console which my have somthing to do with this; Microsoft SQL Server is telling me that there is...

Umbraco: can't find developer. Database connect to visual studio

c#,umbraco
I have a project all in local. I connected the database with visual studio(SQL Server and Visual Studio 2013), I think I had all right, but I can't found the developer section in umbraco. in web.config < add name="umbracoDbDSN" connectionString="Data Source=(LocalDB)\v11.0;Database=hotel;AttachDbFilename=|DataDirectory|hotel.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/> In the section Users, I can't check...

Is it possible to download an sdf umbraco database from Azure and convert it to Azure SQL

database,azure,umbraco,webmatrix,umbraco7
I have a project that uses a local database(SDF) for umbraco which is hosted on azure, I would like to copy the data from that local database to a new one that will be hosted on Azure sql, then I want to update connection string to use that database, is...

umbraco public access error when authenticated

asp.net,authentication,umbraco,umbraco7,roleprovider
I have an issue with public access in Umbraco 7. I use a custom membership provider to authenticate the users by my CRM database. I set a rule to let access to authenticated (front-end) users only and I used a custom role provider to define authenticated users have the visitors...

Recycling app pool each time something is published

.net,iis,lucene,umbraco,application-pool
I'm working on an Umbraco site where I have custom sections, and therefore use the application.config and trees.config files. I have a problem where every time I publish something, the app pool recycles with the following message: w3wp.exe Information: 0 : _shutDownMessage=CONFIG change HostingEnvironment initiated shutdown CONFIG change HostingEnvironment caused...

Using Umbraco 7.2 grid view, how do I insert the grid view into my template?

templates,gridview,razor,umbraco
I'd really like to use grid view to render my content on a simple text page. I've got a grid view with the alias "content" set up. What do I type in the template to get it to show up? @CurrentPage.content does not work. I realize it probably uses those...

Umbraco whitelist backend url for specific IP range

iis,umbraco,whitelist
I do not want people visiting my site to have access to umbraco backend. so I want to whitelist IP range through IIS who can visit backend url. I know I can use whitelist and blacklist for IP ranges but it works for the whole site and not for a...

Application domain restarts on node publish - Umbraco

asp.net,iis,umbraco
Whenever I publish a node on Umbraco 6.2.5, the application domain restarts. The log shows: Application shutdown. Reason: ConfigurationChange The only files that are modified during the publish are in App_Data: Umbraco.config and the contents of TEMP\ExamineIndexes. I have no real time virus scanning hitting those files. Any ideas on...

How to export umbraco content

xml,xslt,umbraco
I'm new xD and I use umbraco and asp.net My problem is that i need to export a lot of file that are in content (Umbraco). I tried with EyeCatch XML Export, but doesn't work. I tried to create a new package so that I can import in a other...

Umbraco email form - missing sender

c#,asp.net-mvc,umbraco
I'm working with Umbraco. I have an form on my page where the user should input their email address and the message which should then be sent to my email. The problem is I'm basically just sending emails to my self now as both sender and receiver. What does the...

Rich text editor (tinymce) images - how to disable auto height and width?

tinymce,umbraco,umbraco7
We're using Umbraco v7.2.1 to serve what is supposed to be responsive content. When you add an image from the media library to the tinymce editor, this is the html that is inserted by tinymce: <img style="width: 500px; height:500px;" src="/media/1007/jobs-block.jpg?width=500&amp;height=500" alt="undefined" rel="1097" /> I really don't want ANY w x...

Umbraco Omitting Media files from search results

c#,razor,umbraco,search-engine
As my title suggests, I am wanting my search code to omit anything in my media folder. Right now, if I search for "test" it will bring back any page with the word test in it as well as any document or image which has test on it as well....