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)

is-DW
@is-DW
Hi! Did somebody knowns what is "shell" in orchard?what does "shell" do
3 replies
Sotiris Roussos
@urbanit

Strange issue...

{% assign taxonomy = Content.ContentItemId["xxxxxx"] %}

{{ taxonomy.ContentItem.Content.TaxonomyPart.Terms.size }}

prints 14 in home page and 7 in all other pages... 🤨

Taxonomy is localized and has 7 terms in each of the languages...
"xxxxxx" is the Id of the Greek version

James Lee
@ScarySheep
Hi I was facing an issue. Whenever I delete an media and upload something new with the same name, the media file is not updated.
Anyone know what's the problem here?
James Lee
@ScarySheep
I just realize my problem... It's kinda stupid. I went to check out the app_data and all files are updated as expected. The problem is chrome kept my images' cache despite me ctrl+f5 the webpage unless I open each one in a new tab and force reload them.
mmdqq
@mmdqq
image.png
I add a Propertie to user.Properties,than create a user_Propertie_index ,but when propertie updated ,the table of user_proertie_index still empty
mmdqq
@mmdqq
How to make the user_propertie_index auto put when update user.Properties by _userManager.UpdateAsync
mmdqq
@mmdqq
_session.Query<User, UserByLoginInfoIndex>(u => u.LoginProvider == LoginProvider && u.ProviderKey == ProviderKey).FirstOrDefaultAsync() not add a mapping record to UserByLoginInfoIndex,but _userManager.UpdateAsync can add a mapping record to UserByLoginInfoIndex,If i delete the record from UserByLoginInfoIndex. _session.Query aways return null,but the data still in user.Logininfos,why?
Dean Marcussen
@deanmarcussen
@mmdqq one is a query, the other is a save. a query doesn't add records to anything, it just checks what is there already. a save initiates the mapping of records. and yes if you manually delete the record, the data will still be in the json document, until that is removed as well. perhaps it would help to have a read of some of the YesSql docs https://github.com/sebastienros/yessql/wiki Regards the user.Properties we would recommend you use the .As<T>() and .Put<T>() extensions in OrchardCore.Entities. Why it isn't saving, is probably your index provider. It would need to retrieve the custom property, and add it to the custom MapIndex
mmdqq
@mmdqq
@deanmarcussen The sql statement 、 has insert statement, can it be inserted into the data table?
image.png
mmdqq
@mmdqq
@deanmarcussen I did not find the statement to add records to the UserByLoginInfoIndex table in the Orchardcore source code. Do you know where it is in the Orchardcore source code? I'm going to learn,thank you
mmdqq
@mmdqq
image.png
@deanmarcussen this is my Index , _userManager.UpdateAsync can add data to user properties ,but UserByWechatIndex table still empty
Dean Marcussen
@deanmarcussen
did you register it services.AddSingleton<IIndexProvider, xxx>();
mmdqq
@mmdqq
yes
image.png
image.png
Stefan Tropčić
@stefan73_gitlab
How to put default image in MediaField on every new BlogPost, based on image in Blog? I could do it with custom editor, but wanted to do it with admin templates and couldn't get right admin template name
Sébastien Ros
@sebastienros
@/all no meeting today, something urgent came by and I won't be available.
somecodeguy
@dafergu2:matrix.org
[m]
@sebastienros: Hope all is okay.
I haven't had a check to look in depth at issues and discussions, but it seems like style resource definitions that a script resource definition has as a dependency is not being rendered when the script is rendered in liquid using {% script name: "My-script-registration-name", at: "Foot" %}. Looking at the code, looks like there are checks for the same render location, but even when I tried forcing the script to the head location as well as the style, it didn't actually render.
somecodeguy
@dafergu2:matrix.org
[m]
I had to jump through a bunch of hoops to work around this because in a non-dev environment, the css style name is hashed due to bundling and I dynamically get the url from a manifest. So I ended up having to regex sub a bunch of filename patterns and hope I don't get conflicts. On top of that, in dev mode the css is being imported via an HMR transpiled component that doesn't actually use the manifest. So I had to create a liquid accessor that exposed whether or not I was in dev mode in order to manually render the stylesheet a vue subcomponent used when in a non-dev environment but use the HMR on the fly transpiled version when in dev.
Does anyone know if script resources can depend on css resources? And if so, what might cause my specific situation of them not rendering?
Dean Marcussen
@deanmarcussen
Scripts dependencies and style dependencies are seperate, so there's no dependencies between them
somecodeguy
@dafergu2:matrix.org
[m]
Hrm, why differentiate?
Use case is I'm pulling in a package and bundling the css. The package may need you to import css in your js code, which results in a new css file being bundled. I'm using the bundle manifest to determine what script resources are needed for a given entry point. It cascades down to the css files as well. Since the script is the entry point, that's the only file that is truly deterministic in naming.
aaronamm
@aaronamm

For those who what to use GitHub Actions or Azure DevOps Pipelines, I have a document to compare them.
I will add GitHub Actions code specific to Orchard Core later.

https://www.dotnetthailand.com/programming-cookbook/github-actions/github-actions-vs-azure-devops-pipelines

Sotiris Roussos
@urbanit
Trumbowyg editor error during image resizing: https://jsfiddle.net/sroussos/rmv1e0ja/2/
4 replies
Sotiris Roussos
@urbanit
image.png
somecodeguy
@dafergu2:matrix.org
[m]
If got a custom controller with a route. It's job is to grab a well known content item, add a property to it based on a url parameter, and then render the shape.
        [Route("{myValue?}")]
        public async Task<IActionResult> ClassDetails(int myValue)
        {
            var page = await _oc.GetContentItemByHandleAsync($"slug:/class");
            var shape = await _displayManager.BuildDisplayAsync(page, _modelAccessor.ModelUpdater);
            shape.Properties.Add("TestPropertly", myValue);
            // var content = await _displayHelper.ShapeExecuteAsync(shape);

            return View(shape);
        }
When I look at the Model in the rendered template, the model doesn't have the property. Is there some configuration I need to add?
Also, all of a sudden our media library isn't populating. What's the best way to debug? We use the Azure storage provider.
@deanmarcussen: Isn't that the pattern you recommended to me rather than using the content item merge?
somecodeguy
@dafergu2:matrix.org
[m]
I'm also seeing this in the logs:
2021-06-02 12:07:56.9398|Default|00-521add71d6b10e8fa1df420ac31f8e49-aee88540b26e97b6-00||Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware|ERROR|An unhandled exception has occurred while executing the request. System.ArgumentOutOfRangeException: Not a valid Win32 FileTime.
   at System.DateTime.ToFileTimeUtc() in System.Private.CoreLib.dll:token 0x6000ccc+0x45
   at System.DateTimeOffset.ToFileTime() in System.Private.CoreLib.dll:token 0x6000d41+0x7
   at SixLabors.ImageSharp.Web.Middleware.ImageContext.ComputeLastModified() in SixLabors.ImageSharp.Web.dll:token 0x60000c3+0x60
   at SixLabors.ImageSharp.Web.Middleware.ImageContext.ComprehendRequestHeaders(DateTimeOffset lastModified, Int64 length) in SixLabors.ImageSharp.Web.dll:token 0x60000bc+0xe
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.SendResponseAsync(ImageContext imageContext, String key, ImageCacheMetadata metadata, IImageCacheResolver cacheResolver) in SixLabors.ImageSharp.Web.dll:token 0x60000d1+0x28
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.ProcessRequestAsync(HttpContext context, IImageResolver sourceImageResolver, ImageContext imageContext, IDictionary`2 commands) in SixLabors.ImageSharp.Web.dll:token 0x60000ce+0x2fb
   at SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext context) in SixLabors.ImageSharp.Web.dll:token 0x60000cd+0x381
   at OrchardCore.Media.Services.MediaFileStoreResolverMiddleware.Invoke(HttpContext context) in OrchardCore.Media.dll:token 0x6000106+0x45d
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) in Microsoft.AspNetCore.Authorization.Policy.dll:token 0x600000b+0x3f1
full disclosure, running on .net 6 prev 4
Dean Marcussen
@deanmarcussen
can you open an issuie for the second one (or I will never remember to see if its a problem, and I think it might be something to look at)
somecodeguy
@dafergu2:matrix.org
[m]
@deanmarcussen: Yup, I believe it is prev 4 related. prev 3 works.
2 replies
Dean Marcussen
@deanmarcussen
re the first, it dependes which Model in which template probably, where you are looking for the property
somecodeguy
@dafergu2:matrix.org
[m]
so, I have a liquid page with an alias. The liquid page has nothing on it really, except a flow part and a liquid part (body). I have a {{ Model | json }} in the body liquid part and in a liquid part in the flow part. Neither of them have anything in the properties field.
Dean Marcussen
@deanmarcussen
they don't automatically apply to the shapes inside a shape. so it will be at the parent View. So whatever View you return from that controller, and if you need it lower, you need to pass it further down. or cheat and stick it in the http context.
1 reply
somecodeguy
@dafergu2:matrix.org
[m]
got an example of cheating with the http context?
somecodeguy
@dafergu2:matrix.org
[m]
@deanmarcussen: OrchardCMS/OrchardCore#9604
Brent
@fuzl-llc
Using the default Blog recipe, I'm trying to write a Lucene query to return BlogPost content items that have the Category "Travel" taxonomy checked. I've searched everywhere and can't find anything on searching for content items that have a particular taxonomy item (or items) selected. I found one thing here that doesn't seem to work for me: putting "term": { "BlogPost.Category": "47d0np1jrbb17t22xn8hm0bsw5" } after the query/term part of the built in RecentBlogPosts query. Is there a way to make this work?
2 replies
somecodeguy
@dafergu2:matrix.org
[m]
@fuzl-llc: Sorry mate, haven't worked with Lucene stuff yet.
Mike Paterson
@devlife
I enabled graphql feature but i don't see anything in the schema. any ideas?
1 reply
Actually it looks like this is being thrown
System.ArgumentOutOfRangeException:
   at GraphQL.Types.ComplexGraphType`1.AddField (GraphQL, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null)
   at OrchardCore.Queries.Lucene.GraphQL.Queries.LuceneQueryFieldTypeProvider+<BuildAsync>d__2.MoveNext (OrchardCore.Lucene, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullOrchardCore.Lucene, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Lucene\GraphQL\LuceneQueryFieldTypeProvider.csOrchardCore.Lucene, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 53)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Apis.GraphQL.Services.SchemaService+<GetSchemaAsync>d__5.MoveNext (OrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullOrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Apis.GraphQL\Services\SchemaService.csOrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 56)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at OrchardCore.Apis.GraphQL.GraphQLMiddleware+<ExecuteAsync>d__9.MoveNext (OrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullOrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: C:\projects\orchardcore\src\OrchardCore.Modules\OrchardCore.Apis.GraphQL\GraphQLMiddleware.csOrchardCore.Apis.GraphQL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: 78)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0,