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

Custom section tree node route path takes from view folder

$
0
0

Hi all.

Using Umbraco 7.6.5

I am playing around with Custom Sections, and are stuck trying to set the route path.

if i set the route path to myCustomSection/settings/edit/1 it will try and take the edit.html from /View/settings/edit.html, how can i change it to take from /App_Plugins/MyPlugin/backoffice/settings/edit.html ?

Here is an exsampel.

// Let's say my tree alias is Parent.
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
    if (id == "-1")
    {
        var rootNodes = new TreeNodeCollection();

        // This one takes the view correct at /App_Plugins/MyPlugin/backoffice/parent/edit.html
        var folder = CreateTreeNode("0", "-1", queryStrings, "Parent", "icon-truck color-blue", true);
        rootNodes.Add(folder);

        return rootNodes;
    }
    else
    {
        switch (id)
        {
            case "0":
                var childNodes = new TreeNodeCollection();

                // This one trying to get /View/settings/edit.html
                var settings = CreateTreeNode("1", "0", queryStrings, "Settings", "icon-settings-alt color-blue", false, "myCustomSection/settings/edit/1");
                childNodes.Add(settings);

                // This one trying to get /View/child/edit.html
                var anotherChild = CreateTreeNode("1", "0", queryStrings, "anotherChild", "icon-untitled color-blue", false, "myCustomSection/child/edit/1");                
                childNodes.Add(anotherChild);

                return childNodes;
        }
    }

    //this tree doesn't suport rendering any more levels
    throw new NotSupportedException();
}

Any help is appreciated.


Login member and user via FormAuthentication at once

$
0
0

Hi everybody,

I'm working on an intranetproject in Umbraco. I use FormAuthentication to login the members. What i want to do is after a member is succesfull authenticated, is to check if there is a user account with the same username as the member and login this backenduser as well. The member authenticates by Active Directory username and password (via a surfacecontroller).

The memberauthentication works well but I can not get the user authenticated after succesfull authenticating the member.

I have tried to do this with the code below but it doesn't work because when navigating to "/umbraco" the user still gets the loginform.

                var user = Services.UserService.GetByUsername(model.Username);
                if (user != null)
                {
                    new HttpContextWrapper(System.Web.HttpContext.Current).CreateUmbracoAuthTicket(
                        new UserData(Guid.NewGuid().ToString())
                        {
                            Culture = user.Language,
                            Id = user.Id,
                            RealName = user.Name,
                            Username = user.Username
                        });
                }

When using the code above, there is a cookie created called "UMB_UCONTEXT". Did I forgot something or is there another way to authenticate users programmatically only by username?
Thanks in avance!

iNETZO

Newsletter Studio - Insert url content & RenderTask

$
0
0

Hi,

We are recently updated the Newsletter version to 1.4.5,2 and upgraded site from HTTP to HTTPS.

Issue : We are trying to add site content using "Insert url Content" option in newsletter studio. we are able to insert the url but when send/preview the newsletter, it is showing as "could not load

We are facing this issue only for the content within the site but 3rd party urls are rendering without any issue.

Please advise us.

Is it possible to render the page content using RenderTask(company.RenderTask) ? if so, Please let us know how to use it to render the page content using it and share few samples for it.

Or

Is the any other way to customise to render the url content within the newsletter body.

Regards, Murugan H

JS error when aligning content (left, center, right, justify) in richtext editor

$
0
0

Hey guys.

I have an Umbraco 7.10.3 website. In the Grid Layout, in a Richtext Editor, I get a javascript error when I try to align the content (left, center, right or justify).

Is this a known bug? How can I fix it? The possibility to manually center content is a requirement for this website.

Javascript error:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at HTMLDocument.document.createElement (<anonymous>:348:18)
at Object._ [as create] (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at a (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at Object.xv [as applyFormat] (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at toggle (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at Object.toggle (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at d (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at Mm.execCommand (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)
at YC.execCommand (tinymce.min.js?umb__rnd=402a3f7dde65ccb5db6fbb1935eb6129:2)

Random missing images from media folder

Help a beginner from WordPress to Umbraco

$
0
0

Hi!

I have a couple of years experience with WordPress and PHP. Next to my study, I have my own little web bureau. I've recently let down 2 potential costumers who asked me to make a website in Umbraco and I can read that there are many advantages to using Umbraco rather than WordPress.

Now I have decided to learn Umbraco!

I have purchased a domain where I will try to make an entirely identical website as my current one hjælptilweb.dk

Usually, my customers will show me a webpage they want their new website to look like. That's why I think it's a good practice for me to tryna copy my current one.

Heres my problem:

The template I've used for my site (themeforest.net/seo-crawler) is not compatible with Umbraco (I guess its a good practice for me) but now I don't know where to start? I hope to find a person who can help me (I would like to pay an Umbraco expert to give me weekly feedback/help with the project).

Another quick question (hope it's ok) I have made a website a few years ago uniplandanmark.dk

Because it was an exam-project, it had to be hardcoded... Isn't there an easy way to convert it into Umbraco CMS so the owner can edit the page himself?

Hope someone can help me or point me in the right direction!

Dictionary value in ApiController not returning value

$
0
0

Hello folks!

I can't get the dictionary value in an api controller...

Setting the culture doesn't do the trick (either or both), and only an empty string is returned.

Thread.CurrentThread.CurrentCulture = new CultureInfo(model.Culture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(model.Culture);
var productSelectorPageId = Umbraco.GetDictionaryValue("productSelectorPageId");

Any ideas, anyone?

Get Site Root in ApiController with Multi-Root Site FIltering by Doc Type

$
0
0

In all the time I've been using Umbraco I can't believe I've never come across this before. Of course I can get the current site root given only a specific node Id, but it's ugly and brute force. So I get to ask a forum question:

In an ApiController (so I don't have UmbracoContext.Current.PublishedContentRequest, Model, etc...) what is the best (or a good) way to get the root node of a specific type for the current site given I have a multi domain instance?

I am passing the current node Id to the controller, and that is all I know about which site in this instance the Api call is coming from.

I'd love to have more insight...thank you in advance!


Error during PDF Creator evaluation

$
0
0

I am attempting to evaluate PDF Creator in Umbraco 7.10.4.

I am getting a YSOD "No physical template file was found for template PDFRazorExample". Does this mean PDF Creator is not compatible with Umbraco 7.10.4, or am I missing a configuration step?

Beginning of stack trace: [Exception: No physical template file was found for template PDFRazorExample] Umbraco.Web.Mvc.RenderMvcController.CurrentTemplate(T model) +157 Umbraco.Web.Mvc.RenderMvcController.Index(RenderModel model) +10 lambdamethod(Closure , ControllerBase , Object[] ) +79 System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) +14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) +157 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +27 System.Web.Mvc.Async.AsyncControllerActionInvoker._39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +22 System.Web.Mvc.Async.WrappedAsyncResult2.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49

Text editor not responsive

$
0
0

Hi Guys!

I need help with making Images inside Umbraco text editor responsive.

Thanks KEVIN

Grid Control Inline errors

$
0
0

Hello,

Does anyone know how you can hide the inline error message on the grid controls. I thought this was the silent option in UmbracoSettings.config, but that seems to be Macros only.

I'd ideally like it to do the same thing and hide the grid control if there's an error.

Thanks

Paul

Adding Workflow Gives "cannot read property 'push' of null"

$
0
0

Hi All

I'm currently struggling to configure a form by adding a new workflow. Here's the steps I'm following to get this error:

  1. In the forms section I click the ellipsis and create a contact form
  2. Scroll down to the bottom of the create form page and click "configure workflow"
  3. Select "Add Workflow" then "Send Email"
  4. Fill out this section and hit submit

I receive this error in the js console:

Cannot read property 'push' of null    
    at Object.submit (umbraco.forms.js?cdv=1883484025:2817)
    at umbraco.forms.js?cdv=1883484025:2944
    at i (angular.min.js?cdv=1883484025:79)
    at i (angular.min.js?cdv=1883484025:79)
    at i (angular.min.js?cdv=1883484025:79)
    at i (angular.min.js?cdv=1883484025:79)
    at angular.min.js?cdv=1883484025:80
    at Object.$eval (angular.min.js?cdv=1883484025:92)
    at Object.$digest (angular.min.js?cdv=1883484025:90)
    at Object.$apply (angular.min.js?cdv=1883484025:92)

I've tried this with Umbraco 7.10.4 and Forms 7.0.2, I've also tried it with Umbraco 7.9.0 and Forms 7.0.0 and I receive the same error.

Am I missing something?

Edit the html of "Choose type of content" in grid layout

$
0
0

I would like to change the view on the "Choose type of content" box. My idea is to have drop down and filter all different content types based on the icons in different boxes. so it works something like the image below. But cant find the files linked to the box. what is the name of the file(s)? or is this something that already exists that i can use?

enter image description here

enter image description here

Slow performance when dealing with member api

$
0
0

I have the need for a pretty featureless protected page on the site I am working on. It has roughly 9000 members and is completely unusable. Loging in a member can take roughly 20 seconds.

Members.Login(model.Username, model.Password)

Updating a members is the same

            var u = memberService.GetByUsername(model.Username);
            string p = System.Web.Security.Membership.GeneratePassword(6, 0);
            memberService.SavePassword(u, p);

When dealing with the cache the page is quick but as soon as I need a database query that accesses the members data the site barely functions.

My login is located in a SurfaceController. 9000 members does not seem like it should be enough to cause 20 second delays.

The members have no custom properties and there is only one member role and group.

Child list

$
0
0

Hi

This is will be really easy for someone who knows how.

I've got a list of child pages that are events.

   @{
            var page = Umbraco.TypedContent(1086);

        }

        <div class="panel">
            @foreach (var child in page.Children)
            {

               <a href="@child.Url">Link</a>

            }

I need to display a list of those pages on another page but need to get more information about them. So I need things like event name (eventName) etc and just cant seem to get them out.

Can anyone advise.

Thanks.


Open discussion about the Umbraco 'repository pattern' to define re-usable content/data

$
0
0

I’m hoping my ramble will be of interest to many as it’s an aspect of Umbraco that's been bugging me for some time.

I have diligently followed the common “repository pattern” whereby I define a document type for fragments of data that I wish to record once. These fragments are created at root level inside a "repo" folder so that they can be picked on various pages typically using an MNTP.

Examples of the types of data you might want to create once, but use many times in a document might be:

Details about Businesses. Details about People. Promotional display items i.e panels, accordions and other re-usable "widgets" or UI. Forms. Definitions, Tags or Types which allow you to define filtering/grouping in lists of items.

There are two reasons I particularly dislike this method...

  1. The repository content exists in the document node tree and has a route attached to it even though it will never have a template or be called in a browser. Accidental calls to the url have to be redirected or 404’d. Personally, I don’t like this as it seems counterintuitive to the requirement and use of these data fragments.

  2. When you use an MNTP picker to pick a repo item, the data doesn’t exist in that document, only the id to it. This requires extra code to look the content up and make it available for the document/template.

Has anyone found a better solution to this pattern?

I’ve looked a little at Fluidity and UI-O-Matic, both on the surface look promising. For these be a true solution though I would need fine-grained user access rights to the custom data not just the entire section and the data should exist in the document when its linked, no MNTP style look-ups.

In my minds eye, I was thinking of an extension to nested content and document type compositions whereby you tag the composition as a data store off the document tree. You would define these elements in a dedicated section (like in Fluidity/UI-O-matic) with a FULL user access UI (section and fine-grained permissions i.e. CRUD on folder containers and individual items).

If you pick this special composition inside a nested content datatype, it will act more like an MNTP and give you a picker instead but with the difference that you can (optionally) edit the fields with a warning it would be a universal change (where used) or detached and become normal nested content (just this page). On publish the data fragment is embedded (retaining any links) as part of the page content like a normal nested content.

All comments welcome…

How works Html.BeginUmbracoForm() and Url.SurfaceAction()?

$
0
0

Hello, Umbracians.

I'am trying to examine how to interract MVC controllers with html forms.

And there are few misunderstandings about how it works.

Here is result of Html.BeginUmbracoForm("actionName", "controllerName")

<form action="/%D0_ManyCharsHere_0%D0%B5/" enctype="multipart/form-data" method="post"> 
    <input name="ufprt" type="hidden" value="083BE_ManyManyCharsHere_AAF">
</form>

What a atrange value in action atribute? Looks like encrypted name of SurfaceContoller.

And what is it:

<input name="ufprt" type="hidden" value="083BE_ManyManyCharsHere_AAF">

Again, looks like some kind of encrypted data that will be send to SurfaceController.

But, how it interract each other I have no idea. Is it a common ASP MVC mechanism or Umbraco feature?

Structured location data

$
0
0

Hi Jonathan,

Loving the Terratype plugin!

Have integrated it into a new application as a sort of store locator with various locations. At the minute, as part of my DocumentType, I have a separate property for users to enter an address (purely for display and not tied to Terratype). This means when a user uses Terratype to define the map location they are entering/ searching for the address a second time.

Is there any way to access the full structured data returned by the Google Places Autocomplete - similar to the Terratype.Lookup property - so that I can format/ display this location data on the front end?

Thanks!

Merchello multiple product options not working on front-end website

$
0
0

I use Merchello plugin on Umbraco to display products on our website.

We do not sell the products directly from the website but use Merchello so that users can create a 'project list'.

On products where there is only one product option available (one option with 5 variables), I can go onto the front-end website and select the option I want, in the qty I want, and add this to my 'project list', however, when there is more than one product option available for a product (2 options with 20 variables), the drop-down boxes are greyed out completely on the front-end website.

Can anyone shed some light on this?

Migrating pages from old CMS to Umbraco grid

$
0
0

Hi everyone,

I need to migrate many webpages from an old CMS that stores data in an SQL Server database to Umbraco. The old CMS allows content editors to create pages by setting any kind of layout they wish in a user friendly graphical interface. I need to give content editors the ability to recreate these pages in Umbraco.

In Umbraco, I have already created the required document types and templates to achieve this. The content for these pages is created using grid layouts that I have created and which function fine. The content editor is able to pick any combination of the grid row layouts that have been created (5 of them), and create content like Rich Text Editors and Macros (there's a lot of data to be entered in the macro parameters) in these grid row layouts.

So the content editor can create a page like:

  • Row layout 1
  • Row layout 4
  • Row layout 2
  • Row layout 5
  • Row layout 1
  • and so on...

In addition, there are many components on the old CMS that I have recreated in Umbraco as macros which require content editors to enter a variety of parameters like text, picking content, picking images etc. In Umbraco, the content editors will use these macros in the grid layouts. The grid and macros work fine and allow content editors to recreate the pages exactly how they need to.

Because there are a huge number of pages to create, I am required to migrate the content from the old CMS to Umbraco. I have read the CMSImport documentation at https://our.umbraco.org/projects/developer-tools/cmsimport/ and found out that Umbraco grid and macro migration isn't something that's available out of the box.

I have also read the article at http://skrift.io/articles/archive/hybrid-grid-editors-get-more-mileage-from-your-grid/ which talks about migrating content into an Umbraco grid but I'm not sure if this procedure will be applicable to my situation because the content editor needs to make a decision about which grid layout to use based on how the existing webpages are displayed.

In addition, the data from the existing CMS components has to be migrated into the Umbraco macros that I have created.

How would I go about doing the migration from the old CMS to the Umbraco grid and the macros within the grid?

Lou

Viewing all 72689 articles
Browse latest View live


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