GithubHelp home page GithubHelp logo

lombiq / orchard-training-demo-module Goto Github PK

View Code? Open in Web Editor NEW
156.0 18.0 56.0 1.51 MB

Demo Orchard Core CMS and Orchard 1.x module for for you to become an Orchard developer. This module completes the training materials under https://orcharddojo.net.

Home Page: https://orcharddojo.net

License: BSD 3-Clause "New" or "Revised" License

C# 88.58% HTML 10.67% Liquid 0.56% CSS 0.08% PowerShell 0.11%
orchard orchard-core orchard-cms orchard-module

orchard-training-demo-module's Issues

Training Demo

I have been looking at the training

https://github.com/Lombiq/Orchard-Training-Demo-Module/blob/orchard-core/StartLearningHere.md

Interesting read some may find it a bit cumbersome to go through code files to find information.

I wonder if you have thought of using Youtube/Twitch to do live online stream demos, where you can interact with the public directly, easily and pretty much get instant feedback.

I know you have the Meeting you share and I think people can join in but some might not know that as it is not hugely visible.

anyway just a thought as some prefer audio & video demos to read

Outdated warning?

Thanks for the awesome module. I think the warning below might be out of date since I had no problem using the module in this way:

"Warning: At the moment the latest released Orchard Core version is RC1 and it targets the unsupported 3.0 version of .NET Core. Since we updated our extensions to 3.1 they won't be compatible anymore. Thus for the time being please use the other approach with NuGet packages."

Training Demo Recipe not Showing

I've struggled. I haven't been able to get the "Training Demo" recipe to show when I start the site. I have followed all the documentation, and I added the references to the orchardcore.application.targets, etc. Am I missing something?

Compiling error trying to follow the "Orchard-Training-Demo-Module" (OSOE-778)

Hi Everyone,

I'm new to Orchard Core, and after watching the Dojo Course 3 on YouTube, I started exploring the code, trying to set up this solution.

Here's what I did:

  1. Followed the first point of the "Orchard-Training-Demo-Module";
    1.1 Completed the prerequisites in this way:
    1.1.1 Followed these instructions to install Node.js on Windows using the installer and following the "Additional Configuration" specified here (like enabling long paths, etc.);
    1.1.2 Went back to the prerequisites and installed "PowerShell 7".
    1.1.3 Since I used a GUI to clone the repo, I didn't initialize the submodules, because the folder was already there (after cloning the branch);
  2. Returned to the "Orchard-Training-Demo-Module" readme, and cloned the repo Open-Source-Orchard-Core-Extensions;
  3. Set the starting project to: Lombiq.OSOCE.Web;
  4. Started the project;
  5. Encountered 42 Errors. You can find them in the attached file OrchardCore-LearningPath_Error-list.txt. The main error seems to be caused by the command "pnpm install" exiting with code 9009.

Can anyone help me?

Also, I'd like to provide feedback as suggested in Dojo Course 3. I feel that the process to install the "Orchard-Training-Demo-Module" that is "Open-Source-Orchard-Core-Extensions" locally, is too fragmented. As a new Orchard Core user, I found it confusing to jump around various readmes and follow parts of guides on different topics. A single, comprehensive guide in one place would be much more helpful for following the steps systematically.

Thank you

My dev environment:

  • Windows 11 Pro;
  • Visual Studio 2022 v. 17.8.5;
  • .NET 5, 6, 7 runtime installed;
  • NodeJs v. 20.11.0 x64

Jira issue

Explaining Logging

In one of the first steps in the YourFirstOrchardCoreController it is explained that the _logger logs to a file through NLog.

When not using the OrchardCore source code, it should be explained that to get this working the developer should:

  1. Install OrchardCore.Logging.NLog in the web application
  2. Add an NLog.config
  3. Add ConfigureLogging() to Program.cs

INotifier in a theme

Definitely loving the training demo! I have a question about INotifier. Does it work in a theme as well? I can't seem to get it to show in the UI.

build:scripts randomly failing (OSOE-559)

I've seen this kind of error twice during OSOCE CI builds now. Usually, it works, but sometimes we see this:

EXEC : error : "build:scripts" exited with 1. [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]
Error: 1: Command failed: pnpm build [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]
EXEC : error : "build:scripts" exited with 1. [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]
EXEC : error : Command failed: pnpm build [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]
EXEC : error : "build:scripts" exited with 1. [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]
Error: MSB3073: The command "node scripts/run-pnpm-script "C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo" build" exited with code 1. [C:\a\Open-Source-Orchard-Core-Extensions\Open-Source-Orchard-Core-Extensions\src\Modules\Lombiq.TrainingDemo\Lombiq.TrainingDemo.csproj]

It seems that the first step would be to increase build output verbosity and wait for it to happen again.

Jira issue

OlderThan30 throwing an exception

On /Lombiq.TrainingDemo/PersonList/OlderThan30 I'm getting

InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'Castle.Proxies.PersonPartViewModelProxy', but this ViewDataDictionary instance requires a model item of type 'OrchardCore.DisplayManagement.Views.ShapeViewModel`1[Lombiq.TrainingDemo.Models.PersonPart]'.

which I think must be related to 6958f27

Update to Orchard Core RC2

...once it's released.

Clarification needed on learning path repository to use, "Open-Source-Orchard-Core-Extensions" or "Orchard-Training-Demo-Module"? (OSOE-783)

Hi everyone,

I'm currently following the learning path for Orchard Core and have encountered some confusion regarding the repositories involved.

Initially, I cloned the "Open-Source-Orchard-Core-Extensions" repository as indicated in the "How to start" step here (I did a pull request two days ago about this). The "Open-Source-Orchard-Core-Extensions" repository is the one contains the Lombiq.OSOCE.Web solution and project. Keep in mind for later that Lombiq.OSOCE.Web is not present in the "Orchard-Training-Demo-Module" repository.

Upon reaching the "Learning Orchard Core with this module" section, I was invited to follow the "StartLearningHere.md" file. In the Let's get started section, it mentions to "look into the Dependencies of this project you will find either the NuGet reference for the OrchardCore.Module.Targets package". However, I couldn't find any reference to this package in the Lombiq.OSOCE.Web project from the "Open-Source-Orchard-Core-Extensions" repository previously cloned. Instead, this reference appears to be in the "Orchard-Training-Demo-Module".

Could you please clarify which repository and branch should be used to properly follow the learning path? To follow "StartLearningHere.md" I need to clone another repo? The discrepancy between the Lombiq.OSOCE.Web project in the "Open-Source-Orchard-Core-Extensions" and the "Orchard-Training-Demo-Module" is quite confusing.

Thank you so much.

Jira issue

RC2+ upgrade

After upgrading to the Orchard version after RC:

  • We need to change ApiController ChallengeOrForbid() to ChallengeOrForbid("Api"). See: OrchardCMS/OrchardCore#7039.
  • Need to surround titles with <zone Name="Title">...</zone>.

Simplify Lombiq.TrainingDemo and make it available as a standalone solution too (OSOE-797)

To-dos

  • Add a solution with a barebones OC web app. So, one can open that solution and explore the Training Demo there, without anything else.
  • Configure Auto Setup with the Training Demo recipe. Make people aware in the docs how Auto Setup works and with which credentials they can log in.
  • Add its own build GHA workflow for this solution here.
  • Keep the module added to OSOCE as well, so we can manage it together with every other extension of ours, and thus be able to e.g. do OC upgrades better.
  • Change the guides so they don't refer to OSOCE (only as a link to further reading). Add a note about running the app via VS and via the .NET CLI.
  • Remove the NE dependency and the Node tutorial step.
  • Add tutorial step about the CI build.

Original content by Mike

I shared this project with my colleague to start learning OC. He was overwhelmed after a had of trying to build the training project. I tried to help him setting it up on his local machine, and gave up because I had no more time to waste. But things I noticed if that there are 90 projects in the solution. some project required .net6 and other .netstandard2.0.

Typically if you have been programing for a long time and your PC is old, netstandard2.0 may be already installed on your machine.

I think the training module is for educating users and get the up to speed as much as possible. So why getting this module up and running is a difficult task for new on comers? I found most programmers (including myself) are very lazy. In order to learn something new like OC, the simpler and quicker the get started process the better. And the higher the chance I would actually use OC.

I suggest that this project to be stripped down to very simple project where one can simply clone it and get it up and running. Then the user is able to visit the Map.cs file and start reading and learning. I also suggest using .NET 8 at the dependency for the project since that is the min framework required by OC. All the cool Lombiq toys could be part of another project but not the training module for simplicity.

I hope I don't make the most wanted list after this issue @Piedone ๐Ÿคฃ. Just some constructive criticism to help more people adopt the amazing OC.

Jira issue

Clarify existing samples

  • When to inject a dependency directly in a background task vs using the ห™IServiceProvider or just use the latter every time?
  • โœ“ There are multiple versions of driver methods, e.g. DisplayAsync and Display but there are three UpdateAsync ones. Clarify when to use each.

Lombiq.vuejs Module - compile error in MacOS - Big Sur

/Users/xx1/dev2021/Open-Source-Orchard-Core-Extensions/src/Modules/Lombiq.VueJs/EXEC: Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/ricky/dev2021/Open-Source-Orchard-Core-Extensions/src/Modules/Lombiq.VueJs/node_modules/fsevents/lib/binding/Release/node-v83-darwin-x64/fse.node --module_name=fse --module_path=/Users/xx1/dev2021/Open-Source-Orchard-Core-Extensions/src/Modules/Lombiq.VueJs/node_modules/fsevents/lib/binding/Release/node-v83-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) (Lombiq.VueJs) node-pre-gyp ERR! stack

Demonstrate IOptions<T> usage

How it is in Orchard.Emails with SmtpSettings and its SmtpSettingsConfiguration:

  • Use settings class as IOptions<SmtpSettings>.
  • Register SmtpSettingsConfiguration as an IConfigureOptions<SmtpSettings> for it to provide config from site settings.
  • Demonstrate overriding settings from appsettings.json (missing form Orchard.Emails, see this issue, done in e.g. OrchardCore.Admin in the Startup class). Also see the other extension methods references in the appsettings.json file of OrchardCore.Cms.Web.

Discussion about a guide to getting started (OSOE-798)

I'm continuing my learning path with Orchard Core and have some feedback that could be useful for the project. I've watched the dojo course 3 on YouTube and explored the code, but now, I feel quite lost ๐Ÿซ 

I've obtained a lot of information on creating a module and handling events, including writing to the database, I installed a clean Orchard on a Web App and I'm unsure (lost) about where to start. For instance:

  1. Should I use a Blog/Agency recipe for creating a custom website, or would it be better to start with the blank recipe?
  2. What's the best practice to create my own theme and make it reusable?
  3. My website will feature two types of carousels, should I treat these as Orchard modules to be reused in other projects, or is it better to incorporate them into my theme? ๐Ÿค”

Upon some search on Google, I discovered that others have shared my confusion. For example, this guy has written an excellent guide on theming Orchard Core from scratch, based on notes from a five year old video, which might still be relevant today (maybe needs to be updated).

I believe a beginner's guide to Orchard Core, with short tips on best practices for "Content Types"/"Content Parts" and theme creation, is crucial. Once familiar with the basics, developers can explore Orchard's deeper functionalities.

What are your thoughts?

Thank you

P.S. if this isn't the appropriate project for this discussion, could you show me where I can open this topic?

Jira issue

Typo

Lombiq.TrainingDemo\Indexing\ColorFieldIndexHandler.cs

  • IndexHandlers are different from IndexProviders. While IndexProviders will store indexed values in the SQL database

"While IndexProviders" should be "While IndexHandlers" ?

How to use DisplayDriver when using widgets/flow editor

I have a ContentPart (with a widget stereo type), a ViewModel, a DisplayDriver which returns the ViewModel from Display, and added the widget to a flow editor in a Page. However, when I go to run the site, it appears that the widget file (Widget-MyComponent.cshtml) requires a model of type ZoneHolding isntead of the ViewModel. If that is the case, how would I update DisplayDriver.Display to return a ZoneHolding instead of the ViewModel? I'm a bit confused as to how all of this works.

create an index table without multiple records in the document table

In the Book Index example you create multiple book records in the documents table.
How would i have only a single record in the documents table and multiple records in the index table. ?
I want to have a logentry.cs class in my index table but reference only 1 record in the documents table.

I don't want to pollute the documents table with hundreds of thousands of log entry records , since I have the log entry index table for this.
Can you give me an example ?
Thank you.

Add sample on editing content items from code

I.e. on how to change content parts' values from code directly with Apply() as opposed to going through IContentManager.UpdateAsync(). Include IContentManager.LoadAsync() usage corresponding to querying content items.

Error when I try to "Configure" a new Orchard OSOCE Web App with Sql Server in localhost (OSOE-788)

Hi,

I successfully configured a new Orchard (OSOCE) web app using the SQLite database.

Now, I cloned the OSOCE repository again into a new folder, to use a new and empty database in my local SQL Server, and in the configuration, I used this connection string: Server=localhost;Database=OrchardCoreLearningPath;User Id=ImALocalhostAdmin;Password={alphanumeric-passw} but I always get the error:

"The provided connection string is invalid or the server is unreachable."

I'm able to connect to my database using SQL Server Management Studio and "localhost", I'm not using SQL Express, my user has rights to manage the database, and I'm using the standard port.
Because I started the web app with Ctrl + F5, to run the first time site configuration, I doesn't have any log in my Visual Studio Output window.

I don't understand what I'm doing wrong.

Thank you

Jira issue

ColorFieldSettingsDriver not saving settings

To make it work change to below:

context.Builder.MergeSettings<ColorFieldSettings>(settings =>
{
    settings.Hint = model.Hint;
    settings.Label = model.Label;
    settings.Required = model.Required;
});

Or

context.Builder.WithSettings(model);

Tested with latest Orchard Core in dev branch today.

InvalidOperationException: The partial view '/Areas/Lombiq.TrainingDemo/Views/InjectedShape.cshtml' was not found (OSOE-806)

Hey, I'm trying to setup and run the project, particularly to see how Orchard-Vue.js works (via its samples).

  • Long paths enabled via LongPathsEnabled setting to 1 in regedit
  • Completed prerequisites for NodeJs.Extensions

Steps:

  • Cloned https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions with git clone
  • Recursive submodules with git submodule update --init --recursive inside the project directory
  • Opened solution project in VS 2022 from the root project directory (Lombiq.OSOCE.sln)
  • pressed CTRL + F5 to build solution, node and pnpm seem to be ok
  • once building finished, https://localhost:5001/ opened with the setup page
  • chose Training Demo as a setup recipe and Sqlite as a database
  • Clicked Finish setup
  • Received Internal Server Error (it persists even after quitting server and re-running it with IIS express button after initial setup)
InvalidOperationException: The partial view '/Areas/Lombiq.TrainingDemo/Views/InjectedShape.cshtml' was not found. The following locations were searched:
/Areas/Lombiq.TrainingDemo/Views/InjectedShape.cshtml

image

Is there anything I've missed and needs to be done?

I have Node.JS 20.10.0 installed via NVM and running it on Windows 11

Jira issue

Get build error after install this module and VueJs module

botnet build

Build FAILED.

EXEC : { error : Cannot find module '../Lombiq.VueJs/Assets/Scripts/helpers/get-vue-app-compiler-pipeline' [/Users/bolin/dev/Orchard/Orchard-Training-Demo-Module/Lombiq.TrainingDemo.csproj]
/Users/bolin/dev/Orchard/Orchard-Training-Demo-Module/Lombiq.TrainingDemo.csproj(76,5): error MSB3073: The command "gulp" exited with code 1.
0 Warning(s)
2 Error(s)

Note: I am running VS 2019 for Mac

Step-by-step setup for training demo module

I'm trying to get everything setup and building for the training demo module. This seems to be more complex than I would have expected. Even after cloning the utilities, the Libraries, pnpm, and everything else I'm still having issues. Would it be possible to provide a step-by-step list of instructions so a developer can get things setup so it builds/runs properly (including orchard core source)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.