These are chat archives for OrchardCMS/Orchard

15th
Nov 2016
vlatkost
@vlatkost
Nov 15 2016 08:38
anyone have an idea how to override module (ex. Orchard.Layouts) placement.info with the one in the active theme folder?
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 08:52
I have a question for all, especially those involved in coding core parts. ( @sebastienros can probably answer, or knows who can)
I have been going through ContentFieldDriverCoordinator.cs (and ContentPartDriverCoordinator.cs). Take for example the Importing methods there. there is a foreach loop going through all the drivers and firing their Importing methods. At the same time, in DefaultContentManager.cs, the methods of the handlers in the list are all fired using Handlers.Invoke(...).
Wouldn't it be cleaner to use invoke for the drivers as well? Or the reason is that the methods in the drivers are assumed to always be called by the handlers?
Subrata Sarkar
@emfluenceindia
Nov 15 2016 12:40

I Enabled feature Code Generation. Changed command prompt to orchard >. But when I tried codegen theme BoxingDay I got this error:

>Error executing command "codegen theme BoxingDay"

No command found matching arguments "codegen theme BoxingDay". Commands available: help commands,help,cultures list,cultures get site culture,cultures set site culture,cultures add,site setting set baseurl,user create,role list,role detail,permission list,user roles,user add role,user remove role,role add permission,role remove permission,role create,role delete,autoroute create,theme list,theme activate,layer create,widget create,menuitem create,menu create,recipes harvest,recipes execute,recipes result,package create,package install,package uninstall,page create,blog widget create recentblogposts,blog widget create blogarchives,blog create,blog import,blog build archive,feature list,feature enable,feature disable,tags widget create tagcloud.


Hazzamanic
@Hazzamanic
Nov 15 2016 12:49
did you enable the feature on the default tenant? are you sure it is enabled?
Subrata Sarkar
@emfluenceindia
Nov 15 2016 12:50
Sorry I am new to Orchard. What is default tenant?

I tried to enable the feature from orchard command line and it got enabled:

orchard> feature enable Orchard.CodeGeneration Enabling features Orchard.CodeGeneration Code Generation was enabled

But then

orchard> help codegen Command codegen doesn't exist

I don't know what a Default Tenant is but when I go to Installed tab and search for Code Generation, it has an Uninstall link
Orchard version is 1.10.1.0 and Code generation version is 1.10.1
robhal24
@robhal24
Nov 15 2016 13:36
@emfluenceindia you are running "help codegen", try "codegen"
I am trying to use the Gulp integration in Orchard however I cannot get the build tasks to show
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:38
@robhal24 it says Error executing command "codegen". The list of commands
robhal24
@robhal24
Nov 15 2016 13:38
blob
blob
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:38
I tried to run codegen theme MyTheme and got the same message with a list of available command which does not have codegen
sorry, am I interrupting you again?
robhal24
@robhal24
Nov 15 2016 13:41
haha doesn't matter
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:43
:)
robhal24
@robhal24
Nov 15 2016 13:43
what if you run "feature list"
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:43
please help me get rid of this
checking
a looooonggg list
going through it
robhal24
@robhal24
Nov 15 2016 13:46
blob
blob
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:46
I already run that command. It said codegen was enabled
robhal24
@robhal24
Nov 15 2016 13:46
that won't work, you need to enable Orchard.CodeGeneration
then you will get the "codegen" command
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:47
I did exactly the same i.e. feature enable Orchard.Codegen
robhal24
@robhal24
Nov 15 2016 13:47
Orchard.CodeGeneration
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:48
yes, sorry for the typo. I did what it require
how can I paste a screenshot here?
robhal24
@robhal24
Nov 15 2016 13:48
just paste
use a snipping tool or equivalent
blob
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:49
PrintScreen but paste is not enabled
robhal24
@robhal24
Nov 15 2016 13:50
ok strange
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:50
yes, that's exactly I have on my screen right now
robhal24
@robhal24
Nov 15 2016 13:50
by the way, you need to send "codegen xxx"
codegen alone is not a command
so "codegen theme" or "codegen module"
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:50
and when I run codegen theme MyTheme it says command doesn't exist
robhal24
@robhal24
Nov 15 2016 13:50
strange :)
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:51

orchard> codegen theme BoxingDay

Error executing command "codegen theme BoxingDay"

No command found matching arguments "codegen theme BoxingDay". Commands available: help commands,help,cultures list,cultures get site culture,cultures set site culture,cultures add,site setting set baseurl,user create,role list,role detail,permission list,user roles,user add role,user remove role,role add permission,role remove permission,role create,role delete,autoroute create,theme list,theme activate,layer create,widget create,menuitem create,menu create,recipes harvest,recipes execute,recipes result,package create,package install,package uninstall,page create,blog widget create recentblogposts,blog widget create blogarchives,blog create,blog import,blog build archive,feature list,feature enable,feature disable,tags widget create tagcloud.


robhal24
@robhal24
Nov 15 2016 13:51
very strange, i've got it listed
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:51
yes it is! :(
robhal24
@robhal24
Nov 15 2016 13:51
maybe restart the CLI
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:51
I double checked module > installed tab in admin and its there as well
ok, let me try that too
Reinitialized orchard session, enabled feature again but its still the same!
robhal24
@robhal24
Nov 15 2016 13:54
sorry I can't help you, I cannot reproduce
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:54
shall I uninstall it from the admin and retry form CLI?
please tell me one thing
robhal24
@robhal24
Nov 15 2016 13:56
here go without code generation :P
paste in your /Themes folder and include project in the solution
Subrata Sarkar
@emfluenceindia
Nov 15 2016 13:57
I am using the command feature enable Orchard.CodeGeneration so shouldn't there be a subfolder called Orchard.CodeGeneration under module folder? I cannot see that in my cloned source.
out of curiosity
btw thanks a ton for the theme skeleton :) I can at least start from here, but it would be nice if I get to know what is going wrong.
I mean does every feature have its own namespace?
robhal24
@robhal24
Nov 15 2016 14:01
blob
blob
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 14:02
there is modules, then there is features. Namespaces are conceptually separate
features are contained in modules (and a module with a single feature may have a default feature)
a module may then contain several features e.g. the module Orchard.Widgets contains 3 features
namespaces are not an Orchard construct, per se. e.g. the namespace Orchard.Widgets.Handlers contains code for the handlers from different features
robhal24
@robhal24
Nov 15 2016 14:05

blob
blob

Can anyone explain what I need for the Orchard Gulp tasks to show up?

Subrata Sarkar
@emfluenceindia
Nov 15 2016 14:06
I don't have this under my Module folder!! Strange
Subrata Sarkar
@emfluenceindia
Nov 15 2016 14:13
Uninstalled and then reinstalled it form Gallery. Run feature enable. Shows up under Installed tab, but codegen theme xxx still gives the same error :( :(
robhal24
@robhal24
Nov 15 2016 14:24
it should be a default module
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 14:25
Orchard.CodeGeneration is a module that you should have
it's in the repo
Subrata Sarkar
@emfluenceindia
Nov 15 2016 14:26
Yes, it was there before. I just uninstalled and reinstalled in case there was something wrong. It is installed again and I can see it under Module folder now. I enabled it as well. But the command is not being recognized at all!
what could be the possible work around for this? If it is there it should work I believe!
Hazzamanic
@Hazzamanic
Nov 15 2016 14:27
build your solution? maybe there is some error?
robhal24
@robhal24
Nov 15 2016 14:29
@emfluenceindia I would just do a fresh clone of Orchard, check if the module is there, then build and run the CLI
Subrata Sarkar
@emfluenceindia
Nov 15 2016 14:30
@Hazzamanic ah!! 52 build errors and all of them are coming from Orchard.CodeGeneration project :O. Thanks!! @robhal24 yes I will do a fresh clone now. I will see if this solves my issue
btw, I am cloning from here: https://github.com/OrchardCMS/Orchard. Is this the right place?
Hazzamanic
@Hazzamanic
Nov 15 2016 14:33
yeah, Orchard.CodeGeneration is included in the source, you shouldn't need to install from the gallery or anything
Subrata Sarkar
@emfluenceindia
Nov 15 2016 14:34
Ok, I am going to do a fresh clone now with this hope that it would resolve my issue
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 15:10
i recommend not cloning from the dev branch, as that is the least stable. 1.10.x is good, and updated frequently. 1.10.1 is, I think, stable
Subrata Sarkar
@emfluenceindia
Nov 15 2016 15:14
which one I should download?
ok, 1.10.x is the one you said
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 15:17
yes. Master should work as well
github defaults you to dev, and that may not be what you are looking for
Subrata Sarkar
@emfluenceindia
Nov 15 2016 15:18
thank you
Subrata Sarkar
@emfluenceindia
Nov 15 2016 16:46
@MatteoPiovanelli-Laser Thank you! I cloned from master. Solution compiled without error. Enabled codegen module and finally created a new theme skeleton from orchard CLI. Thanks everybody for your enormous help so far :)
Matteo Piovanelli
@MatteoPiovanelli-Laser
Nov 15 2016 16:47
good to know. Glad I could help.
Subrata Sarkar
@emfluenceindia
Nov 15 2016 16:48
it was much more than help!
S├ębastien Ros
@sebastienros
Nov 15 2016 17:57
@MatteoPiovanelli-Laser Invoke vs. foreach, usually we use Invoke, which also handles exceptions by logging them and skipping and element without failing. Maybe a foreach here is used in order to fail on an exception. Look at the history of the code, if it was converted to a foreach it probably means it was on purpose.
vlatkost
@vlatkost
Nov 15 2016 18:06
@sebastienros I have a question about O1 also
I have some things in placement.info, that are being ignored
actually the Layout Modules placement.info somehow takes precedence over the one in the active theme
S├ębastien Ros
@sebastienros
Nov 15 2016 18:13
that's a bug then, please file an issue with a simple repro
vlatkost
@vlatkost
Nov 15 2016 18:14
ok, tnx