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)

Sébastien Ros
@sebastienros
I am in the room already
somecodeguy
@dafergu2:matrix.org
[m]
What could cause a page being rendered to not respect templates? I've got a custom route that returns a view in which I render a shape. I've tried changing the alternate but the rendered page doesn't have an alternate listed in its model. I've also tried overriding the template with the admin tool and with a cshtml in my theme to no avail. I feel like it is something simple that I'm not understanding.
vmahant
@vmahant
Any Idea I can't see image on frontend. Shortcode feature is enabled though
image.png
image.png
image.png
am I missing something?
Tony Han
@hyzx86

Are there any methods or modules that
Mapping existing relational database entity types to OrchardCore (Yessql) Model
It is possible to automatically create types based on existing types with only simple adjustments

Maybe it can also automatically synchronize data to a relational database?

aaronamm
@aaronamm
I have a custom module and configure OrchardCore.PublishLater as dependency.
However, when I enable my custom module it won't automatically enable OrchardCore.PublishLater module?
Can someone help me one this? Thank you.
[assembly: Module(
    Name = "MyModule",
    Version = "0.0.1",
    Category = "Content Management",
    Dependencies = new[]{
        "OrchardCore.PublishLater",
    }
)]
7 replies
aaronamm
@aaronamm
Should I use _shellFeaturesManager.EnableFeaturesAsync or recipe.json? I think we have something like this in Orchard 1 but I don't know to get it work with OC.
mmdqq
@mmdqq
how to use aspnet-contrib/AspNet.Security.OAuth.Providers in Orchardcore?
somecodeguy
@dafergu2:matrix.org
[m]
@sebastienros @deanmarcussen Thoughts about OrchardCMS/OrchardCore#9615 I'd like to get that merged in as I'm hoping to rely on some timezone updates in .NET 6 preview 4.
CrestApps
@CrestApps
Is there an example of how to change the template of the default pager?
28 replies
somecodeguy
@dafergu2:matrix.org
[m]
Hrm, this is really bothering me. My template is not being applied for a very specific use case. Here's my scenario.
I have a generic content type called Liquid Page. I have a simple content item of type Liquid Page with a well known alias. I have a module that exposes an endpoint on a controller via a [Route] attribute. The controller queries a 3rd party database to get some information. Then it creates a shape for the content item with the well known alias and renders it by passing that shape to the View() method. The cshtml simply does a @DisplayAsync.
I tried creating a Content-LiquidPage template in my theme. This is used for all over Liquid Page content items, but for the one that is rendered via my custom route, it is not.
somecodeguy
@dafergu2:matrix.org
[m]
I also tried setting an alternate on the shape, but that doesn't seem to be working. In fact, I don't even see the alternate listed when it gets rendered. (I dump the model using {{ Model | json }}.
Any suggestions on how to tackle this?
aaronamm
@aaronamm

I found something interesting, if I use dotnet new octheme --name CodesanookTheme --AddLiquid false, I expect some Razor views to be generated but it is not.
Here is the result.

dotnet new octheme --name CodesanookTheme --AddLiquid false
tree -I "bin|obj" CodesanookTheme/

CodesanookTheme/
├── CodesanookTheme.csproj
└── Manifest.cs

Is this the current behavior?

aaronamm
@aaronamm
is-DW
@is-DW
if I don't want load "node_modules" in vs,how to do?:)
4 replies
Kevin Welsh
@kdubious
Is there a good way in a Theme to know if the Tenant is loaded from https://demo.oc.com versus https://www.oc.com/demo? In other words, is there a way in C# Layout to read the Tenant settings for URLPrefix or Hostname?
36 replies
somecodeguy
@dafergu2:matrix.org
[m]
@deanmarcussen: Thanks for the review on the PR. I updated it.
somecodeguy
@dafergu2:matrix.org
[m]
What's the best way to pass a shape property down from the parent content item to all of the children in the content item tree (flowparts with content items etc). I added a template for the main parent content item and I'm getting the shape property but I'm having trouble rendering all of the child content from the overridden template.
11 replies
Jean-Philippe Tissot
@jptissot
Does anyone know how to render a shape to a string in a Razor view ?
17 replies
John Morgan
@john-s-morgan
What's the best way to add a noscript tag to liquid content? Adding scriptblock to head decouples it from the content and ideally would like them both to be together.
4 replies
Troy Parkinson
@trousyt
Has anyone tried to use the CORS module with GraphQL and succeeded? When I try, I don't get any of the CORS headers back on the response.
Jasmin Savard
@Skrypt
There's a trick
You need to uncheck the first checkbox in the policy
as stated in the documentation
!!! warning
As using AllowCredentials and AllowAnyOrigin at the same time is considered as a security risk, policies containing BOTH these options will NOT be activated.
Also, the GraphQL endpoint needs to have a proper permission.
You can try to give permission to the endpoint to your Anonymous user for example to try it.
We don't do any mutations so it should be fine.
Troy Parkinson
@trousyt
I am explicitly specifying the origin (ie. "Allow any origin" is not checked) and have turned off Allow Credentials. I've given the Execute GraphQL permission to the Anonymous role. Still no CORS response headers on a preflight request.
Troy Parkinson
@trousyt
Update: It was a typo with the origin lol :-/ Thanks for the suggestions, @Skrypt
Jasmin Savard
@Skrypt
It should definitely be a validation on that form to remove any confusion.
lengockyquang
@lengockyquang
can I use both razor and liquid template for single orchard core theme ?
9 replies
MargaridaSilvaBom
@MargaridaSilvaBom
Hello. We have a project with multiple tenants and they were all created with the same recipe.
Some changes in texts were then made inside of each tenant, and therefore, they have some differences from the original recipe.
We need to change the recipe to add some more things and run it in all tenants to update them, but now if we run it, the changes that were made in every tenant will be erased.
We want the new changes to be added from the updated recipe and the ones made in each tenant to continue there too.
How can we achieve this?
1 reply
pbull001
@pbull001

Getting 400 return code when trying to submit the form to the controller detailed below. Any pointers please?

"Knowing enought to be dangerous and not enough to be useful ;)"

Liquid form included in landing page detail template

<section class="page-section" id="contact">
<div class="container">
<div class="text-center">
<h2 class="section-heading text-uppercase">Contact Us</h2>
<h3 class="section-subheading text-muted">Interesting in discussing your development idea with us or how to going about working Clever reach out.</h3>
</div>
<form method="post" action="/Contacts/Create"> <!-- name="sentMessage" novalidate="novalidate"-->
<div class="row align-items-stretch mb-5">
<div class="col-md-6">
<div class="form-group">
<input class="form-control" id="pname" name="pname" type="text" placeholder="Your Name *" required="required" data-validation-required-message="Please enter your name." />
<p class="help-block text-danger"></p>
</div>
<div class="form-group">
<input class="form-control" id="email" name="email" type="email" placeholder="Your Email *" required="required" data-validation-required-message="Please enter your email address." />
<p class="help-block text-danger"></p>
</div>
<div class="form-group mb-md-0">
<input class="form-control" id="phone" name="phone" type="tel" placeholder="Your Phone *" required="required" data-validation-required-message="Please enter your phone number." />
<p class="help-block text-danger"></p>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-group-textarea mb-md-0">
<textarea class="form-control" id="message" name="message" placeholder="Your Message *" required="required" data-validation-required-message="Please enter a message."></textarea>
<p class="help-block text-danger"></p>
</div>
</div>
</div>
<div class="text-center">
<div id="success"></div>
<button class="btn btn-primary btn-xl text-uppercase" id="sendMessageButton" type="submit">Send Message</button>
</div>
</form>
</div>
</section>

Controller

// POST: ContactsController/Create
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create(IFormCollection collection)
{
try
{
return RedirectToAction(nameof(Index));
}
catch
{
return View();
}
}

Dean Marcussen
@deanmarcussen
doesn't look like you included an antiforgy token on your form
Peter Keating
@peterkeating
Are there any examples of creating a new index table and populating the table with data from existing content items?
pbull001
@pbull001
@deanmarcussen thank you!!! I shouldn't be this happy it is working but I am :)
Dean Marcussen
@deanmarcussen
@peterkeating you just need to query all the items, and save them. indexes are always rebuilt during save. see the recent user migrations for an example
Peter Keating
@peterkeating
@deanmarcussen Thought that might be the case :)
somecodeguy
@dafergu2:matrix.org
[m]
I'm generating some additional content for a content item when it is published. What's the best way to save that information? Specifically, I'm adding more css styles applicable to the content item. When the content item is displayed, then I'll want to add a style block to the header.
Graham Southgate
@GLRSouthgate_twitter

I am having an issue setting up a new site. I have setup a standard Net5 MVC Web app in Visual Studio and that runs.
I then change the installed packages to have OrchardCore.Application.Cms.Targets latest version and alter my startup to services.AddOrchardCMS().AddMVC(); and app.UseOrchardCore(). When I run the site, I get the signup screen, and enter title etc, admin user details and current MySql connection string and choose SaaS.
When setup is complete, I then can’t login to the admin side and I look at the underlying Db, the Document “OrchardCore.Settings.SiteSettings, OrchardCore.Settings" has a site name of “My Orchard Project Application” - not what I entered and there is no document for “OrchardCore.Users.Models.User, OrchardCore.Users.Core” or “OrchardCore.Roles.Models.RolesDocument, OrchardCore.Roles”. I also only have three tables - document, identifiers and userindex.

I have tries lots of different ways of trying to setup the site - Blog, Coming Soon etc, but all of them fail to add the information into the Db. Has there been a change that could be messing up the db link to MySql which is a 10.3.27-MariaDB.

Can anyone give me guidance?

2 replies
James McMorrough
@makattak_twitter
Does anyone have any practical information about creating a Theme for OrchardCore, I need to be able to get rid of the SpaceMan on the Blog post. Any videos or written material gratefully accepted.
2 replies
Aleksey Filippov
@happygrizzly
Hey everyone! I'm struggling with rendering a menu (three locales, th).