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

NuCache fails to rebuild (Umbraco 8)

$
0
0

Hi, some media items randomly started to disappear from website, they are returned as null when they are requested from a view.

When we hit the rebuild memory cache button under settings in Umbraco we get an error message that the cache couldn't be triggered and this is the exception from the log:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.AddTreeNodeLocked(ContentNode content, LinkedNode`1 parentLink) in D:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 964
   at Umbraco.Web.PublishedCache.NuCache.ContentStore.SetAll(IEnumerable`1 kits) in D:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\ContentStore.cs:line 711
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.LoadMediaFromDatabaseLocked(IScope scope, Boolean onStartup) in D:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 453
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.NotifyLocked(IEnumerable`1 payloads, Boolean& anythingChanged) in D:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 773
   at Umbraco.Web.PublishedCache.NuCache.PublishedSnapshotService.Notify(JsonPayload[] payloads, Boolean& anythingChanged) in D:\a\1\s\src\Umbraco.Web\PublishedCache\NuCache\PublishedSnapshotService.cs:line 749
   at Umbraco.Web.Cache.MediaCacheRefresher.Refresh(JsonPayload[] payloads) in D:\a\1\s\src\Umbraco.Web\Cache\MediaCacheRefresher.cs:line 46
   at Umbraco.Core.Sync.ServerMessengerBase.Deliver[TPayload](ICacheRefresher refresher, TPayload[] payload) in D:\a\1\s\src\Umbraco.Core\Sync\ServerMessengerBase.cs:line 295
   at Umbraco.Web.Cache.DistributedCache.RefreshByPayload[TPayload](Guid refresherGuid, TPayload[] payload) in D:\a\1\s\src\Umbraco.Web\Cache\DistributedCache.cs:line 83
   at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshAllMediaCache(DistributedCache dc) in D:\a\1\s\src\Umbraco.Web\Cache\DistributedCacheExtensions.cs:line 163
   at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshAllPublishedSnapshot(DistributedCache dc) in D:\a\1\s\src\Umbraco.Web\Cache\DistributedCacheExtensions.cs:line 184
   at lambda_method(Closure , Object , Object[] )
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(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__1.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__6.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__6.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__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.<CallOnActionExecutedAsync>d__6.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__6.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__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.<CallOnActionExecutedAsync>d__6.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__6.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__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.<CallOnActionExecutedAsync>d__6.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__6.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__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.Controllers.ActionFilterResult.<ExecuteAsync>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.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.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__3.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__3.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__6.MoveNext()

Any ideas? Umbraco version 8.2.2


Any plans to update this package to V8?

$
0
0

Hello.

Are there any plans to update this package to make it work with V8? I have a lot of sites that use this package and that will be updated soon to V8. So far, there are no other alternatives to your package (other than using tags) for Umbraco 8.

Cheers,

Umbraco forms condition with special character

$
0
0

Hi everyone

I'm using Umbraco forms with conditions but it's not working when the condition has special character in his field.

enter image description here

Has someone the same problem?

Umbraco 8 disable url tracker

How to write a conditional statement with empty property alias

$
0
0

What is the recommended approach for writing a conditional statement with a property alias? For example, if you have a text string property alias called propertyAlias and you want to do nothing if the property alias has no text, but do something else if the property alias has text, what would be the approach?

Examine indexing issues and high CPU

$
0
0

Hi,

We're using Umbraco 8.2.2 for a large site. Everytime we restart the applicationpool we have to reindex all Examine indexes because we're using examine to find the latest newsitems that are meeting some conditions.

If we dont index manualy after starting the site, this content is not showing up. Sometimes it looks like the indexes get corrupt with causes high CPU usage. If we reindex again, the performance gets back to normal.

Often (a few times a day) we get these type of errors:

[Error] Error indexing queue items
System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Collections.Generic.Dictionary`2.Remove(TKey key)
   at Umbraco.Examine.ValueSetValidator.Validate(ValueSet valueSet) in C:\Umbraco-CMS-8-8.2\src\Umbraco.Examine\ValueSetValidator.cs:line 85
   at Examine.Providers.BaseIndexProvider.<IndexItems>b__12_0(ValueSet x) in C:\projects\examine-qvx04\src\Examine\Providers\BaseIndexProvider.cs:line 76
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at Examine.LuceneEngine.Providers.LuceneIndex.ForceProcessQueueItems(Boolean block) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 879

and these:

[Error] Error indexing queue items
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.CopyTo(KeyValuePair`2[] array, Int32 index)
   at Examine.LuceneEngine.Providers.LuceneIndex.CopyDictionary(IDictionary`2 d) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 654
   at Examine.LuceneEngine.Providers.LuceneIndex.AddDocument(Document doc, ValueSet valueSet, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 666
   at Examine.LuceneEngine.Providers.LuceneIndex.ProcessIndexQueueItem(IndexOperation op, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 1201
   at Examine.LuceneEngine.Providers.LuceneIndex.ProcessQueueItem(IndexOperation item, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 1020
   at Examine.LuceneEngine.Providers.LuceneIndex.ForceProcessQueueItems(Boolean block) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 879
2020-03-04 20:10:33.635 +01:00 [Error] Error indexing queue items
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.CopyTo(KeyValuePair`2[] array, Int32 index)
   at Examine.LuceneEngine.Providers.LuceneIndex.CopyDictionary(IDictionary`2 d) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 654
   at Examine.LuceneEngine.Providers.LuceneIndex.AddDocument(Document doc, ValueSet valueSet, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 666
   at Examine.LuceneEngine.Providers.LuceneIndex.ProcessIndexQueueItem(IndexOperation op, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 1201
   at Examine.LuceneEngine.Providers.LuceneIndex.ProcessQueueItem(IndexOperation item, IndexWriter writer) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 1020
   at Examine.LuceneEngine.Providers.LuceneIndex.ForceProcessQueueItems(Boolean block) in C:\projects\examine-qvx04\src\Examine\LuceneEngine\Providers\LuceneIndex.cs:line 879

Unfortunately, the index name is not mentioned in the error message.

Is there a way to find out which nodes might cause these indexing problems?

Best regards,

iNETZO

Cache Instructions that break the cache between load balanced servers

$
0
0

Can anyone elaborate on this cache instruction?

37772   2018-10-12 09:21:39.780 [{"RefreshType":3,"RefresherId":"e057af6d-2ee6-41f4-8045-3694010f0aa6","GuidId":"00000000-0000-0000-0000-000000000000","IntId":0,"JsonIds":"[71]","JsonIdCount":1,"JsonPayload":null}] WEB01A//LM/W3SVC/4/ROOT [P3148/D2] E713C88F600A4523AD70DFECB1B0EA9B  1

The nodeId of 71 doesn't really make any sense (it's not a content node, in fact looking in the database there is no node with an id of 71!) and there is no instruction to process, the slave server cannot get past the instruction before this and so I think it is failing on this specific instruction.

Umbraco 7 Programatically set umbracoFile on MediaItem doesn't work with Azure Blob Storage...

$
0
0

Hi All!

I've recently switched to Azure Blob storage for media items on a Umbraco 7 Cloud project. Works well.

Except, I have an integration to some imageserver, that we're getting images from, so that upon pull from a specific service, we download images and add them to Umbraco Media Library (through an eventhandler).

This part worked like a charm, untill I switched to Azure Blob storage. Now, the media items are getting created, the 'umbracoFile'-property is being set, but the actual image isn't there, thus all images goes 404 on me...

The error log tells me that "Blob not found", for all the imported items..

Is there something i need to adjust on this bit of code (using memorystream to set umbracoFile)?

// Download file from url
                using (var stream = _httpClient.GetStreamAsync(fullImageUrl).ConfigureAwait(false).GetAwaiter().GetResult())
                {
                    using (var memoryStream = new MemoryStream())
                    {
                        stream.CopyTo(memoryStream);

                        string fileName = new Uri(imageRef.BaseImageUrl).Segments.Last();

                        // Set umbracoFile property
                        item.SetValue("umbracoFile", fileName, memoryStream);

                        // Set metadata properties
                        TrySetPropertyValue(item, pt => pt.AltText, metadata.Caption);
                        TrySetPropertyValue(item, pt => pt.PublicationStatus, metadata.PublicationStatus);
                        TrySetPropertyValue(item, pt => pt.DisplayCredit, metadata.DisplayCredit);
                        TrySetPropertyValue(item, pt => pt.MetadataUpdated, DateTime.Now);
                    }
                }

Bonus info; Creating media items and uploading files through media-section works like a charm...


Why does MemberService issue a ReadLock of the entire MemberTree for its queries?

$
0
0

We noticed our Azure SQL Server CPU spiking on user login (we may have been hit with a bot, but that type load is to be expected at certain times for us). When I ran the query execution plan, it seemed fine.

Then Azure was telling us that there was locking going on. I then dug into the MemberService code, and saw the following:

public IMember GetByUsername(string username)
{
    // TODO: Somewhere in here, whether at this level or the repository level, we need to add
    // a caching mechanism since this method is used by all the membership providers and could be
    // called quite a bit when dealing with members.

    using (var scope = ScopeProvider.CreateScope(autoComplete: true))
    {
        scope.ReadLock(Constants.Locks.MemberTree);
        var query = Query<IMember>().Where(x => x.Username.Equals(username));
        return _memberRepository.Get(query).FirstOrDefault();
    }
}

We are curious as to why the tree is being locked to query a user by username? Also, is there any plan to cache this? It seems like a high priority area to cache for any site that has members.

Thanks

Nuget packages

$
0
0

Hi, I am starting a new project and am wondering which uSync packages to install from Nuget. I want to ensure that the project developed locally is version controlled and visual studio .cs files are tracked outside of git. Also, regular backups are taken of the database. Is uSync the right package for this? After install, is there any setup required?

I am trying to fully understand uSync and its practical capabilities.

Multiple websites with same login for members

$
0
0

I have 2 websites, each website have its own registration and login form, members etc.

What i need:

When member with existing account on website1 want to create account on website2, should be able to create that account with one click in his dashboard in website1 and vice versa.

After that when he have accounts created on both websites, and if he is logged in , should be able to switch beetwen this websites without login again.

Members can login with same username and password on both login forms.

I dont have any idea where to start. Any input and advice would be appriciated.

Form Rendering in 3+

$
0
0

Hi,

I've downloaded version 3.0.0 via nuget and I'm hoping to get some help rendering the form.

The instructions from your site http://www.formulate.rocks/render-form no longer seem valid. Namely, 'Rendering' is no longer present in the 'formulate.api' namespace. However, I was able to output the form content to the page like so:

@Html.Action("Render", "FormulateRendering", new { form = Model.Form })

However, the form does not render, presumably, because of some missing javascript dependecies. Can you please let me know what scripts I need to refence in my view to render a form in this new version?

n.b. I'm on Umbraco 8.1, .Net 4.7.2

Thanks in advance

Is it possible to have culture invariant - i.e. "locked" - node names in Umbracao 8.1.5?

$
0
0

Hello fellow Umbraco-neers,

I have recently upgraded my company website to Umbraco v8 to benefit from the new - and awesome - multilingual functionalities.

I love that I can specify which properties of my document types are allowed to vary with culture, however, I am missing the option to do the same with the node name itself.

Our company website does multi-culture in the form of https://our-domain.dk/

Now, when our website editor uses the new split view to author articles in different languages, the node name is required for each language that is published. However, if the editor chooses another node name than the original, e.g. "About" instead of "About us", the URLs will be different, i.e. https://our-domain.dk/en/about and https://our-domain.de/de/about-us, respectively.

Is it possible to "lock" the node name once the original node has been created?

Is there any way to "lock" or to prefill the node name of culture variants created after the original?

I wish to keep our URLs streamlined and consistent to optimize SEO and URL-navigation across multiple cultures.

I hope that someone has a good idea to solve this. (:

Kindest regards Simon

Create a redirect page

$
0
0

Hi all,

I'm looking at creating a redirect page, so if you click on the page it redirects you to an external URL.

I've created a doc type with a template called "Page Redirect" with a field called Link Target inside my template I have the following code;

@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.PageRedirect>
@using ContentModels = Umbraco.Web.PublishedModels;

@{
    Layout = "master.cshtml";
    string linkUrl = "";
    if(Model.HasValue("linkTarget"))
    {
       var linkItem = Model.linkTarget.First;
       linkUrl = linkItem.link;
    }

    if(!String.IsNullOrEmpty(linkUrl))
    {
       Response.Redirect(linkUrl);
    }
}

But I'm getting the following error;

CS1061: 'PageRedirect' does not contain a definition for 'linkTarget' and no accessible extension method 'linkTarget' accepting a first argument of type 'PageRedirect' could be found (are you missing a using directive or an assembly reference?)

Any advice to get this working? :)

Building and using a custom dictionary

$
0
0

Trying to find out the best way to tackle this issue:

Assuming I need one or internal dictionary (like the c# key-value dictionaries), for example a dictionary that stores a list of people names and their ids.

I will need an API for adding / removing / editing and searching an item by ID and of course I will need these items to be stored in the db so they could be used in all pages.

for example I will create a service that reads an external list of people and their IDs and populate this "dictionary" something like Dictionary.AddValue(100, "John Doe") accordingly.

On my views Razor pages I could use something like @Dictionary.GetValue(100) which will generate "John Doe" html string.

At first I was thinking of using Umbraco Dictionary but it seems that its API is very limited.

Anyone got any direction ?

Thanks!


List nested in Umbraco 8, with properties offered by Umbraco by default.

$
0
0

Hello, how am I new to Umbraco, and I am looking for a way to make a nested list, I already know how to create a new property with the property editor but I have not yet seen how to call different properties that already come by default in Umbraco.

Form Label

$
0
0

Hello Umbraco Community,

I am using Umbraco version 7.7.2 assembly: 1.0.6484.21641. Current installed version of Umbraco Forms: "6.0.3". I have a form created with various fields. An external accessibility audit is flagging up 'Ensure form controls have labels WCAG A 1.3.1' People using screen readers are not able to see the layout of a form. To make forms accessible, they must define explicit text labels for each form control. The Submit button and reCaptcha are also being picked up with the same.

I can see in the code there is a label but with a key ''

Obviously this in not very friendly for screen readers. How can I edit this Label in the form builder? Can I even add a more friendly Label?

Any help appreciated,

Thanks

Bal

Umbraco forms conditions using dictionary keys

$
0
0

Hello,

I'm trying to create a multilangual form using the umbraco forms package. I've found that it is possible to translate labels by using a # in front of the label and adding it to the dictionary.

The current problem I am facing is that I can't use conditions anymore this way.

For example I want to show an input field if the user select a checkbox from a checkboxlist (the labels are all translated ofcourse) but the conditional doesn't execute this way.

Example:

show this field if all of the following match: Type diploma is #test

If Attribute Routing is enabled and a named route is used the backoffice breaks

$
0
0

https://github.com/umbraco/Umbraco-CMS/issues/4620

after reading this post i found that i have the same problem in setting webhooks in u7

the version that im using is 7.15.3

when i register

GlobalConfiguration.Configuration.MapHttpAttributeRoutes

everything works ok but the backoffice stops working with yosd messages

anyone has a solution for this ?

thank you

Umbraco 7.4.3 support

$
0
0

Umbraco Team,

We are using Umbraco 7.4.3. with Umbraco forms 4.3.2. We want to know that till when it will be supported officially?

Also, let us know how we can proceed to upgrade the latest one.

I appreciate your help.

Thanks, Nitesh

Viewing all 72689 articles
Browse latest View live


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