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 01:41

    jtkech on patch-1

    (compare)

  • Apr 12 01:39

    jtkech on patch-1

    Update ZoneShapes.cs (compare)

ורוניקה ציבין
@veronica_stuff_twitter
I need it for sharing and routing in standardized way contentItems from other tenant with same recipe .
Francesco Di Nardo
@fdinardo_gitlab

Hi guys, I am sorry to bother here again, but I am struggling trying to add an orchard project into in a solution where an existing project lives. Let's say I have one MVC (not-razor-pages) project called Module1. this project will be the root of the hosting URL: www.example.com. I have routes like:

I would like to add another project called Module2.Blog which lives under this URL, using a multi-tenant configuration:

But I am getting a lot of routing exceptions when I try to access :

Look like only the HOME PAGE is working properly.

I have in the appsettings this:

  "OrchardCore": {
    "Default": {
      "State": "Running",
      "RequestUrlHost": null,
      "RequestUrlPrefix": null,
      "Features": [],
      "CustomTitle": "Module1"
    },
    "Blog": {
      "State": "Running",
      "RequestUrlHost": null,
      "RequestUrlPrefix": "blog",
      "Features": [ "Module2.Blog" ],
      "CustomTitle": "Blog"
    }
  }

My guess is that I am capturing all the routs in the original project:

app.UseEndpoints(endpoints =>
{
    endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
});

Any Idea about how to fix this?

I followed a bunch of Videos on youtube so I got the way it should work, but with my configuration is not working.

p.s. Module1 is an OrchardCore.Application.Targets, Module2 is OrchardCore.Module.Targets

5 replies
CrestApps
@CrestApps
It seems that the service IContentItemDisplayManager is used to render the widgets. But how can I intercept the part or the widget just before it is being displayed? I want to manipulate the Content property of the ContentElement. What Driver/Manager do I need to implement to be able to alter the Content property of a Widget or a part on the widget?
CrestApps
@CrestApps
I appreciate any help with this request as I have been trying to figure it out for a while.
captmomo
@captmomo
Is it possible to package my modules a nuget package then use it in other Orchard Core ore projects?
CrestApps
@CrestApps
@captmomo I think you should be able to right click the project and select “pack” that would create the nuget file. Publish it. Then you should be able to install it into your web project should do the trick. I don’t think OrchardCore offers any special way to do this
vkoman
@vkoman
Hi All.
I faced an issue with displaying the default Setup page on an already set up environment.
I have configured my site using a Setup page, provided all required fields (recipe, DB connection, credentials).
After some steps - the Setup page is displaying by default for me, but if I navigate by URL https://localhost/Admin - it navigated me to the admin area which is expected.
So, my problem is - why Setup page is showing on already set up site?
2 replies
captmomo
@captmomo

@captmomo I think you should be able to right click the project and select “pack” that would create the nuget file. Publish it. Then you should be able to install it into your web project should do the trick. I don’t think OrchardCore offers any special way to do this

thanks! i just tested it and it works.

For themes, how do I include the images and stuff?
Paulo Sérgio Rodrigues Henriques
@PauloSRH
Hello guys, I am currently thinking of implementing a profile for orchard users, to include their company, birthday date and other personal details. In the orchardCore documentation I did not found any references for user profile, so I thought of 2 solutions. One was to create a content Type profile, and have the userId in them, and the other one was to save it all in the database. Does there exists something implemented in Orchard for this purpose ? Thank you !
Jean-Philippe Tissot
@jptissot
In one of our apps, I had a ContentItem for profile that I linked via the Owner of a ContentItem (attach CommonPart to your ContentType to see this field). This type was securable and the proper permissions were applied so the Item was only usable by it's Owner.
Paulo Sérgio Rodrigues Henriques
@PauloSRH
Thank you. I will check it out
Jean-Philippe Tissot
@jptissot
Does anyone know if there is a way to reference the current ContentItem from a ShortCode / Liquid filter ? without explicitely passing it down ?
Dean Marcussen
@deanmarcussen
Hmm interesting @jptissot I am refactoring shortcodes to use Seb's parser, and I asked myself the same question. Should we provide a context object. I haven't decided if we should yet, so tell me about the use case?
22 replies
captmomo
@captmomo

How does the theme references work? e.g.

 <link type="image/x-icon" rel="shortcut icon" href="~/TheAdmin/favicon.ico" />

I am trying to make a template which is based on TheAdmin theme, if I would like to override these paths, how do I go about doing so? what is the folder structure?
I understand to override views, I will just need to create an item with the same.

Jean-Philippe Tissot
@jptissot
What do you mean override these paths ? Use ones inside your new theme ?
captmomo
@captmomo
Yes
Jean-Philippe Tissot
@jptissot
~/ refers to the root path of your tenant / site
Then comes the ThemeName or ModuleName as defined in the Manifest.cs file
All these resolve to the root of your wwwroot folder in your theme / module
captmomo
@captmomo
so for my example, I should pu tthem in the wwwroot/img/favicon.ico
Ok thanks!
Jean-Philippe Tissot
@jptissot
So href="~/CustomAdmin/img/favicon.ico"
captmomo
@captmomo

All these resolve to the root of your wwwroot folder in your theme / module

ok thanks!

And if i wish to package the theme as a nuget package, I need to include these folders in my nupkg?
Jean-Philippe Tissot
@jptissot
I think it's automatic if your target the Module / Theme targets assemblies.
<PackageReference Include="OrchardCore.Theme.Targets" Version="$(OrchardCoreVersion)" />
I never had to do something special to embed them when using OC
CrestApps
@CrestApps

It seems that the service IContentItemDisplayManager is used to render the widgets. But how can I intercept the part or the widget just before it is being displayed? I want to manipulate the Content property of the ContentElement. What Driver/Manager do I need to implement to be able to alter the Content property of a Widget or a part on the widget?

Any body can offer any help with this?

2 replies
captmomo
@captmomo

I think it's automatic if your target the Module / Theme targets assemblies.

great!

Thanks again
ahmedtabba
@ahmedtabba
Can I Know the number of visitors of specific artical or page with orchardcore
?
akim-green
@akim-green
Has anyone experienced this error? ZoneShapes' does not contain a definition for 'HarvestAndSortTabs
Dean Marcussen
@deanmarcussen
@akim-green you probably just need to do a clean and rebuild. I imagine you are working with the source code and just pulled dev?
akim-green
@akim-green
@deanmarcussen Yes that was the issue thank you.

I am able to run my recipe in my local CMS build however when I push the repo to Azure for use as an App service, I get an error when running the deployment. On the front end it just says An error occurred while executing this request. But when I inspect the Azure Log stream I am seeing

`2020-07-02 16:26:45.685 +00:00 [Information] OrchardCore.Recipes.Services.RecipeExecutor: Executing recipe step 'content'.
2020-07-02 16:26:45.685 +00:00 [Information] OrchardCore.Recipes.Services.RecipeExecutor: Finished executing recipe step 'content'.
</head><body><div id="content"><div class="content-container"><h3>HTTP Error 500.0 - Internal Server Error</h3><h4>The page cannot be displayed because an internal server error has occurred.</h4></div><div class="content-container"><fieldset><h4>Most likely causes:</h4><ul> <li>IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.</li> <li>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.</li> <li>IIS was not able to process configuration for the Web site or application.</li> <li>The authenticated user does not have permission to use this DLL.</li> <li>The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.</li> </ul></fieldset></div><div class="content-container"><fieldset><h4>Things you can try:</h4><ul> <li>Ensure that the NTFS permissions for the web.config file are correct and allow access to the Web server's machine account.</li> <li>Check the event logs to see if any additional information was logged.</li> <li>Verify the permissions for the DLL.</li> <li>Install the .NET Extensibility feature if the request is mapped to a managed handler.</li> <li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </li> </ul></fieldset></div>

<div class="content-container"><fieldset><h4>Detailed Error Information:</h4><div id="details-left"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Module</th><td>   AspNetCoreModuleV2</td></tr><tr><th>Notification</th><td>   ExecuteRequestHandler</td></tr><tr class="alt"><th>Handler</th><td>   aspNetCore</td></tr><tr><th>Error Code</th><td>   0x00000000</td></tr>
</table></div><div id="details-right"><table border="0" cellpadding="0" cellspacing="0"><tr class="alt"><th>Requested URL</th><td>   https://TrimdContentManagement:80/Admin/OrchardCore.Deployment/Import/Import</td></tr><tr><th>Physical Path</th><td>   D:\home\site\wwwroot\Admin\OrchardCore.Deployment\Import\Import</td></tr><tr class="alt"><th>Logon Method</th><td>   Anonymous</td></tr><tr><th>Logon User</th><td>   Anonymous</td></tr>
</table><div class="clear"></div></div></fieldset></div>

<div class="content-container"><fieldset><h4>More Information:</h4>This error means that there was a problem while processing the request. The request was received by the Web server, but during processing a fatal error occurred, causing the 500 error.<p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&IIS70Error=500,0,0x00000000,14393">View more information »</a></p><p>Microsoft Knowledge Base Articles:</p>
</fieldset></div></div></body></html>
2020-07-02 16:26:46.009 +00:00 [Information] Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Authorization was successful.
2020-07-02 16:26:46.009 +00:00 [Information] Microsoft.AspNetCore.Authorization.DefaultAuthorizationService: Authorization was successful.`

Any thougts?

Dean Marcussen
@deanmarcussen
did you deploy as Run from package by mistake? Can you create any site content before running the recipe.
akim-green
@akim-green
Yes I can create an item, the previous issue was preventing me but once i resolved that, I could publish items:
image.png
Tried to "import package" under deployments using the same recipe I used in my local build
akim-green
@akim-green
should I delete my schema, redeploy and try it again.. I noticed that I had to manually delete the App_Data folder as it is not updated from the repo. Not sure if there are any other files that could be affecting it from an older build, that is not being tracked and loaded in from the repo
akim-green
@akim-green
going to debug remotely and see what I can glean
I also have this issue where I enter the correct login credentials and it just refreshes the login page. Noticed it a few times now
akim-green
@akim-green
This may have been my problem:
image.png
akim-green
@akim-green
I had to run the build locally to see that error though; unable to see detailed error messages like that when it was running as an app service
CrestApps
@CrestApps
@deanmarcussen Can you please help me out? I am trying to figure out how what actually displays widgets? I want to hook into the part that displays the widget so I can change its content on the fly.
11 replies
CrestApps
@CrestApps
I am trying to understand the request lifecycle. when a request comes to the app, how is it handled and where is it routed?