Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with how GridMapper resolves aliases generated from view #58

Closed
jaandrews opened this issue Oct 4, 2019 · 0 comments
Closed

Issue with how GridMapper resolves aliases generated from view #58

jaandrews opened this issue Oct 4, 2019 · 0 comments

Comments

@jaandrews
Copy link

The issue here stems from how the grid mapper extracts an alias from the view. The problem is that the view in the grid configuration often ends in ".html" which means the alias will always be "Umbraco.Grid.html" for controls with views like that. Take the following configuration for example.

{
    "name": "Blog Detail",
    "alias": "blogDetail",
    "view": "/App_Plugins/LeBlender/editors/leblendereditor/LeBlendereditor.html",
    "icon": "icon-defrag color-black",
    "render": "/App_Plugins/LeBlender/editors/leblendereditor/views/Base.cshtml",
    "config": {
        "frontView": "BlogDetail",
        "renderInGrid": "1",
        "editors": [
            {
                "name": "Body Text",
                "alias": "bodyText",
                "propretyType": {},
                "dataType": "ca90c950-0aff-4e72-b976-a30b1ac57dad",
                "description": "blog detail"
            }
        ]
    }
}

No need to worry about the leblender reference. I'm using a customized version of it that runs in umbraco 8.

The problem code can be found here. It grabs all the text after the last "." to generate the alias, which in this case leaves only "html." Removing the ".html" for strings that end with it should resolve this issue.

KevinJump added a commit that referenced this issue Oct 5, 2019
removes the .html from the view name so we get the actual file name.
@KevinJump KevinJump added this to the 8.2.4 - Patch Release milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants