Quantcast
Channel: ActiveTopics
Viewing all 72689 articles
Browse latest View live

Importing a site to umbraco?

$
0
0

I am not too sure how to ask this.

I'm attempting to look into potentially importing some sites into Umbraco so as to more easily handle the back-office and content creation.

However, looking through the tutorials, I can't seem able to find any examples that could help me automate creating an indefinite number of pages within the site and then filling their content.

Is there any way to do such a thing with Umbraco?


Best Practice with folder structure in content section

$
0
0

Hi Community,

we're currently running into a problem with a new Umbraco-Project (Version 7.13.1) by trying to structure our content nodes. We'd like to now if there is a "best practice" way to achive this.

What we're trying to achive:

We have a Content "Pages", which behaves like a folder and holds multiple "Page" document types - in this example content named "Home". (See image below) We'd like to have the "Home"-Content acting like an root-content and give it the URL "/" since it is the starting page. Basically we want "Pages" to not have a URL at all, so "Home" would be the first content at root.

The problem we're running into:

The content "Pages" automatically gets the URL "/" from Umbraco which is the reason why the "Home" content can't be accessed under the root URL "/". We know a few workaround for this, but they all have massive disadvantages and don't seem to be nice solutions to us (Build-In redirect properties, custom URLProvider, IIS-Rewrite Rules).

Example: umbraco content structure URL

Is there any other solution how to achive this? If not, what is the best-practice one?

Thanks, ModulAcht

Is it possible to handle more than one submit button?

$
0
0

Hi All

I am running into this issue recently. The current form has one submit button does post to the surface controller to persist the form data.

My client has a new requirement and would like to add another button on the same form to allow their users to save the data as draft.

I went through the forum and google, found the following similar question, unfortunately, there wasn't clear solution to fix this issue.

https://our.umbraco.com/forum/templates-partial-views-and-macros/90611-how-to-i-implement-two-submit-buttons-in-the-same-partial-view-hitting-the-same-surface-controller

Can someone point me a direction how to handle multiple submit buttons with Umbraco surface controller?

Appreciate for your help.

Users only able to view notifications when they have the permission to change permissions for a node

$
0
0

Not sure If I'm missing something but when I attempt to view notifications on a node as a user who's a member of the default 'Editors' group I get the following error appear behind the notifications panel:

enter image description here

I've discovered I can work around the problem by granting the 'Editors' group the 'Permissions' permission to allow them access to change permissions on a node but it's not ideal.

I'm running Umbraco version 7.13.1

uSync Member Groups

$
0
0

Hi, am I missing something? How can I enable Member Group sync? It seems my coworkers get at least one, but I dont know why?

Are people using Member Types to set auth permission logic?

Thanks Sean

Which programming language

$
0
0

Hi everyone,

I am going to learn what I'd call a 'proper' (I've been on html/css for years, learning xslt now too) programming language and I'm faced with a massive choice of different confusing stuff to choose from!

I've narrowed it down to c++ (because I have a book on that already!), c# (I am planning on sticking with umbraco for now so would be useful) or python (beginner language?). The web suggests python would be a good starting point but wouldn't learning c++ be an excellent starting point as it seems so much more widespread (but complex!), and unforgiving with mistakes, but learning accuracy is a good thing isn't it? What job requires a lack of accuracy?

Plus, then you get compilers/interpreters/object orientated/procedural etc etc... plus frameworks, wtf? I understand what an interpreter is and kind of what compiling is. I am no computer science degree graduate and I'm baffled, but determined to learn what it all means. (I also don't have the means or time to go and do a computer science degree either). I could do with a few (SIMPLE) pointers though without it turning into a pointless 'which language is best' argument. Just if anyone has any real, unbiased reasons for learning any of the above, that would be great. Even some stories of how you guys started programming or how you got into it, what you learned first etc.

I know this isn't totally to do with umbraco (well, c# would be...) but this forum has been very good to me with getting straight answers, not 14 year old kid immature answers like you get at many forums.

Thanks in advance,

Oh, and MERRY CHRISTMAS EVERYONE!! Hope you all have a great one!! :)) :))

Sam.

Intellisense in VS 2015

$
0
0

I have just moved a 7.2.5 project from VS 2012 to VS 2015 but am getting the following Intellisense errors. I have upgraded MVC to 4.0.0.1 and added in a binding redirect. This produces a warning under references to Umbraco, var, String - pretty much everything.

Severity Code Description Project File Line Warning CS1702 Assuming assembly reference 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' used by 'umbraco' matches identity 'System.Web.Mvc, Version=4.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' of 'System.Web.Mvc', you may need to supply runtime policy rbl2015

Distributed call not working after enabling SSL for umbraco backoffice server

$
0
0

Hi,

Our distributed call is not working on Live server since we have enabled SSL for umbraco backoffice server.

We have enabled distributed calls on our load balanced UAT server.

Following configuration we have done on umbracoSettings.config file on all servers(Backoffice, Front1,Front2)

<distributedCall enable="true"> 
<user>0</user> 
<servers> 
<server>cmssiteuat.server.com</server> 
<server>frontsite1uat.server.com</server> 
<server>frontsite2uat.server.com</server> 
</servers> 
</distributedCall>

This is working fine on UAT. Now when we do same settings on our Live server it is giving error.

Live site Configuration

<distributedCall enable="true"> 
<user>0</user> 
<servers> 
<server>cmssitelive.server.com</server> 
<server>frontsite1live.server.com</server> 
<server>frontsite2live.server.com</server> 
</servers> 
</distributedCall>

Error:

2015-09-04 17:48:53,164 [89] INFO Umbraco.Core.Sync.DefaultServerMessenger - [Thread 64] Submitting calls to distributed servers 2015-09-04 17:48:53,164 [89] ERROR Umbraco.Core.Sync.DefaultServerMessenger - [Thread 64] Error refreshing a node in the distributed list, URI attempted: invalid url (responseUri null) System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: The handshake failed due to an unexpected packet format. at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse() at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream) at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult) at Umbraco.Core.Sync.ServerSyncWebServiceClient.EndRefreshById(IAsyncResult asyncResult) at Umbraco.Core.Sync.DefaultServerMessenger.PerformDistributedCall(IEnumerable1 servers, ICacheRefresher refresher, MessageType dispatchType, IEnumerable1 ids, Type idArrayType, String jsonPayload) I have already checked that all URLs are accessible from each servers and also there is no issue of authorization rights.

Difference between UAT & Live site : On live site, Backoffice CMS is running under HTTPS (Secure connection).

Already tried:

<distributedCall enable="true"> 
<user>0</user> 
<servers> 
<server forceProtocol="http" forcePortnumber="80">cmssitelive.server.com</server> 
<server forceProtocol="http" forcePortnumber="80">frontsite1live.server.com</server> 
<server forceProtocol="http" forcePortnumber="80">frontsite2live.server.com</server> 
</servers> 
</distributedCall>

Please help on this.

Thanks


Unit Testing - Moq mocking for Umbraco Models Builder Object

$
0
0

Hi Guys,

Does anyone know how I can mock, using moq, an umbraco models builder object?

I have searched about it and they say that properties should be vritual in order to be able to use SetUpGet and they are not virual and there are no setters.

I would like to mock my umbraco models builder object in order to be able to compare.

Thank you for your help.

Kind Regards

How to configure the Document Type's Icon?

$
0
0

How do you set the icon that would displayed in the content tree when the document is created?

Is there something special I need to do, I cannot seem to locate any material how to do this, but I see lots of cases where this has happened?

Invalid uniqueID error

$
0
0

Hello Everyone, I am new to umbraco and been trying install it in my project using Nuget (Umbraco 7.5.10) for the first time. I am using VS2015 and SQL 2008 R2. My project is an Empty Web Application(MVC). During installation, I always encounter 'invalid column name uniqueID' error. After going through the log, I understand the error is been encountered in BusinessLogic.

enter image description here

Kindly help me out to solve this or if anyone knows any link where the solution is already provided, kindly let me know.

Thanks.

Get URL from Link Picker property type

$
0
0

I have a Link Picker property on my document type which allows the user to enter an external URL value or pick a content item from the Umbraco site (property name PrivacyContentLink

Within Razor, how do I get the URL regardless of which has been entered?

I have tried

if (Model.SiteRoot.GetProperty("PrivacyContentLink").HasValue)
    {
        var privacyNodeId = Model.Content.GetPropertyValue<int>("PrivacyContentLink");
        privacyLink = umbraco.library.NiceUrl(privacyNodeId);
    }

And...

if (Model.SiteRoot.GetProperty("PrivacyContentLink ").HasValue)
{
    tcLink = Umbraco.TypedContent(Model.Content.GetPropertyValue<int>(" PrivacyContentLink ")).Url;
}

All with no luck

What is the best Razor approach to obtain the value to add to my anchor href attribute?

Custom dashboard and SqlCE

$
0
0

Hi everyone

I'm following the Custom Dashboard tutorial, but having issues with the part that covers listing last weeks changes.

I keep getting the following error as soon as I add getUserLog:

An error occured
There was an error parsing the query. [ Token line number = 4,Token line offset = 39,Token in error = WHERE ]

Exception Details
System.Data.SqlServerCe.SqlCeException: There was an error parsing the query. [ Token line number = 4,Token line offset = 39,Token in error = WHERE ]
Stacktrace
at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr)
   at System.Data.SqlServerCe.SqlCeCommand.CompileQueryPlan()
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options)
   at System.Data.SqlServerCe.SqlCeCommand.ExecuteScalar()
   at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass11_0.<ExecuteScalarWithRetry>b__0()
   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at Umbraco.Core.Persistence.Database.ExecuteScalar[T](String sql, Object[] args)
   at Umbraco.Core.Persistence.Database.Page[T](Int64 page, Int64 itemsPerPage, String sql, Object[] args)
   at Umbraco.Core.Persistence.Repositories.AuditRepository.GetPagedResultsByQuery(IQuery`1 query, Int64 pageIndex, Int32 pageSize, Int64& totalRecords, Direction orderDirection, AuditType[] auditTypeFilter, IQuery`1 customFilter)
   at Umbraco.Core.Services.AuditService.GetPagedItemsByUser(Int32 userId, Int64 pageIndex, Int32 pageSize, Int64& totalRecords, Direction orderDirection, AuditType[] auditTypeFilter, IQuery`1 customFilter)
   at Umbraco.Web.Editors.LogController.GetCurrentUserLog(AuditType logType, Nullable`1 sinceDate)
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()

My code looks like this (copy from tutorial):

angular.module("umbraco").controller("WelcomeDashboardAdminController", function ($scope, userService, logResource, entityResource) {
    //Set View Model
    var vm = this;

    //Get Current User
    var user = userService.getCurrentUser().then(function (user) {
        console.log(user);
        vm.UserName = user.name;
    });

    logResource.getUserLog("save", new Date()).then(function (response) {
        console.log(response);
        var logEntries = [];
        // loop through the response, and filter out save log entries we are not interested in
        angular.forEach(response, function (item) {
            // if no entity exists -1 is returned for the nodeId (eg saving a macro would create a log entry without a nodeid)
            if (item.nodeId > 0) {
                //this is the only way to tell them apart - whether the comment includes the words Content or Media!!
                if (item.comment.match("(\\bContent\\b|\\bMedia\\b)")) {
                    if (item.comment.indexOf("Media") > -1) {
                        //log entry is a media item
                        item.entityType = "Media";
                        item.editUrl = "media/media/edit/" + item.nodeId;
                    }
                    if (item.comment.indexOf("Content") > -1) {
                        //log entry is a media item
                        item.entityType = "Document";
                        item.editUrl = "content/content/edit/" + item.nodeId;
                    }
                    //use entityResource to retrieve details of the content/media item
                    entityResource.getById(item.nodeId, item.entityType).then(function (ent) {
                        console.log(ent);
                        item.Content = ent;
                    });
                    logEntries.push(item);
                }
            }
            console.log(logEntries);
            vm.LogEntries = logEntries;
        });
   });

});

But the error occurs (status 500) as soon as I add getUserLog.

The error occurs in angular on line 3310:

w.send(j || "")

Is it possible using the logResource and entityResource with SqlCE at all?

Hope you guys can give me a push in the right direction

Best

Henrik

Many partial view errors in Visual Studio

$
0
0

Hi,

I'm trying to create a simple contact form for a site by following the instructions here https://codeshare.co.uk/blog/how-to-create-a-contact-form-in-umbraco-using-mvc-and-c/

All goes fine until I create the contact.cshtml partial view and Visual Studio throws up lots of errors, most of them are the same.

Screen shot of Visual Studio

Here is the model ContactModel.cs :

using System.ComponentModel.DataAnnotations;

namespace HappyFrog.Models
{
    public class ContactModel
    {
        [Required]
        [Display(Name = "Name:")]
        public string Name { get; set; }

        [Required]
        [EmailAddress]
        [Display(Name = "Email Address:")]
        public string EmailAddress { get; set; }

        [Required]
        [Display(Name = "Message:")]
        public string Message { get; set; }
    }
}

Here is the controller ContactSurfaceController.cs

using Umbraco.Web.Mvc;
using System.Web.Mvc;
using HappyFrog.Models;
using System.Net.Mail;

namespace HappyFrog.Controllers
{
    public class ContactSurfaceController : SurfaceController
    {
        public const string PARTIAL_VIEW_FOLDER = "~/Views/Partials/Contact/";

        public ActionResult RenderForm()
        {
            return PartialView(PARTIAL_VIEW_FOLDER + "Contact.cshtml");
        }

        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult SubmitForm(ContactModel model)
        {
            if (ModelState.IsValid)
            {
                SendEmail(model);
                TempData["ContactSuccess"] = true;
                return RedirectToCurrentUmbracoPage();
            }
            return CurrentUmbracoPage();
        }

        private void SendEmail(ContactModel model)
        {
            MailMessage message = new MailMessage(model.EmailAddress, "mike@beale.me.uk")
            {
                Subject = "Enquiry from" + model.Name,
                Body = "Name: " + model.Name + "\r\n\r\n" +
                "Email address: " + model.EmailAddress + "\r\n\r\n" +
                "Message:\r\n" + model.Message
            };

            SmtpClient client = new SmtpClient()
            {
                Host = "auth.smtp.1and1.co.uk",
                Port = 587,
                EnableSsl = true,
                Credentials = new System.Net.NetworkCredential("mike@example.com", "password")
            };
            client.Send(message);
        }
    }
}

And the code in Contact.cshtml in the View\Partials\Contact folder:

@inherits UmbracoViewPage<HappyFrog.Models.ContactModel>

@using (Html.BeginUmbracoForm("SubmitForm", "ContactSurface", FormMethod.Post))
{
    @Html.AntiForgeryToken()

    <div class="form-group">
        @Html.ValidationSummary()
    </div>

    <div class="form-group">
        <div class="col-xs-3">
            @Html.LabelFor(m => m.Name)
        </div>
        <div class="col-xs-9">
            @Html.TextBoxFor(m => m.Name)
        </div>
    </div>

    <div class="form-group">
        <div class="col-xs-3">
            @Html.LabelFor(m => m.EmailAddress)
        </div>
        <div class="col-xs-9">
            @Html.TextBoxFor(m => m.EmailAddress)
        </div>
    </div>

    <div class="form-group">
        <div class="col-xs-3">
            @Html.LabelFor(m => m.Message)
        </div>
        <div class="col-xs-9">
            @Html.TextAreaFor(m => m.Message)
        </div>
    </div>
    <button>Submit</button>
}

And finally the errors in Visual Studio:

Error   CS0115  '_Page_Views_Partials_Contact_Contact_cshtml.Execute()': no suitable method found to override   Contact.cshtml  Line 1
Error   CS0246  The type or namespace name 'UmbracoViewPage<>' could not be found (are you missing a using directive or an assembly reference?) Contact.cshtml  Line 1
Error   CS0103  The name 'Context' does not exist in the current context    Contact.cshtml  Line 1
Error   CS0246  The type or namespace name 'UmbracoViewPage<>' could not be found (are you missing a using directive or an assembly reference?) Contact.cshtml  Line 1
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 3
Error   CS0103  The name 'FormMethod' does not exist in the current context Contact.cshtml  Line 3
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 5
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 8
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 13
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 16
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 22
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 25
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 31
Error   CS0103  The name 'Html' does not exist in the current context   Contact.cshtml  Line 34
Warning AD0001  Analyzer 'Microsoft.CodeAnalysis.CSharp.Analyzers.FixAnalyzers.CSharpFixerWithFixAllAnalyzer' threw an exception of type 'System.TypeInitializationException' with message 'The type initializer for 'Microsoft.CodeAnalysis.Analyzers.FixAnalyzers.FixerWithFixAllAnalyzer`1' threw an exception.'.    CSC 1

All the errors are in the Contact.cshtml partial view

  • Site is using Umbraco 7.10.4
  • Visual Studio 2017
  • I installed Umbraco 7.10.4 into Visual Studio via Nuget into an empty project.
  • I didn't use the starter kit Paul mentions in his video as the site

I hope I'm missing something simple.

Usplit and Google Analytics: 'No experiment code found'

$
0
0

Hi,

I run into a problem with the integration of Usplit and Google Analytics.

At first it seemed to work fine. Every experiment I set up in Umbraco, automatically shows up in G-A. But, the experiments don't show any results.

G-A gives as reason: 'No experiment code found.' and 'No Google Analytics tracking code found.'

Does anyone have any experience with this? Shouldn't G-A get the codes from Usplit automatically? The connections to the Google API and to the G-A account have been succesfully authorized.

Thanks, Jeroen


Unable to add Umbraco Form to content page

$
0
0

Hi,

I am trying to use to Umbraco Forms v6.0.8.0. I can create Form, add questions etc; however, I get a weird error when I add the form to a rich text editor. The error is "Request error: The URL returned a 404 (not found): "

/umbraco/backoffice/UmbracoApi/Macro/GetMacroResultAsHtmlForEditor

enter image description here

I am presently on Umbraco v7.7.4. Any help in this regards is appreciated.

Thanks

Block access to Live Environment website during development/testing phase

$
0
0

Hi All,

I'm using the starter plan of Umbraco Cloud which basically gives you ONE live environment. I also have a colleague developing. We are developing locally but to get content updates between each other during development, it forces us to deploy to the live and only environment (and we restore the content locally).

We don't really want things to be public facing at the moment and was looking if there was a way to stop people accessing the live website (I'm talking about the website itself here, not the backoffice). The whitelist option in the portal relates to the umbraco backoffice and not the actual website. Could rules be added in the web.config for example?

Any ideas?

Do we need a stock level on each variant or will it inherit from product?

$
0
0

Hey

Ive been googling around for an answer about how the stock datatype works with variants.

Because we have a customer where they only have a stock field on the "product" but not on each variant. But the stock didnt tick down, on purchases.

On the variant we have a "sku" and a "name", but I could on the specific variant they hadnt given a SKU, so im guessing that was why, since stock is stored on sku level.

I just got a bit confused, and couldnt find any doc :)

Bonus question the alias "sku" is something that is "hardcoded" like "umbracoNaviHide" and is not something we should set somewhere right?

Uninstall or update package almost always throws "Access to path denied"

$
0
0

I am completely out of ideas on how to fix this Almost every time I update or try to uninstall the package I get a "Access to the path denied" when the packager tries to remove the dll files.

I've checked the permissions and this happens with the user having all permissions as well...

I feel like it has to do with the fact that we use hangfire to do some stuff in the background.

I have tried removing the dll's in the InstalledPackage.BeforeDelete event but this didn't change anything. I've also tried stopping the recurring hangfire job in that event but that too didn't change anything.

I am completely out of ideas

Pushing featured image into partial view macro file for article

$
0
0

Hi

I am trying to pull in a featured image for each article I write into a partial view macro file which will be visible on the front end.

I have created a partial view macro file which pulls in the content of children from a specific node as follows

*I wanted to add the code using the add code feature but the formatting kept breaking*

In my article item document type, I have an upload property named "featuredImage"

I would like to pulls that into the macro so it displays along with the article so that on the front end I have the image along with the truncated and html stripped content.

Does anybody know an easy way to do this? (the featuredImage tag in the code is the bit that does not work yet and is part of my work in progress!)

Thanks

Viewing all 72689 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>