Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 12 2020 01:41

    jtkech on patch-1

    (compare)

  • Apr 12 2020 01:39

    jtkech on patch-1

    Update ZoneShapes.cs (compare)

JoshTango
@JoshTango
is there a way to add content using headless or decoupled ?
or maybe a module?
i want to write code to add content items
Sipke Schoorstra
@sfmskywalker
Perfectly possible. If you want to do it from your own module, you can use the IContentManager API to create content items. I don't know if you can do it with GraphQL mutations off hand, but look for API controllers that might expose an endpoint to create content items via REST calls. If there's no such controller, you can always create one from your own module and have your app invoke that endpoint to create content items.
Sébastien Ros
@sebastienros
utrecht is next to amsterdam, south east
NRGadade
@NRGadade

Hi All,

We have integrated Orchard CMS application from ADFS to Azure Authentication and whenever login OR doing any operation in admin page we are getting Nonce issue. Can you please help to resolve this issue, we tried multiple way like installing NuGet package 'Kentor.OwinCookieSaver', setting flag on chrome to disabled, AD App Registrations with Reply URL and Start URL,.. etc.

Bellow is the error details-
"Server Error in '/' Application.
IDX21323: RequireNonce is '[PII is hidden]'. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'. Note if a 'nonce' is found it will be evaluated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolInvalidNonceException: IDX21323: RequireNonce is '[PII is hidden]'. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'. Note if a 'nonce' is found it will be evaluated.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[OpenIdConnectProtocolInvalidNonceException: IDX21323: RequireNonce is '[PII is hidden]'. OpenIdConnectProtocolValidationContext.Nonce was null, OpenIdConnectProtocol.ValidatedIdToken.Payload.Nonce was not null. The nonce cannot be validated. If you don't need to check the nonce, set OpenIdConnectProtocolValidator.RequireNonce to 'false'. Note if a 'nonce' is found it will be evaluated.]
Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidator.ValidateNonce(OpenIdConnectProtocolValidationContext validationContext) +1013
Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolValidator.ValidateAuthenticationResponse(OpenIdConnectProtocolValidationContext validationContext) +263
Microsoft.Owin.Security.OpenIdConnect.<AuthenticateCoreAsync>d__11.MoveNext() +4494"

David Scott
@ScottCreativeTechnologies
Hi - is there a way to point a new properly configured web app at an existing (MySQL) Orchard database? I thought just copying the App_Data from my existing project but doesn't seem to have at least content/types/themes
2 replies
Salik Ahmed Khan
@salik634
Hi, I need some help to update data into index table using yessql is there any tutorial or guide?
Raniel Quirante
@RanielQuirante
4 replies
datdv260497
@datdv260497
Hi ! I get error with newest version orchard core. I can not insert data if ContentType contains time field (date field is working). Thank !
Jean-Thierry Kéchichian
@jtkech
@jeffolmstead 1. Yes, 2. Yes, 3. I would suggest to still use a bg task but by splitting your work, e.g. after n seconds stop it and then the next minute restart where you were by using a kind of cursor, e.g. when the lucene worker update lucene indexes in the background it does it per batch of e.g. 100 items (i don't remember the number).
Salik Ahmed Khan
@salik634

Hi, I need some help to update data into index table using yessql is there any tutorial or guide?

Hi, Can anyone help me into this?

6 replies
AmadeuAntunes
@AmadeuAntunes
image.png
Hello, Does anyone know how to set default values for fiels? I tried to use InitializingAsync from ContentHandlerBase and set the value. The idea is when clicked to open a ContentItem with a empty form, the field value bring a default value. However the way I'm doing its not working
David Ferguson
@somecodeguy_twitter
When creating my own content part, what field should I use for a single select dropdown of option values? It looked like the multi text field would work, but I don't see an option to only allow selecting one value. Maybe I'm on an older version of OC?
2 replies
Steven Spits
@netwavebe

@AmadeuAntunes I'm using InitializedAsync in my project to initialize fields like this:

if (!string.IsNullOrEmpty(supplierId))
{
    context.ContentItem.Alter<Product>(x => x.Supplier = new ContentPickerField() { ContentItemIds = new string[] { supplierId } });
}

Try using Alter on one field and see if that works.

AmadeuAntunes
@AmadeuAntunes
image.png
How do you strong type the field @netwavebe
Steven Spits
@netwavebe

@AmadeuAntunes Make a class:

public class Product : ContentPart
{
    public HtmlField Description { get; set; }
    ...
    public ContentPickerField Supplier { get; set; }
    ...
}

and register it in startup.cs:

services.AddContentPart<Product>();
Diana
@Diana20357353_twitter
Hello, I have a question related to the Deployment plans. When deploying content items from one site to another, I am wondering whether it is possible to not transfer every single content item (hence the 'All Content' step) but to filter the items I want to deploy. For example, to be able to add my own custom deployment step with the ability to filter specific items.
I have tried the 'Add to deployment plan' feature but I am more specifically asking if 'overriding' the behavior of the deployments is possible. Does OrchardCore support adding our own custom steps (with custom logic) to the 'Available Steps'? Is there any way of doing this though code and if so can I get some guidance on how to achieve it? Thanks in advance.
4 replies
Ярослав Порываев
@yaporyvaev
Hello! Anyone one used OpenId Validation feature without client and server? I want to authorize user by jwt token. Authorization works well, there is no any filled data in User (ClaimsPrincipal) object (UserName e.g.) but Claims filled well. How can i fill User's data from claims? https://prnt.sc/106ls32
David Ferguson
@somecodeguy_twitter
@Skrypt Is there any way to version templates or content part/type updates?
26 replies
@sebastienros @jtkech Any updates on the .net 5.0 multi-target PR? Would love to get that merged soon.
Sébastien Ros
@sebastienros
@somecodeguy_twitter me too!
David Ferguson
@somecodeguy_twitter
Off the cuff, the code seems to run much faster with net5.0
I know that there were a lot of perf improvements done in net5.0, so I'm hoping it will make OC (which fast) be blazing. :)
Sébastien Ros
@sebastienros
that's why I also want to see it merge, to test my fluid/perf branch on it too, since I have number for it, even before (current dev branch)
2 replies
Steven Spits
@netwavebe

Has anyone seen exceptions like this?

2021-02-25 15:53:56.5761|Default||ee0e8ec7-4408a06d78677750.||Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An unhandled exception has occurred while executing the request. System.ArgumentNullException: Value cannot be null. (Parameter 'key')
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at SixLabors.ImageSharp.Web.Resolvers.PhysicalFileSystemCacheResolver.OpenReadAsync()
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.SendResponseAsync(ImageContext imageContext, String key, ImageCacheMetadata metadata, Stream stream, IImageCacheResolver cacheResolver)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.<>c__DisplayClass21_0.<<IsNewOrUpdatedAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.IsNewOrUpdatedAsync(IImageResolver sourceImageResolver, ImageContext imageContext, String key)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext context, IImageResolver sourceImageResolver, ImageContext imageContext, IDictionary`2 commands)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in D:\GitHub\www.t-shirtskempen.be\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)    at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at SixLabors.ImageSharp.Web.Resolvers.PhysicalFileSystemCacheResolver.OpenReadAsync()
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.SendResponseAsync(ImageContext imageContext, String key, ImageCacheMetadata metadata, Stream stream, IImageCacheResolver cacheResolver)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.<>c__DisplayClass21_0.<<IsNewOrUpdatedAsync>b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.IsNewOrUpdatedAsync(IImageResolver sourceImageResolver, ImageContext imageContext, String key)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext context, IImageResolver sourceImageResolver, ImageContext imageContext, IDictionary`2 commands)
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at OrchardCore.Diagnostics.DiagnosticsStartupFilter.<>c__DisplayClass3_0.<<Configure>b__1>d.MoveNext() in D:\GitHub\www.t-shirtskempen.be\src\OrchardCore.Modules\OrchardCore.Diagnostics\DiagnosticsStartupFilter.cs:line 47
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

I'm not sure where to start looking?

Dean Marcussen
@deanmarcussen
haven't seen it before @netwavebe but I would try and find the url of the image causing it. looks to me like it might be something odd in the path / and or file extension
Sébastien Ros
@sebastienros
@somecodeguy_twitter we said yolo
1 reply
Steven Spits
@netwavebe
@deanmarcussen Seems to be something that happens under stress. So far, it happens only in the backend where a lot of 100x100 thumbnails are generated. A few will fail with the above exception. In devtools with cache disabled, F5 will show the same images broken after each page refresh. After an apppool recycle on the server, other images are impacted until the next apppool recycle. Strange...
Jasmin Savard
@Skrypt
@netwavebe Have you tried looking for this exception on the SixLabors.ImageSharp Github Repo?
Sébastien Ros
@sebastienros
@netwavebe dean was able to reproduce when doing a load test, I noticed the 500s in his output and he found the same exceptions as you in his log. Let's have faith in his ability to understand the issue. Interestingly I did some load tests on my machine and had zero exceptions.
from the exception trace, it looks like the ContentType property on this line is null: https://github.com/SixLabors/ImageSharp.Web/blob/master/src/ImageSharp.Web/Caching/PhysicalFileSystemCacheResolver.cs#L46
Titus Anderson
@flew2bits
I'm experiencing a weird issue with the Rules module. When I run locally, everything works fine. However, when I run in a Docker container on my server, the javascript tag in the ConditionsModal.cshtml doesn't render in the Foot zone, but in div#ta-content and the script fails since it comes before jquery. I get <script At="Foot" depends-on="jQuery">...</script> in the output. Any ideas?
3 replies
Josh Morales
@selaromdotnet
hello all! just started playing with orchard core, and i'm having a tough time discovering an answer to this question: When using OC for a decoupled site can you use the OC theme projects to create themes for the decoupled front end site? I created two tenants, site a (default) and site b, then created a new OC theme, adding a reference of it to the main project. in this theme all I added was a variant of the Pages/Shared/_Layout.cshtml file. if I login to site b, I can see and select the theme, but it doesn't appear to do anything to the front end; it's still serving the main _Layout file from the root site. if I delete this file from the root site, one of the paths it searches for a replacement is "/Areas/SiteA/Pages/Shared/_Layout.cshtml" which looks close to what i expect, but this is not an area, it's in the separate theme project. Am I attempting to do something that is not supported, or am I just missing a step somewhere? many thanks!
4 replies
Dean Marcussen
@deanmarcussen
@netwavebe yes, as Seb said we found it last night accidently when doing some testing. Currently looks like inside ImageSharp, as I think I can produce the same from their sample project. Will let you know when I know
Steven Spits
@netwavebe
@deanmarcussen What are the odds! I'm interested in your findings, keep me updated please!
@sebastienros Thanks for letting me know! FWIW, I have a lot of faith in Dean :wink:
Dean Marcussen
@deanmarcussen
@netwavebe hmm tracked back to the LRU cache. What o/s are you running this on?
Steven Spits
@netwavebe
@deanmarcussen IIS on Windows Server 2016.
Dean Marcussen
@deanmarcussen
ok tracking here SixLabors/ImageSharp.Web#140
Steven Spits
@netwavebe
Thanks @deanmarcussen, I subscribed to it.
AmadeuAntunes
@AmadeuAntunes
hello, its possible to change a editor for a textfield by code ?
Arra Derderian
@aderderian
Does anyone know if the old C Sharp scripting module will make it to OC?
5 replies
Wondering if that is a good way to approach some dynamic c sharp code to be run in workflows in OC or try and build something new using another library
Dean Marcussen
@deanmarcussen
what's wrong with the javascripting module?
Jasmin Savard
@Skrypt
It's javascript ... :see_no_evil:
Dean Marcussen
@deanmarcussen
but you love javascript @Skrypt
Jasmin Savard
@Skrypt
I love cookies too :wink: