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)

somecodeguy
@dafergu2:matrix.org
[m]
Since I'm using nuget packages for references vs running against the entire OC code base.
somecodeguy
@dafergu2:matrix.org
[m]
@sebastienros: I figured it out. The part was defined and working properly but I did not have a display template file in the module. Since the other place I was using the part had its own shape template in my theme which ignores the part when rendering, none of my other code was actively trying to render the part. This part really doesn't do anything except impact styles rendered in other portions of the markup surrounding the widget the part is placed on.
So, my fix was to create an empty shape template cshtml file.
Would you consider that a bug? Should it simply try to render the part just like it would if it were created in the admin UX?
Sébastien Ros
@sebastienros
File an issue and we'll triage it. There might still be an issue as it could have fallen back to a standard template, I need to understand the details to say if it's a bug.
Sébastien Ros
@sebastienros

@/all We are saddened to inform you that Piotr Szmyd, one of our founding contributors, has passed away. Piotr was a friend to all of us. To pay our respect we have created a thread where people can share memories and messages.

OrchardCMS/Orchard#8484

orbus-dkreivenas
@orbus-dkreivenas
Hey, have a question, we are facing some memory issues running Orchard CMS in Azure, we use it as a multi tenancy system, hosting more than 100 tenants, each tenant takes around 200mb of memory, so obviously this is not really viable except having to scale the app service into separate app services and put some kind of a front door on top of them. The question really is kind of abstract: what are your recommendations in scaling Orchard, maybe there is some kind of unload functionality for tenants that are inactive etc... ?
Jasmin Savard
@Skrypt
@orbus-dkreivenas You are using Orchard or Orchard Core?
orbus-dkreivenas
@orbus-dkreivenas
We are using OrchardCMS
kulandairaj
@kulandairaj
Hey, can I use OrchardCore for Asp.net core angular application to make it multi-tenant or modular
3 replies
Le Thanh Son
@lethanhson1998
Hi there, I'm new in orchard core, I have two taxonomy field as selected field, can someone tell me how can i display data in second field according to each selected value in first field, or any document describing this, thanks.
changdongqing
@chdq0306
image.png
somecodeguy
@dafergu2:matrix.org
[m]
@deanmarcussen: Following up on a conversation we had a few weeks ago, you mentioned creating a driver for the content type that I wanted to see requested data for during preview. I have it working but I wanted to verify that the base class I'm deriving the content type from is correct.
public class MyContentTypeDriver : ContentDisplayDriver
{
        private readonly ClassDetailsAccessor _classDetailsAccessor;
        // .... other services used

        public MyContentTypeDriver(ClassDetailsAccessor classDetailsAccessor, /* other injected services */) { _classDetailsAccessor = classDetailsAccessor }

        public override async Task<IDisplayResult> DisplayAsync(ContentItem model, BuildDisplayContext context)
        {
            if (!CanHandleModel(model))
            {
                return null;
            }

            // Allows a user to preview the class details instead of only retrieving the class details when
            // we access the content from the known url route.  The content preview functionality uses a
            // different route.
            if (_classDetailsAccessor.ClassDetails is null)
            {
                var classId = int.TryParse(_httpContextAccessor?.HttpContext?.Request.Query["classId"], out var id)
                    ? id
                    : 23798;
                _classDetailsAccessor.ClassDetails = await _classDetailsService.GetClassDetailsAsync(classId);
            }

            // We return a null shape since we did not render the content type
            return null;
        }

        public override bool CanHandleModel(ContentItem model)
        {
            return model.ContentType == "MyContentTypeTechnicalName";
        }
}
somecodeguy
@dafergu2:matrix.org
[m]
Would the above be the correct base class and the correct method to override? And returning null is the correct thing to do? I don't want to introduce code in the future that will become a performance issue by increasing a burden on every content type for example. I'm trying to understand how to define a driver that is appropriate. I know that content parts have a generic type that is specified, but I couldn't find an example for that when dealing with content types.
Andy Rose
@andycyberian
I have a requirement for a Content Type to have a couple of text fields that are validated as having a unique values across similar content types when published. I've initially looked at creating a custom field (similar to a text field) with validation in the UpdateAsync method but am struggling a bit with the query to ensure the field value is unique. I can see that I can retrieve the content type property 'Path' from the field parameter and can retrieve matching content types with a query but am struggling to look up the properties to compare. I was wondering if there was a simpler approach or should I rather be considering a content part for this? Or should I just push on with the approach I am taking?
9 replies
ruisdias
@ruisdias
Hello,
anyone knows what that "base url" in the settings is for?
Mike Paterson
@devlife
I have a lucene query that, when run in admin UI, returns results. however, running Orchard.ContentQueryAsync() always returns zero results. Can you point me in the right direction regarding how to resolve this issue?
6 replies
image.png
Mike Paterson
@devlife
image.png
Jean-Philippe Tissot
@jptissot
Would it be possible to support many RequestUrlPrefix in oc ?
21 replies
orbus-dkreivenas
@orbus-dkreivenas
Hey, is it possible to unload a tenant that is not used?
agono
@agono
Hi all! I want to modernize a project/site with a large relational database to Orchard Core. In the database, there are multiple 1:N hierarchies, where the parent record is referenced by hundred-thousands up to to a few millions of records and there are a lot of other relations. I would be happy if i could use Orchard as an application framework. But, how to do it correctly and without sacrificing some useful features of Orchard? What are my options? Remodeling the DB and use the yessql document approach - i am not sure this would be a good idea. Using Dapper (or EF Core) with raw tables in Orchard? Perhaps, but how to do it without loosing a lot of Orchard framework features? I know, I can use just "anything" in my custom modules as it is just a asp.net core app in the end, but i have the feeling that i will loose very much of Orchards features... Are there some docs or source code to look at? Thank you for your help!
And i have another (dumb) question :) Is it possible to run 2 orchard core sites with data "shared" in one database? One site would be the "backend" accessible only from local network with lot of CRUD functionality and the other one would be the "readonly" website.
Seth Cleaver
@scleaver
Hey how are the out of the box roles created? Is it via code somewhere?
1 reply
Jimit Ndiaye
@jimitndiaye
Hi all, is it possible to extend the multi-tenancy feature such that we can have a tenant hierarchy consisting of related tenants with some share data/configuration? For instance having a tenant customerA with site customer-a.myorchard.com with some sub-tenants customer-a.myorchard.com/dev and customer-a.myorchard.com/test. Ideally I'd like to be able to publish data from the sub-tenants to the parent. How would you go about implementing something like that? Are there integration points I can extend or would I need to roll my own tenancy module?
2 replies
Mark Clark
@daerogami

Trying to configure a single-host SPA/API/OrchardCoreHeadless application, I have mapped orchard core behind the path "/cms"
My spa works as expected however when I navigate to "/cms" I get this error.

InvalidOperationException: Unable to resolve service for type 'OrchardCore.Documents.IDocumentManager`1[OrchardCore.Settings.SiteSettings]' while attempting to activate 'OrchardCore.Settings.Services.SiteService'.

Can provide my startup.cs, just don't want to spam gitter with a ton of lines.
Will send that file in a gist

14 replies
Jared Goodrich
@jaredgoodrich1_gitlab
Hello, is it possible to secure creating content types by role? I know I can set createable on the content type which sets it for everybody but just wondering if I can do it by role so that only some users can create certain content types while others cannot.
4 replies
Sébastien Ros
@sebastienros
@agriffard @deanmarcussen @daveblack @Skrypt can't join triage today
3 replies
somecodeguy
@dafergu2:matrix.org
[m]
@jtkech: The services.AddOrchardCore() is for decoupled and/or headless sites, correct? While services.AddOrchardCoreCms() is needed when you'll actually use OC to render the tenant site.
1 reply
Dean Marcussen
@deanmarcussen
no AddOrchardCore() is for modular framework sites, AddCms() is for cms sites.
14 replies
Nicholas Mayne
@Jetski5822

@kevinchalet hey dude - trying to do a custom OAuthHandler, but keep ending up in a stackoverflow.

Any common pitfalls I should be aware of?

Nicholas Mayne
@Jetski5822
image.png
Seems this is what is stack overflowing
somecodeguy
@dafergu2:matrix.org
[m]
So, tracking down how to query for a content item based on a text field, it looks like a bunch of text fields are being included in my WWW_TextFieldIndex table that don't have their Include in Index field checked. Is there a reason why they would be included automatically without intentionally doing so?
3 replies
aaronamm
@aaronamm

Hello everyone, does anybody know how to run this command? I could not find any example how to use it.
https://github.com/OrchardCMS/OrchardCore/blob/dev/src/OrchardCore.Modules/OrchardCore.Demo/Commands/DemoCommands.cs#L19

I think it can be useful for creating a helper tool.

Simon Novak
@snovak7
Hello, I have an issue with SqlQuery is it possible to use CASE in field names, so far I have no luck in using it in ORDER BY CASE... or as a field, as I want certain sort ordering @deanmarcussen
pbull001
@pbull001
Hi ya'all, are all queries (Sql and Lucene) available in liquid Queries object or just Lucene?
Ian Crisp
@IanCrisp

Hi community. I would like the ability to import a recipe with a recipes step which uses a different location other than the "Recipes" folder, and I would like this location to be an external url (in fact it is a private Azure DevOps repo used to version control our recipe files separate from the Orchard Core implementation).

At the moment I have the following recipe:

{
  "name": "Pages",
  "displayName": "Pages",
  "steps": [
    {
      "name": "recipes",
      "values": [
        { "executionid": "Pages", "name": "Data_pages" },
        { "executionid": "Pages", "name": "Explanation_Pages" },
        ...
      ]
    }
  ]
}

But I would like to add an external location url along the lines of the following:

{
  "name": "Pages",
  "displayName": "Pages",
  "steps": [
    {
      "name": "recipes",
      "values": [
        { "executionid": "Pages", "location": "https://my-repo-for-pages/recipes/folderX", "name": "Data_pages" },
        { "executionid": "Pages", "location": "https://my-repo-for-pages/recipes/folderY", "name": "Explanation_Pages" },
        ...
      ]
    }
  ]
}

We will also need to include login credentials to the repo (which is an Azure DevOps private repo).

Would appreciate any thoughts or suggestions, or an alternative method if available?

1 reply
James McMorrough
@makattak_twitter
Does anyone know of an article/video that explains how to create a custom theme in OrchardCore? I don't want the SpaceMan as the background for every single blog post! I have searched but haven't come across anything that take you through it step by step. Many Thanks.
2 replies
Dave Black
@daveblack101
@makattak_twitter https://youtu.be/wtAIgn4gYXc
Nicholas Mayne
@Jetski5822
Hey guys - we have an OC app, only apis, some yessql too. After a while under a load of 3-4K requests, the app starts throwing 504 and stalls - then the IIS app pool needs to be restarted. We can’t see any exceptions.
Any ideas? We are on the nuget version of OC
1 reply
3-4K requests per minute*
somecodeguy
@dafergu2:matrix.org
[m]
@deanmarcussen This is the setting I mean. I specifically enabled it for the Abbreviation field on a content type definition.
The goal is to use the Queries.<MyQuery> | query: abbreviation: 'myabbrev'. Abbreviation is a TextField on the content type, so I eventually looked at the contents of the TextFieldIndex table in SQL. The records for that type were there for the Abbreviation field, so all is good. BUT, I'm also seeing records for other TextField fields on the same ContentType which I did NOT set the Include this element in the index.
somecodeguy
@dafergu2:matrix.org
[m]
Hrm, that's interesting, that checkbox is in the Lucene module's ContentIndexSettings.Edit.cshtml shape template, so I guess it is unclear to me what it actually does. Also, it is unclear as to why only those handful of TextFieldIndex entries for that content type would be in the table and not other text fields from other content types or even that same content type.
Dean Marcussen
@deanmarcussen

I guess it is unclear to me what it actually does.

It does Lucene indexing settings. Not SQL Field indexing settings. There is currently no way to exclude fields from a SQL index. there's an issue tracking it, but I tend to recomend creating your own indexes specific indexes in code, if that's what you want

8 replies
pbull001
@pbull001
Another one - I have a ContentType = Process, I have built a Lucene Index including this content type plus others. I am trying to write a query to match on ContentType but I am buggered if I can get it to work {
"query": {
"match": {
"Content.ContentItem.ContentType" : "Process"
}
}
}. I can match on other columns such as ContentId etc. Driving me insane.