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

Using custom data sources for fields

$
0
0

Hi,

I am looking to create a form using Formulate and there are fields on this form that need values from a data source by getting them via an API, for example drop list values. I see there is a "Data Sources" option available and that it hasn't been implemented yet.

Are there any plans to implement this soon? If not, is there a way I can achieve pulling field data from an API without using this feature? A lot of the forms we want to make using Formulate will need custom field data, so a solution to this problem would be great.

Thanks!


Error converting DB values to editor values

$
0
0

Hi.

Running Umbraco Cloud 8.1.4 and SeoChecker 2.8.2

We are getting alot of errors on Umbraco Cloud that state SeoChecker cant convert DB values to editor values.

Message:
SEOChecker: SEOChecker: Error converting DB values to editor values


Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
   at SEOChecker.Core.Umbraco.DocumentWrappers.UmbracoDocument..ctor(IContent doc, IContextInfo info, String culture, String segment)
   at SEOChecker.Core.Repository.Umbraco.UmbracoDocumentRepository.Single(Int32 id, IContextInfo context, String culture, String segment)
   at SEOChecker.DataTypes.PropertyEditors.PropertyEditorWrappers.SEOCheckerPropertyWrapper.ToEditor(Property property, IDataTypeService dataTypeService, String culture, String segment)

Testing custom repository

$
0
0

First post so hi all :)

can anyone tell my how can i test my custom repositories? i have a repo which is using umbraco database:

public class MyRepository : IMyRepository { protected readonly UmbracoDatabase db;

    public MyRepository()
    {
        db = ApplicationContext.Current.DatabaseContext.Database;
    }

    public void EditRestaurant(Restaurant restaurant)
    {
        var updatedRestaurant = db.SingleOrDefault<RestaurantPoco>("SELECT * FROM Restaurants WHERE Id = @0", restaurant.ID);
        if (updatedRestaurant == null)
        {
            throw new KeyNotFoundException("Restaurant has not been found.");
        }

        db.Update("Restaurants", "Id", Mapper.Map<Restaurant, RestaurantPoco>(restaurant, updatedRestaurant));
    }
}

i would like to use test database for my unit tests.

How can i do this?

thx in advance for help

Umbraco 8 Image Processor

$
0
0

Hello,

We have one funny bug on our production site.

Sometimes images are not showing on frontend but they are showing in the CMS. And when i re-upload image problem is gone.

I got alot of errorslike this in Log Viewer: "ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 610 : No image exists at https://xxxxxxxxxx.blob.core.windows.net/production/y5ei1wky/imagename.jpg" But when i open blob storage image is there.

Someone help please, Thank you :)

Umbraco Forms custom field type custom settings property not saving

$
0
0

I have created a new custom field type and within that a settings property.

    [Umbraco.Forms.Core.Attributes.Setting("Test Property", description = "Test Description")]
    public string TestProperty { get; set; }

For some reason it is not saving when I submit. I can debug the variable and see that the value is being set, but when I navigate away or refresh then the value is gone.

Any ideas? :)

How to catch all unhandled exceptions?

$
0
0

Hi, is it possible to catch all exceptions in one place, so I can log them? Thank you!

2FA - Umbraco 8 - Redirect to backoffice after successful code

$
0
0

Howdy!

We have two factor authentication enabled for our Umbraco site, in Umbraco 7 we used this code snippet to verify the 2fa code:

authResource.verify2FACode(provider, code)
                .then(function (data) {
                    userService.setAuthenticationSuccessful(data);
                    $scope.submit(true);
                }, function(response) {
                    $scope.error = true;
                });

Now the $scope.submit(true) throws a error:

TypeError: $scope.submit is not a function

And the user is not redirected to the backoffice. If the page is reloaded manually (F5) the backoffice appear as expected, means that the cookie is set correctly.

Any ideas how to solve this?

/ Herman

Homepage regularly hangs after error from ImageProcessor

$
0
0

Hello all. First time posting, so thank you first to all who've come before. I've solved a lot of issues from reading these forums. This, however I cannot...

Our site was previously built and hosted in Umbraco v7.14. I recently rebuilt the site fresh in v8.5 as it was such a large change between versions. As well as created a new database for it.

  • It has two cultures: gb & au
  • Articulate v4.1.1 & Umbraco Forms v8.2.0 (both installed with NuGet)
  • Built within Visual Studio v16.4.4.
  • .NET v4.7.2
  • IIS v10.0.14393.0
  • Windows server 2016

All was fine for the first few weeks after the new site went up, now I keep receiving these errors in the backend that line up with the homepage (for both cultures) hanging until I sign in and republish the homepage node (all other pages on the site display correctly, it just seems to be affecting the home page).

Example:

ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 610 : No image exists at E:\[root]\media\1491\image01.jpg

The “[root]” is just me replacing the physical path on the server for this post.

They’re all image path related errors. The links are still trying to access the images with the old Umbraco way of numbered folders inside the media folder, rather than the new way of random characters.

Each image mentioned does actually exist in the site, however they were all manually re-inputted when the v8 rebuild happened, so their paths in the backend are correct and display correctly in the front-end.

Example:

ImageProcessor.Common.Exceptions.ImageProcessingException: ProcessImageAsync 610 : No image exists at E:\[root]\media\1hzdc0pk\image01.jpg

I’ve refreshed my server cache as well as my Umbraco caches, so I have no idea where it could be coming from. Any thoughts?

Thanks in advance.


AzureCDNToolkit issues

$
0
0

We have a website built in Umbraco 7.14.0, and hosted in Azure. This utilises a CDN on Azure, linked to media in blob storage. The website runs fine, and media is served correctly from the CDN.

However, when the web app is automatically restarted due to Azure maintenance, we get the following errors, and multiple automatic restarts until it corrects itself.

Error resolving media url from the CDN 
System.Net.WebException: The operation has timed 
out  at System.Net.HttpWebRequest.GetResponse()  at Our.Umbraco.AzureCDNToolkit.UrlHelperRenderExtensions.<>c__DisplayClass6_1.<UrlToCdnUrl>b__0() at Our.Umbraco.AzureCDNToolkit.UrlHelperRenderExtensions.TryFiveTimes(Action delegateAction)    at Our.Umbraco.AzureCDNToolkit.UrlHelperRenderExtensions.UrlToCdnUrl(String cropUrl, Boolean htmlEncode, String currentDomain)

Has anyone else encountered this? Any help appreciated

Creating Nested Content Programatically

$
0
0

I'm trying to programmatically set a nested content property but am having a bit of trouble getting it working fully. The following code creates the nested content item on the document however none of the properties (title & bodyText) are set.

Content doc = (Content)sender;

IContentService contentService = ApplicationContext.Current.Services.ContentService;

List<IContent> items = new List<IContent>();

IContent newDesc = contentService.CreateContent("Description", doc.Id, "nestTextContent");
newDesc.SetValue("title", "test");
newDesc.SetValue("bodyText", cleanedDescription);

items.Add(newDesc);

doc.SetValue("pageContent", JsonConvert.SerializeObject(items));
contentService.Save(doc);

Looking at some older threads the answers say the value should be a "JSON serialized Dictionary<string, object> string" but I don't see what the contents of the dictionary should be.

Am I barking up the wrong tree trying to serialise a list of IContents? If not how do I get the actual nested content item's properties set.

These are the threads I've been referencing. https://our.umbraco.org/projects/backoffice-extensions/nested-content/nested-content-feedback/72977-can-i-write-collection-of-ipublishedcontent-back-to-model-property https://our.umbraco.org/projects/backoffice-extensions/nested-content/nested-content-feedback/76444-create-nestedcontent-items-in-surfacecontroller

Allow any HTML Tag in the MCE editor

$
0
0

Hi All,

We need to allow user to enter any html tag in the MCE Editor. Just for your information we are using Umbrac 7.2.1. Can any one please help us on this?

Here is an example of our sample html code with which we are experiencing problem :-

<div id="owl-example" class="owl-carousel">

<a href="#">

<div>DEF

</div>

</a>

</div>

When we review this code again in the Source Code editor this code got converted to

<div id="owl-example" class="owl-carousel">

<div>DEF</div>

</div>

This editor removed the anchor tag. Not sure why this issue is coming. How ever we resolved this issue by changing our html as mentioned below :-

<div id="owl-example" class="owl-carousel"><a href="#"> <span>DEF </span> </a></div>

Here we have replaced <span> with <div> tag inside <a> tag. We got some clue that <div> is not allowed inside <a> tag. But we would like to have <div> inside <a> tag as we have lots of html pages like this issue.

Can any one please help us as how to solve this issue?

We did some research and find some help like using "<validElements><![CDATA[*[*]]]></validElements>" in config/tinyMceConfig.config file but it didn't solve our problem.

 

'Umbraco.Web.PublishedContentModels.ProductDocuments' does not contain a definition for 'GetPropertyValue' error message

$
0
0

I am not sure why I get this error- "'Umbraco.Web.PublishedContentModels.ProductDocuments' does not contain a definition for 'GetPropertyValue'". I have used the same set up for other nested content on this page and it worked. If you have any insights on what might be wrong I would appreciate it.

@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
    Layout = "Master.cshtml";
    var node = Model.Content;
    var home = node.Site();
    var productML = home.Descendant("markets");
    var product = @CurrentPage.Parent().Descendants("product").First();
}


    @foreach(var stuff in product.Children.Where("Visible")){
            if (stuff.HasValue("relatedDocuments"))
                {
                    foreach (var item in stuff.GetPropertyValue<IEnumerable<IPublishedContent>>("relatedDocuments"))
                    {
                        if (item.HasValue("documentFile") && item.HasValue("documentName"))
                        {
                                var file = item.GetPropertyValue<IPublishedContent>("documentFile");
                                <div class="boxspacenope">
                                <div class="outline3">
                                    <div class="row">
                                        <div class="col s6 m6 l6" align="left">
                                            <div class="title3"><b>@item.GetPropertyValue("documentName")</b></div>
                                        </div>
                                        <div class="col s3 m3 l3" align="center">
                                        </div>
                                        <div class="col s3 m3 l3" align="center">
                                            <ul class="links">
                                                <li>
                                                    <a href="@file.Url" target="_blank"><div class="underline">Download</div></a>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        }
                    }
                }
    }

Umbraco V8 - Get Current Member in RenderMvcController

$
0
0

Been trying several things but can't seem to:

Check if there is a member logged in Get the member currently logged in

Anyone get a snippet?

I did manage to find out how to get the backoffice user from a component:

  var identity = (UmbracoBackOfficeIdentity)System.Web.HttpContext.Current.User.Identity;


  var currentUSer = Current.Services.UserService.GetByProviderKey(identity.Id);

Load balancing, redirects and Master Server

$
0
0

Hi,

We have a load balanced site; it has been in production for about 12 months, and has load balancing set up with a single server used as the back office.

However, occasionally we've seen odd behaviour, where e.g. a user moves a section of the site and no redirects are created, or an automated import process does not seem to publish nodes to the front end server correctly.

I've just taken a look at this article:

https://our.umbraco.com/Documentation/Getting-Started/Setup/Server-Setup/Load-Balancing/flexible-advanced-v7

And this issue: https://issues.umbraco.org/issue/U4-9511

I took a look in God Mode and very often the back office server is not the "master" server; however, the umbracoApplicationUrl is set explicitly to the back office server.

Does anybody know if it's likely to be what's causing this issue? It seems like we would see it more often given how often the back office server is not the master server.

(Also, if this is the problem, shouldn't this be a bit more prominent in the documentation? It seems like something that should be essential in a load balanced environment rather than an "advanced technique" if it can cause this sort of issue).

Thanks,

Chris.

CMS image media picker doesnt flag as dirty

$
0
0

Hi,

We are using Umbraco 7.15.3. If we edit an existing page in the CMS such as a text box and try to navigate away we get a flag saying that we haven't saved would we like to Stay or Discard changes - which is great.

BUT, if we change a media picker and navigate away we don't get this warning. Is this a bug in 7.15 or do we need to set something?

Thanks

Jon


Form-template for Umbraco Forms

$
0
0

Hi!

We're looking to create some changes to the default "Templates" or "Blueprints" for Umbraco Forms but I can't find if and where this is possible... I'm not talking about a custom theme but just a template used for editors when creating a new form (see picture below).

Anyone who knows?

enter image description here

Embedding Google My Business customer reviews?

$
0
0

Does anyone know of any extensions that can easily handle this and will update automatically as new reviews come in? I'm worried that it's something I might need a developer to create from scratch with the GMB api. 192.168.1.254

Thanks for any pointers 10.0.0.0.1

How to use .webp format with the image processor?

$
0
0

Hi guys, using Umbraco 7.12.4 and using plenty of image processor stuff, but would really like to use the webp format tag, has anyone got this working?

Umbraco forms - disable answer type

$
0
0

Hi Guys,

I would like to remove File Upload form my answer type options.

Can you help me?

Thanks, Florin

(Shared) Product Options Multylanguage

$
0
0

I'm building up a multy language site with Umbraco and Merchello. I try to create product options in 2 languages, but don't know how.

Is there a way to do that, i know you can attach a contenttype to an option, but there is also not an option to choose the language.

Thanks in advance.enter image description here

Viewing all 72689 articles
Browse latest View live


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