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

Urgent help pls: 'failed to get next sibling with id=3694'

$
0
0

Hi all,

I have big problem which I have noticed after last Umbraco update, but it could be something else, I am not sure that upgrade is the reason.

I have code where I can upload and delete images in Media section from the fronted of my website.

I have few fields where I can upload images. For example if I try to upload 1st image its okay, than if I upload one more image, again its all good, after that If I delete 1 od this images programatically it works good and than sometimes, not always which is so wierd i get this error:

Umbraco.Core.Exceptions.PanicException: 'failed to get last child with id=-1'

In this line: IMedia uploadFile = Services.MediaService.CreateMediaWithIdentity(model.File.FileName, mediaFolderId, "Image");

This is my code for image upload to media section:

IMedia uploadFile = Services.MediaService.CreateMediaWithIdentity(model.File.FileName, mediaFolderId, "Image");
                uploadFile.SetValue(Services.ContentTypeBaseServices, "umbracoFile", model.File.FileName, model.File.InputStream);
                Services.MediaService.Save(uploadFile);

If i continue after that error and than try to delete some other Image i get this error:

Umbraco.Core.Exceptions.PanicException: 'failed to get next sibling with id=3709'

On this line:

Services.MediaService.Delete(item);

Please somebody help me with this, i can provide more informations if needed for better understunding.

BR

Josip


Could not embed SlideShare document

$
0
0

I can embed Youtube successfully, but trying embed a SlideShare document always fail with the message "Could not embed media - please ensure the URL is valid"

The slideshare url is https://www.slideshare.net/secret/dSP7lKFAQ9EOPM

so I do not understand whether the url is faulty or the slideshare embed function does not work.

Any idea please?

Property Editor Plugins

$
0
0

What is everyone using to create property editors for V8? We have been using Le Blender for a long time and have a lot of property editors we have made over the years which will not upgrade in V8. It looks like we have to start all over with V8, which in my opinion has been a very bad decision for Umbraco to go in and is causing A LOT of frustration for developers. I for one have been looking for other mature CMS platforms. Many of the things we have programmed have to be reprogrammed or reconfigured and for what?

IDX10503: Signature validation failed using UmbracoIdentity on Windows 2016 server

$
0
0

Hi,

We created a member driven site by using UmbracoIdentity in Umbraco 8 to authenticate members against a ADFS server. This works fine on a local development enviorment but we now would like to use it on a Windows 2016 production server.

When opening the site, the ADFS server authenticates properly but when in comes back to our webserver the error: IDX10503: Signature validation failed. Keys tried: '[PII is hidden]' occures. Where using Sectigo Positive SSL certificates on this site with 4096 bits encryption.

I Googled a lot to find a solution but i don't see how i can fix this problem. Is there someone who had the same problem/error using UmbracoIdentity?

Best regards,

iNETZO

"You have unsaved changes" dialog after editing page with macro

$
0
0

I reported this bug 4 weeks ago and have still heard nothing. I can't be the only one who thinks that this bug is really important and extremly frustrating for editors? We have tried digging thru the source and fixing it ourselves but no luck sofar.

http://issues.umbraco.org/issue/U4-6265

---

Steps to reproduce:

1. Create a page with a "Richtext editor"

2. Add a Macro (even a simple one with no settings, mine just has the word "test" in it)

2. Save (it seems to work fine on the first save when you are creating the page)

3. Save

4. Navigate away

The "You have unsaved changes" dialog will now appear even though you have just saved.

The same procedure without the macro does not show the dialog.

This is on Umbraco 7.2.2 running with an emedded database

Scalability and Performance

$
0
0

I'm sure as Umbraco has stood the test of time it scales well, but I'm interested to know why/if the node hierachy doesn't suffer from performance penalities for large amounts of content in the tree? 

The database schema uses a parentId on a non-clustered index to store the hierarchy. I've seen this method before and it's always suffered from bad performance particularly for deeply nested trees. Is there a trick being used in Umbraco to avoid this issue? Are content trees not typically deep enough/big enough for this to be a problem?

If users have experienced problems with this, I wouldn't mind contributing some alternative ways of storing hierarchy relations as I've had some success with dealing with this in legacy systems in the past.

Getting started with miniprofiler and Umbraco 7

$
0
0

Hi All,

Starting to look at some performance issues with a current project and saw that MiniProfiler is included in Umbraco. A couple of different blogs / forum posts have provided conflicting views as to how to set it up.

To configure MP, it looks like I have to do the following;

  1. Set umbracoDebugMode="true" in the appSetting section of the web.config in the root.
  2. Set compilation debug="true" in the web.config in the root.
  3. Add @MiniProfiler.RenderIncludes() to the view I want miniprofiler to render in.
  4. Navigate to the appropriate URL with ?umbDebug=true on the querystring.

Despite adding all these things, I still can't get mini profiler to display. Can anyone point me in the right direction?

Thanks, James.

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

$
0
0

Hi,

I'm trying to create async Action in my Umbraco 7.4.2. Got such error :

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.

Thanks


Multi-page Form - save data

$
0
0

Hi, We're in a middle of strategic project to our company. As part of this project we're using Umbraco Forms and with the multi-page form options. However it's mandatory for us to save the data between pages so the user can return back to see the data and continue the process. In addition the marketing team need to know if users got stuck in the process in between.

I've searched for a solution for this (via coding) however until now I didn't found concrete guide on how to implement it in Umbraco Forms. I saw other packages might support it (Umbraco Contour or FormEditor) but I really don't want to go back to old versions and loose Umbraco Forms benefits. In addition I purchased it and seems to me like basic functionality to be able to save partial data in between pages.

Appreciate your help here since our project got stuck due to this issue.

Thank you in advance, Moshe

Strange user profile error

$
0
0

I had a site ready to be published when suddenly an awkward error turn up ;-(

When expanding content tree I select a node with several subnodes. Then instead of displaying the normal list view I get a backend crash report. See full output below.

I have been experimenting with user group settings and might have done some stupid things by mistake ...

  1. I created a user group with same alias as the parent node document type
  2. I experimented by logging in user with temporary gmail account Google OAuth
  3. I tried to remove the temporary user in backend. Since there was no option to delete i got desperate and just deleted the user from database (including records in related tables).
  4. To be safe I renamed user group to something globally unique

    An error occured

    Mapping types: Content -> UserProfile Umbraco.Core.Models.Content -> Umbraco.Web.Models.ContentEditing.UserProfile

    Destination path: ContentItemBasic`2.Updater.Updater

    Source value: Umbraco.Core.Models.Content

    Exception Details

    AutoMapper.AutoMapperMappingException:

    Mapping types: Content -> UserProfile Umbraco.Core.Models.Content -> Umbraco.Web.Models.ContentEditing.UserProfile

    Destination path: ContentItemBasic`2.Updater.Updater

    Source value: Umbraco.Core.Models.Content

    Stacktrace

    at Umbraco.Web.Editors.ContentController.<>cDisplayClass18_0.0(IContent content) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.

    Inner Exception

    System.NullReferenceException: Object reference not set to an instance of an object.

    at Umbraco.Core.Services.UserService.GetProfileById(Int32 id) at Umbraco.Core.Models.ContentExtensions.GetWriterProfile(IContent content) at Umbraco.Web.Models.Mapping.CreatorResolver.ResolveCore(IContent source) at AutoMapper.ValueResolver2.Resolve(ResolutionResult source) in c:\dev\AutoMapper\src\AutoMapper\ValueResolver.cs:line 12 at AutoMapper.PropertyMap.<ResolveValue>b__6(ResolutionResult current, IValueResolver resolver) in c:\dev\AutoMapper\src\AutoMapper\PropertyMap.cs:line 127 at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func`3 func) at AutoMapper.PropertyMap.ResolveValue(ResolutionContext context) in c:\dev\AutoMapper\src\AutoMapper\PropertyMap.cs:line 127 at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap) in c:\dev\AutoMapper\src\AutoMapper\Mappers\TypeMapObjectMapperRegistry.cs:line 116

Extending Models Builder in AppData Mode

$
0
0

I am trying to extend one of my generated models with a simple method called addToEmail() that adds some text to a TextString named Email.

My Site Models (generated) are in a separate Class library (Umbraco.SiteModels) and my extended model is in another Class library (Umbraco.Web.ViewModels). The latter is referencing SiteModels, and my main project library is referencing the both.

However, when I create my partial class, I'm getting no IntelliSense and a red line under Email. I have also tried using the namespace for my Site Models and other Umbraco namespaces, but still no luck.

Here is my code:

namespace Umbraco.Web.ViewModels
{
    public partial class HomePage
    {
        public string addToEmail()
        {
            return this.Email + " hello";
        }
    }
}

I did this after following a tutorial on Umbraco TV, but the project was setup slightly different to mine, and he was using Models builder API and UmbracoViewPage as opposed to AppData and UmbracoTemplatePage which is what I am using.

v8 - PluginController

$
0
0

Hi folks

So as a bit of a self learning exercise, I've taken my person website (v7) and rebuilt it from scratch in v8. I've got pretty much all of it re-written where necessary and working except one thing which is to do with how I generate my Sitemap.xml.

So to paint a quick picture my SitemapContoller is inheriting from the Umbraco.Web.Mvc.PluginController and I've dumbed down the code just to try and get a proof-of-concept working, so the Controller itself has just a Xml ActionResult that returns an empty Xml result.

In my v7 implementation I was using the ApplicationStarted event to register the sitemap.xml route with the controller name and action, and for the v8 implementation have moved this into a Composition/Component.

However when I hit the Url in the v8 imlementation I get :

[NullReferenceException: Object reference not set to an instance of an object.]
   Umbraco.Web.Runtime.<>c.<Compose>b__0_6(IFactory factory) +34
   Umbraco.Core.FactoryExtensions.GetInstance(IFactory factory) +55
   Umbraco.Web.Mvc.PluginController..ctor() +197
   MyProject.Controllers.SitemapController..ctor() +36
   DynamicMethod(Object[] ) +30
   LightInject.PerRequestLifeTime.GetInstance(Func`1 createInstance, Scope scope) in C:\projects\lightinject\src\LightInject\LightInject.cs:6207
   Umbraco.Web.Mvc.ContainerControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +45

[Exception: Failed to create an instance of controller type MyProject.Controllers.SitemapController (see inner exception).]
   Umbraco.Web.Mvc.ContainerControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +220
   Umbraco.Web.Mvc.UmbracoControllerFactory.CreateController(RequestContext requestContext, String controllerName) +109
   Umbraco.Web.Mvc.RenderControllerFactory.CreateController(RequestContext requestContext, String controllerName) +12
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +262
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1122
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131

From the information from the stack trace, I've tried various different ways of trying to register the controller (in the Composer) but to no effect.

I'm sure I'm missing something quite straight forward, but any ideas? Can provide code examples if needed.

Cheers

-lewis

Server Error after installing Umbraco 8.0.0

$
0
0

Hello All,

I tried to install Umbraco 8.0.0 on local machine using Package Manager Console on Visual Studio 2015 and .NET Framework 4.6.1. I ran the project after build, and after that, I encountered this error.

Server Error in '/' Application

Please help, ASAP.

Issue with prevalue items with comma

$
0
0

We have this scenario that the checkbox list items contains comma i.e. Doe, Jane Lee, Ann Test, Sam

So when we select both 'Doe, Jane' and 'Test, Sam' The value stored in UF Records Table is 'Doe, Joe,Test, Sam'.

How we can handle this case? Is there a way to reconfigure the delimiter to other string value?

Please advise.

Move models from development to production

$
0
0

Hi!

I'm used to developing with EPiServer and creating my models in different classes. That way the models will follow the solution when you move from a development enviroment to production. I'm currently using Umbraco version 8 and modelsbuilder with "dll" mode (which of course is good since models get strongly typed). It seems like I still have to manually create the models in each enviroment?

Is there a recommended way of handling this in Umbraco or do just have to bite the bullet and create the models manually in each enviroment (I don't want to move the whole database - only the models/dlls)?


DB migration failure

$
0
0

Hi all

we are trying to upgrade our 7.15.1 to 8.1.1 we get the following failure:

Error during installation

The database failed to upgrade. ERROR: The database configuration failed with the following message: An item with the same key has already been added. Please check log file for additional information (can be found in '/App_Data/Logs/')

See the log for full details (logs can typically be found in the App_Data\Logs folder).

when going to the log i can see the following: {"@t":"2019-09-24T14:05:03.4542856Z","@mt":"Installation step {Step} failed.","@l":"Error","@x":"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: An item with the same key has already been added.\n Please check log file for additional information (can be found in '/App_Data/Logs/')\r\n at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.ExecuteAsync(Object model)\r\n --- End of inner exception stack trace ---\r\n at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n at Umbraco.Web.Install.Controllers.InstallApiController.

any idea?

thanks E

SEOChecker: Error running scheduled task

$
0
0

Hi.

I've had similar errors before in earlier versions of SeoChecker and Umbraco, but now it seems like it has comming back in Umbraco Cloud 8.1.5 and SeoChecker 2.8.2

Do i maybe miss something in the web.config?

Message:
SEOChecker: SEOChecker: Error running scheduled task


Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Web.Hosting.IIS7WorkerRequest.GetQueryStringPtr(Int32& length)
   at System.Web.Hosting.IIS7WorkerRequest.GetQueryStringRawBytes()
   at System.Web.HttpRequest.get_QueryStringBytes()
   at System.Web.HttpRequest.get_QueryStringText()
   at System.Web.HttpRequest.BuildUrl(Func`1 pathAccessor)
   at System.Web.HttpRequest.get_Url()
   at SEOChecker.Core.Umbraco.Context.ContextInfo.Initialize(HttpContext context, Boolean editMode)
   at SEOChecker.Core.Umbraco.Context.ContextInfo..ctor(HttpContext context)
   at SEOChecker.Core.Components.ValidationqueueComponent.TimerCallback(Object sender)

Problem with "Object reference not set to an instance of an object." -

$
0
0

Hello All,

I'm having a problem with my ecommerce store. The shop online was working fine until suddenly when I click at " Shop Online" it appears the following error: "Object reference not set to an instance of an object."

It shows me source "ftCatalog.cshtml" and also the line that has a problem (it only has a { )

The Stack Trace is the following:


[NullReferenceException: Object reference not set to an instance of an object.] ASP.<>cDisplayClass6.0(TextWriter _razorhelperwriter) in w:\inetpub\tm-live\Views\ftCatalog.cshtml:209 System.Web.WebPages.WebPageBase.Write(HelperResult result) +107 ASP.PageViewsftCatalog_cshtml.Execute() in w:\inetpub\tm-live\Views\ftCatalog.cshtml:77 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +106 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +193 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +374 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +87 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +775 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +81 System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +188 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38 System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +39 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +73 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +602 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


I tried to remove the line but it didn't work out (it just gave me another problem).

Since our website was mostly develop by someone who isn't working with us I'm a little bit lost (also new to umbraco). Could you please help to understand what might me leading to this problem or/and what generated it?

Thank you in advance.

Best Regards,

Upload Image to media folder

$
0
0

Hi,

I'm using the following code, to download an image from specific URL and upload it to a media folder:

public class ImageService
{
    private readonly IMediaService _mediaService;

    public ImageService(IMediaService mediaService)
    {
        _mediaService = mediaService;
    }

    public int UploadMedia(string imageSrc)
    {
        IMedia newImage = null;
        try
        {
            var mediaSvc = _mediaService;
            var mediaExtension = Path.GetExtension(imageSrc);
            var imageName = Guid.NewGuid() + mediaExtension;

            var image = DownloadImageFromUrl(imageSrc);

            const string rootPath = "~\\media";
            var fileName =
            HttpContext.Current.Server.MapPath(Path.Combine(rootPath, imageName));
            image.Save(fileName);

            var parentFolderId = 5177;
            newImage = mediaSvc.CreateMedia(imageName, parentFolderId, "Image");

            var buffer = System.IO.File.ReadAllBytes(HttpContext.Current.Server.MapPath("~\\media\\" + imageName));

            newImage.SetValue("umbracoFile", new MemoryStream(buffer));
            mediaSvc.Save(newImage);

            if (System.IO.File.Exists(HttpContext.Current.Server.MapPath("~\\media\\" + imageName)))
            {
                System.IO.File.Delete(HttpContext.Current.Server.MapPath("~\\media\\" + imageName));
            }
        }
        catch (Exception ex)
        {
            // log the exception
        }
        return newImage.Id;
    }

    private System.Drawing.Image DownloadImageFromUrl(string imageUrl)
    {
        System.Drawing.Image image = null;
        try
        {
            var webRequest = (HttpWebRequest)WebRequest.Create(imageUrl);
            webRequest.AllowWriteStreamBuffering = true;
            webRequest.Timeout = 30000;

            var webResponse = webRequest.GetResponse();
            var stream = webResponse.GetResponseStream();
            image = System.Drawing.Image.FromStream(stream);

            webResponse.Close();
        }
        catch (Exception ex)
        {
            // log the exception
        }
        return image;
    }
}

downloading and saving in to the file system works. the image file can be opened and all good. It gets also uploaded to the subfolder with the ID in the media folder, but the uploaded image file is not really an image file, looks like a zombie.

It doesn't have a thumbnail, no width, height, size, ... I also can't open the image. see the screenshot

enter image description here

any ideas?

thanks

dee

Excluding Menu from navigation bar

$
0
0

How to exclude menu from navigation list in umbraco v8

Viewing all 72689 articles
Browse latest View live


Latest Images

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