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)

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?
Safemark-Jimmy
@Safemark-Jimmy
@Sen-Gupta yes
I actually can~
      _contentDefinitionManager.AlterTypeDefinition("product", type => type
            // content items of this type can have drafts
            .Draftable()
            // content items versions of this type have saved
            .Versionable()
            // this content type appears in the New menu section
            .Creatable()
            // permissions can be applied specifically to instances of this type
            .Securable()
            .WithPart("TitlePart")
            .WithPart("MarkdownBodyPart")
            .WithPart("BagPart")
            .WithPart("product")
        );
above code, I am able to create content type.
Safemark-Jimmy
@Safemark-Jimmy
But, I am now wondering, how could I assign text to tile and Markdownbody programmatically? does anyone know that?
David
@ChocoMachine
Is it possible to use the placements.json to override the default Taxonomy's template of "Content__Taxonomy" for a give taxonomy Item. ? The default template seems to output a treeview of terms in anchor tags. I was hoping to do more with this, but don't want to change the default layout for every taxonomy. ? any tips appresiated.
4 replies
ruisdias
@ruisdias
Hello,
I have an type which as a bagPart of another type.
Why I update the parent type in the bagpart it always create a new instance of itself?
Is there any way to not make this?
Dean Marcussen
@deanmarcussen
@ruisdias I believe I changed this behaviour a few months back (you mean you always get a new content item id on the bag item?)
ruisdias
@ruisdias
yes @deanmarcussen
I might be with a old version aswell
we are using 1.0.0-rc1-12449 when it was in nightly version