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

Umbraco Forms Partial submission on v8 constructor

$
0
0

Hi

v8 for forms doesn't allow parameterless constructor when inheritting from

UmbracoFormsController

class. So for instance if I want to override OnFormHandled method like I do in v7, I'll now need to provide Instances for several classes. Question here is where do I get these instances without newing up on each request?

Here is v8 constructor parameters:

 public UmbracoFormsController(DistributedCache distributedCache, IFormStorage formStorage, IRecordStorage recordStorage, IRecordService recordService, FieldCollection fieldCollection, IFieldTypeStorage fieldTypeStorage, IFieldPreValueSourceService fieldPreValueSourceService, IFieldPreValueSourceTypeService fieldPreValueSourceTypeService, IUmbracoContextAccessor umbracoContextAccessor)
        {

        }

Does anyone know how to provide instances to these parameters. Are we using DI in umbraco v8 which does that for us?

I really like Umbraco forms and we are running umbraco cloud but this is becoming an issue as there are several custom umbracoformcontrollers we use for v7, we need to build for providing partial form submission. If you know other ways to partially submit forms using Umbraco forms in v8 please let me know. This is our major hold back on v8

By partial submission i mean, on each next button press data is saved to DB before Resuming to next page of the form.


This document is published but its url cannot be routed

$
0
0

Hi,

I keep getting this "error" when creating specific content via the ContentService API in V8. The page is created, flagged as published and all the fields are saved, but I cannot view it since there is not created a url for it - not until I save and publish manually via the backoffice.

Basically I am doing this:

var content = cs.CreateAndSave("Underskål", productLine.Id, "product");
content.SetValue("productNum", product.ProductNum);    
cs.SaveAndPublish(content);

And I have also tried the cs.Create(...) method with no luck, and I have also tried replacing the Danish character "å" with "aa" in the name above. I have also tried doing this in the SaveAndPublish method with parameters:

cs.SaveAndPublish(content, "*", -1, false);  

No luck at all. Any help is appreciated a lot.

Thanks.

enter image description here

Stripe and Tea Commerce

$
0
0

I have a website gone live today.

Tested with Stripe locally with test card details and on the staging server with test card details and everything works as should. I get the transaction id in the back office and it looks like a successful payment.

Testing on Live we've had 2 transactions gone through and both say -

requires_payment_method

from Stripes admin panel when I sign in to see the transaction details

Worryingly the user gets redirected to the confirmation page But in the back office, no transaction id and stripe is saying 'incomplete'

I've made sure were using the API Live keys, just as we've used the test keys.

I'm unsure why this isn't wokring?

I can't seem to find reference to a StripePayment form in Github, is there one?

Listview filtering

$
0
0

Hi All,

I have a Products listview having 5 products. I have a landing page where i show all products. I want to compare 2 products, by checkbox selection.

On checkbox selection i have to filter the products and show selected products in detail.

Please suggest how can i send checkbox selection id's to cshtml file.

Examine with swedish characters

$
0
0

Hi,

Im trying to build a search function for a site that is in swedish. I am able to search, but when i search with swedish characters ( Å Ä Ö ) it does not work.

For example if i search for Göteborg i get 0 hits, but if i instead use the term Goteborg it works.

Anybody got a solution? Do i need to configure the index for multilanguage?

Thanks in advance!

Extending Umbraco with custom controller and routing

$
0
0

Hello,

When i call a partial it complains the Model isn't IPublishedContent?

But when i tell my custom ViewModel to inherit from IPublishedContent like in the documentation, i get the following error:

Err: 'No parameterless constructor defined for this object.'

How do i fix this so i can use my partials?

Code below:

ViewModel:

public class MainViewModel : ContentModel
{
    //Constructor of MainViewModel
    public MainViewModel(IPublishedContent content) : base(content)
    {
        SiteSettings = new SiteSettingsViewModel();
        BusinessCentersData = new List<BusinessCenterDataViewModel>();
        BusinessCenterData = new BusinessCenterDataViewModel();
        SiteSettings = new SiteSettingsViewModel();
        UmbracoBusinessCenters = new UmbracoBusinessCentersViewModel();
        RawContent = RawContent;
        }

    //Independant View 
    public SiteSettingsViewModel SiteSettings { get; set; }
    public UmbracoBusinessCentersViewModel UmbracoBusinessCenters { get; set; }
    public List<BusinessCenterDataViewModel> BusinessCentersData { get; set; }
    public BusinessCenterDataViewModel BusinessCenterData { get; set; }
    public IPublishedContent RawContent {get; private set; }

    public string siteName { get; set; }
    public dynamic RootNode { get; set; }
}

Controller:

public ActionResult BusinessCenters(MainViewModel model)
    {
        try
        {

            using (var cref = _context.EnsureUmbracoContext())
            {
                //Content Cache
                //var cache = cref.UmbracoContext.Content;
                var cache = cref.UmbracoContext.Content;
                dynamic rootNode = cache.GetAtRoot();
                model.RootNode = rootNode;
                //Call Any Missing Umbraco Content
                IPublishedContent siteSettings = cache.GetSingleByXPath("//siteSettings");
                UmbracoContentBuilderClass siteSettingsModel = new UmbracoContentBuilderClass();
                model.SiteSettings = siteSettingsModel.PopulateSiteSettingsModel(siteSettings);

                IPublishedContent businessCenters = cache.GetSingleByXPath("//businessCenters");
                UmbracoContentBuilderClass businessCentersModel = new UmbracoContentBuilderClass();
                model.UmbracoBusinessCenters = businessCentersModel.PopulateBusinessCentersModel(businessCenters);



            }
                return PartialView("~/Views/thejourney/firstpage.cshtml", model);


        }
        catch (Exception e)
        {
            CustomLogger.Error($"ERROR: BusinessCenterListingsController.BusinessCenters (GET) {e}");
            throw;
        }

Partial:

@inherits UmbracoViewPage<officefreedom.AppCode.ViewModels.MainViewModel>
<div class="upper-nav-container col-xs-12 col-md-12">
@Html.Partial("~/Views/Partials/_Navigation.cshtml", Model.RawContent)

Form not loading

$
0
0

I followed the walkthrough and the form is still not showing. I am adding the JS at the top of the page (I also tried adding it at the bottom of the page) and adding the below script

<div class="formulate-wrapper">
    @Html.Action("Render", "FormulateRendering", new { form = ((Umbraco.Web.PublishedModels.Home)Model).BottomForm })
</div>

If I check the source of the page I am finding the following dynamic script

enter image description here

And there is a JSON object with the details of my form

{"data":{"name":"Registration Form","alias":null,"randomId":"bae21d2e0cb34b2899d5fe736c8a74ca","fields":[{"alias":"Name","label":"Name","id":"19f89987a17f4defa7d568107b7af7d3","randomId":"1da7e8f8fce045c8973cd5c263364707","fieldType":"text","validations":[{"id":"1d2f41ba933e4409b15cb980b5221158","alias":"NameValidation","validationType":"regex","configuration":{"message":"Please input a valid name.","pattern":"^[\w\u0027\-,.][^0-9!¡?÷?¿/\\+=@#$%ˆ\u0026(){}|~\u003c\u003e;:[\]]{2,}$"}}],"configuration":{},"initialValue":null,"category":"Standard"},{"alias":"Email","label":"Email","id":"630c78e222664e25af895974059ca4b9","randomId":"bffb7aa1b61f4f1490f937b18b31feed","fieldType":"text","validations":[{"id":"898f2a554c3e40eb9f9ce0ea981b088d","alias":"Email_Validation","validationType":"regex","configuration":{"message":"Please input a valid email.","pattern":"^(?(\")(\".+?(?\u003c!\\)\"@)|((0-9a-z)(?\u003c=[0-9a-z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w][0-9a-z]\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$"}}],"configuration":{},"initialValue":null,"category":"Standard"},{"alias":"Seminar","label":"Seminar","id":"d7961a89b5404b3e845cd4c4dea9fdff","randomId":"703966a3d6514f76973b4a33608515f2","fieldType":"hidden","validations":[],"configuration":{},"initialValue":null,"category":"Standard"}],"rows":[{"isStep":false,"cells":[{"columns":12,"fields":[{"id":"19f89987a17f4defa7d568107b7af7d3"},{"id":"630c78e222664e25af895974059ca4b9"},{"id":"d7961a89b5404b3e845cd4c4dea9fdff"}]}]}],"payload":{"FormId":"05f0e3ca893f47c48b4ed1ab788ae262","PageId":1105,"__RequestVerificationToken":"XQBWxYfEE0RbQvCKLlGxmlBYb0GxLQ7YzrqGBZumDWQsyMS-m9AjLWkdn96LCFmxCS0tvGpU0NYL5DT9ImAa1Mq6Dy6hEo7zD63DQbJEKcs1"},"url":"/umbraco/formulate/submissions/submit"}};

Am i missing something?

Auto Redirects not creating when moving content nodes

$
0
0

Hi,

i have a problem when using SEO Checker v2.2.4 on a site running on v7.12.1.

When moving a content node to a different location, the url of the node changes but no redirect is beeing made by SEO Checker. It all works fine when renaming the node, but not when moving.

Example:

  • renaming "/oldurl" to "/newurl" -> oldurl is redirecting - works.
  • removing "/someurl" to "/someothernode/someurl" -> someurl returns 404 - doesn't work.

This makes the old urls and all redirects pointing to it, resulting in 404. I double checked httpmodules in web.config and urlHistoryTracking setting is enabled.

I'm also able to reproduce this issue on a new created v7.15.3 site using v2.2.4 and the umbraco starter page. No other packages, no custom code or nodes that doesn't come from starter page.

Would be glad for any advise or pointers.

~ Jonathan


Multi Site with V8 of Umbraco

$
0
0

Hi

I am new the the community and I followed a tutorial on building multiple sites using one Umbraco Instance using V7. In Version 7, it stated to set Use DomainPrefixes to true, but this is missing when doing the same in tutorial in V8 and if I add it the solution breaks.

What is the correct way to use Hostnames and Cultures? Are we not setting the values in the request Handler for UseDomainPrefixes in V8 anymore.

Granted I am totally new to Umbraco.

Publishing permissions

$
0
0

Hi,

We're now thinking about how we'd like to set up Publisher and I was wondering if the following was currently possible:

  • We have 4 environments live, staging, test and development.
  • Staging, Test and Development can pull content from Live, Staging or Test
  • Staging can push content to Live
  • Test can push content to Staging
  • Development can push content to Test

I'm happy to do this with config transforms but it looks like I can only set the incoming and outgoing permissions on the server you're communicating to rather than in the servers section of the config?

Thanks Andy

ExternalIndex search

$
0
0

I am trying to prevent an ExternalIndex search from looking into various property aliases. Is there a way to do this? It is the basic uSkinned logic for a search which I understand uses ExternalIndex

DatePicker: date not showed in Backoffice and refresh is needed

$
0
0

Hi all, I have a problem with Umbraco DatePicker in Umbraco Backoffice. I am working on an Umbraco site version 7.12.4 (migrated from 7.3.4).

I noticed that DatePicker didn't work and the problem was related to a plugin that uesd an obsolete version of momentjs library (https://issues.umbraco.org/issue/U4-11267).

I have solved this issue by removing the plugin. After that, I noticed another problem: the first time i log into my backoffice, i saw that the Datepicker did not render the date (inside a published content that uses the DatePicker), after a refresh (F5) of the backoffice's page, the date was correctly rendered.

BEFORE REFRESH:

DatePicker before refresh

AFTER REFRESH:

DatePicker after refresh

Have you any suggestion? Have you faced and solved this issue?

Thanks

Publisher - Check Access - 'Unknown'

$
0
0

Hi Kevin,

We have deployed the application in production environment. We are having some issues publishing to Production environment. I'm sure its a network related issue as other env (DEV & UAT) are working correctly, however we struggling to debug as the error message we receive when clicking 'CheckAccess' is 'Unknown' rather than Available, Unauthorized, Unreachable, Disabled or ServerError

I have set the serilog debug to 'Debug' but it doesn't seem to be logging anything useful that might help find the cause.

Any advice you can give to help debug would be most useful.

Thanks in advance,

Mike

Backoffice on publish - A potentially dangerous Request.Form value

$
0
0

We just upgraded from 8.4 to latest 8.5.4 via NuGet and now when publishing any page that has a RTE value the post fails with an: A potentially dangerous Request.Form value was detected from the client ?

It works fine when no html is posted.

Any ideas?

Use Members service to get all members with a custom property = to a variable

$
0
0

After the lines

var _member = Members.GetCurrentMember();
var organisationName = _member.GetProperty("organisationName").GetValue().ToString();

Is there any way I can use the Members service in a one-liner to get all members where the organisationName property = the organisationName variable i have set?


Payment options in Umbraco Forms

$
0
0

I have a simple "Umbraco Forms" set up where people can order 1 item. Is there an elegant and easy way to add payment to this process?

Umbraco V7.12.4 Forms V7.0.4

Umbraco 7.13 Examine, Lucene "[IOException: read past EOF]" Error

$
0
0

We have a Umbraco 7.13 website running well on Local Host. When we deploy it on a hosting server(unoeuro.com), it gives a YSOD - "[IOException: read past EOF]" error. I rebuild the indexes and deploy again, still, the error does not go away.

Is this somehow related to File i/o permissions?

https://i.imgur.com/9yT983H.png

Has anyone encountered a similar issue? Any help is appreciated.

//Krishna

Keep getting server errors after deleting content

$
0
0

This is my first experience with Umbraco 8.

I have installed Umbraco about 9 times and everytime and so far I really hate it :-)

After reverse phone lookup copying the Umbraco files to the server I start to customize the website. First I try to remove content so that I can create my own. But... everytime I delete a content page I get a server error and the site just shows an errorpage telling me to change settings in the web.config.

I can do that but I first have nba reddit to understand why I can't delete content without crashing the site.

Where do I find a good introduction to the concepts and explation of the process of creating pcpartpicker a web site from scratch? (I have tried Umbraco's own documentation site but I don't think its any good)

Cust properties on media document type not pulling through value

$
0
0

I've got some custom properties in a media item, but they're always coming back since upgrading from 8.1.0 to 8.5.3 any idea why this would be?

The model within model builder still has the correct property alias but is always blank/empty.

This is happening on the two properties brought through from the upgrade and one I added to test if including a new property would resolve the issue.

If I try to access it via content I get

 content.Value("myProperty")
The runtime refused to evaluate the expression at this time.

Where the white section is the properties in umbraco but they're not coming through the models builders properties or in the content if I access immediate window.

In the picture below, the top two fields are brought through from the upgrade and the bottom one is newly created but still doesn't bring through the value.

Any idea on why this is happening?

enter image description here

500 error loading partial view with ajax

$
0
0

First of, I'm unable to add this question in no other subject than Using Umbraco and getting started...

I've got this wierd 500 error when trying to load a partial view with ajax actionlink. From what I can tell the error is thrown because of a macro inside the RTE content. If the node does not have the macro in the RTE text it works without any issues.

This setup is like this. I've got a view where it's possible to switch between a list and grid layout of the loaded content.

Initially the view loads one of these two partial views without ajax. This is working fine, I'm able to load either of the two partial views even if one of the nodes has a macro in the RTE text. No 500 error is thrown.

Now, If I try to switch the layout, in other words loading a partial view with a ajax actionlink, jqurey is throwing a 500 error and nothing happens.

I think this i really strange. Since I've managed to figure out that it is the macro within the RTE text that is causing this issue I would think that I would be thrown a 500 error when trying to load the partial view without a ajax request as well? Why is the partial view throwing a 500 error when trying to load the content with ajax but works without it?

Cheers

Viewing all 72689 articles
Browse latest View live


Latest Images

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