New page No Reaction when Click 'All Properties'

KK
KK
Vote:
 

Hi guys,

I just created a new Page for trying the EPiServer.Labs.GridView. The code is simple. In Edit mode, I can create a new page based on this type and see the preview of it, but when I click the All properties tab. It does not show up and just reload the current view page. Looks like All Properties page does not work.

[ContentType(DisplayName = "Applications Page",
       GUID = "CBC68A57-212F-4CD0-9376-400548A0F669",
       Description = "Applications Storage",
       GroupName = "Applications")]
    public class ApplicationsPage : PageData
    {
        [Required]
        [Display(Name = "Heading Title", GroupName = "Content", Order = 100)]
        public virtual string? HeadingTitle { get; set; }

        [Required]
        [UIHint(UIHint.Textarea)]
        [Display(Name = "Teaser", GroupName = "Content", Order = 200)]
        public virtual string? Teaser { get; set; }

        [Display(Name = "Related Applications", Order = 300)]
        [AllowedTypes(typeof(ApplicationsPage))]
        [UIHint(GridViewEditing.UIHint)] 
        [PropertyGridConfiguration]
        public virtual ContentArea? RelatedApplications { get; set; }
    }

 Can anyone help? Thanks. The view was also simple.

@using EPiServer.Web.Mvc.Html
@model repos.models.pages.ApplicationsPage
@{
    Layout = "/Views/Shared/_Layout.cshtml";
}

<div>
    <div>@Html.PropertyFor(x => x.HeadingTitle)</div>
    <div>@Html.PropertyFor(x => x.Teaser)</div>
    <div>@Html.PropertyFor(x => x.RelatedApplications)</div>
</div>
#284960
Aug 05, 2022 2:26
Praful Jangid - Aug 05, 2022 16:10
Anything specific in console or in Optimizely logs? If yes, please share here, that may helpful.
Grzegorz Wiecheć - Aug 08, 2022 8:46
What version of CMS and GridView are you using?
KK
Vote:
 

Hi Praful,
The console error was a script error as below:
Error: scriptError
    at _f (dojo.js:15:436)
    at HTMLScriptElement.

I see it is related to 

 [UIHint(GridViewEditing.UIHint)] 

Have not found the root cause. The gridview package installation looks fine.

And more importantly, I am using NLog and have pointed all logs to a specific folder. I see no erros in the log files.

Can I ask how can I check out Optimizely logs and what should I setup for it?

Thanks so much in advance.

#285071
Aug 06, 2022 3:30
Vote:
 

The logs related configuration are in EPiServerLog.config on root location. See the below configuration for path related information.

 <!-- Consider moving the log files to a location outside the web application -->
<file value="App_Data\EPiServerErrors.log" />

For your js scriptError, can you try this

https://world.optimizely.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2016/3/upgrade-7-to-7-5-dojo-scripterror-in-edit-mode/

See if you get a better error message.

#285150
Edited, Aug 08, 2022 3:25
KK - Aug 08, 2022 3:37
Thanks so much, Praful.
I could not find the EPiServerLog.config in my root directory. Do I need to install or do a speciic setup for Episerver log? I am pretty sure I have not done anything in regards to EPiServer logs.
And in terms of the Pojo debug, should this line 'clientResources debug=true' is to be added in appsettings ?
Is it correct if I put it this way?
"EPiServer": {
"clientResources": {
"debug": true
}
Sorry, I am very new to EPiServer. This is my first project with it. Has been going by trial and error.
Vote:
 
#285160
Aug 08, 2022 10:34
KK
Vote:
 

There is one line missing in the doc.
Add services.AddGridView() in Startup.cs

#285891
Aug 21, 2022 15:05
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.