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)

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).
three main menus, each menu has three links
I'm setting this up from a recipe.json.
image.png

Something like that.

In the Layout.liquid I have code / markup as follows:

<nav class="navbar navbar-expand-md navbar-light bg-transparent fixed-top" id="MainNav">
    <div class="container-fluid">
      <a class="navbar-brand" href="{{ '~/' | href }}">{{ Site.SiteName }}</a>
      <button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
      </button>
      {% shape "menu", alias: "alias:main-menu", cache_id: "main-menu", cache_fixed_duration: "00:05:00", cache_tag: "alias:main-menu" %}
      {% shape "ContentCulturePicker" %}
    </div>
  </nav>
Aleksey Filippov
@happygrizzly
image.png
I'm following the OrchardSkills tutorial. But in the end I have a nav with empty ul:
I don't know what I'm doing wrong
Here's the list of the views I'm using so far:
image.png
Menu.liquid contains the following markup:
image.png
But it doesn't even contain nav elements
somecodeguy
@dafergu2:matrix.org
[m]
@happygrizzly: Your alias doesn't match. See line 7 in your Layout.liquid compared to what you entered in the alias field for your menu.
Aleksey Filippov
@happygrizzly

I tried setting the alias to match menu content items aliases:

{% shape "menu", alias: "alias:main-menu" | append: "-" | append: Culture.Name, ... %}

to no avail

somecodeguy
@dafergu2:matrix.org
[m]
whatever is in your alias text box for the content item....let's call that "myalias"
{% shape "menu", alias: "alias:myalias", <reset of parameters here> %}
you can't put in the filter like that. I believe that will create the shape then pass the shape to the append filter.
{% assign aliasvar = "alias:main-menu" | append: "-" | append: Culture.Name %}
then
{% shape "menu", alias: aliasvar, ..... %}
Aleksey Filippov
@happygrizzly
If you look at OrchardSkills tutorial (https://github.com/OrchardSkills/OrchardSkills.OrchardCore.Localization/tree/main/LocalizationTheme/Views) I mentioned earlier. There's a tricky part with ContentCulturePicker shape. It's in the 'Templates' recipe step. There he defines a special alias to match the localized versions of menu. But I haven't seen him doing it in the Layout view. ??
4 replies
somecodeguy
@dafergu2:matrix.org
[m]
np. :)
Aleksey Filippov
@happygrizzly
Why wouldn't Views/Menu.liquid get called given it's in a referenced / custom theme?
Aleksey Filippov
@happygrizzly
image.png
I'm sure I'm getting a different template, and I think that it relies on the alias
Aleksey Filippov
@happygrizzly
How do I use a liquid template for the Menu provided that I have three different menu aliases:
  • main-menu-uk-ua
  • main-menu-ru-ru
  • main-menu-en-us
    ?
6 replies
Seth Cleaver
@scleaver
Gday, when I bring a multi-tenant DB and azure shells down from production in order to troubleshoot/ locally what do I need to do to get the default site to kick up... got the connection strings right but localhost is trying to load a setup screen instead of the default site.
6 replies
Kevin Welsh
@kdubious
Getting an error trying to run a new front end application against an existing OC DB setup:
An unhandled exception occurred while processing the request. NullReferenceException: Object reference not set to an instance of an object. OrchardCore.ContentManagement.Display.ContentItemDisplayManager.BuildDisplayAsync(ContentItem contentItem, IUpdateModel updater, string displayType, string groupId)
3 replies
Praveen Raghuvanshi
@praveenraghuvanshi
Is NoSQL DB supported in Orchard? Now, Azure CosmosDB has a consumption based plan which is a serverless offereing. I am planning to use that along with Azure App service plan.
4 replies
Antoine Griffard
@agriffard
image.png
7 replies
Does anyone have this kind of problem?
somecodeguy
@dafergu2:matrix.org
[m]
I've not seen that but I haven't updated to the latest recently.
Seth Cleaver
@scleaver

I am in a bit of error hell here... 2 days ago OC sites I host started spitting out uncompleted chunks of HTML even though the code has not been touched recently. I am on a version of OC that is around 6 months old. The error I am seeing is below... anyone seen similar?

OrchardCore.DisplayManagement.Implementation.DefaultHtmlDisplay|ERROR|Func`2 thrown from System.Func`2[[OrchardCore.DisplayManagement.Implementation.ShapeDisplayContext, OrchardCore.DisplayManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Threading.Tasks.Task, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] by ArgumentOutOfRangeException System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')

I am looking at upgrading to the latest but that is not going as smoothly so looking for the best avenue to resolve.

Dean Marcussen
@deanmarcussen
@scleaver that one looks like the asp.net core security patch issue I mentioned to you yesterday . upgrade is probably the best solution, but the asp.net fix should have been in this months patch released a few days ago from asp.net
Seth Cleaver
@scleaver
@deanmarcussen I'l PM you
Nicholas Mayne
@Jetski5822
Morning all - Kinda in a bind, I need the Azure Keyvault stuff, but its not on master... and we havent released in a while. Now, I could just copy it locally... but thought - peeps! when are we releasing? its been over a year now...
I see there are no P0's, 2 P1's... are the P1's the blockers?
Dean Marcussen
@deanmarcussen
The keyvault stuff is super light weight @Jetski5822 an extension method and a class... in terms of release we're really just on some housekeeping and a couple of bits n bobs