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

Error when use EasySelect taghelper #6

Closed
washyn opened this issue Aug 25, 2021 · 3 comments
Closed

Error when use EasySelect taghelper #6

washyn opened this issue Aug 25, 2021 · 3 comments

Comments

@washyn
Copy link

washyn commented Aug 25, 2021

hi i liked this package, i decided to use it, but using it i got this error, install nuget package, module, and use tag, but i get this error, can you please help me to fix this

MissingMethodException: Method not found: 'System.Threading.Tasks.Task1<System.String> Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form.AbpSelectTagHelperService.GetFormInputGroupAsHtmlAsync(Microsoft.AspNetCore.Razor.TagHelpers.TagHelperContext, Microsoft.AspNetCore.Razor.TagHelpers.TagHelperOutput)'.
EasyAbp.Abp.TagHelperPlus.TagHelpers.TagHelperPlusAbpSelectTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output)
System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start(ref TStateMachine stateMachine)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start(ref TStateMachine stateMachine)
EasyAbp.Abp.TagHelperPlus.TagHelpers.TagHelperPlusAbpSelectTagHelperService.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.AbpTagHelper<TTagHelper, TService>.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.RunAsync(TagHelperExecutionContext executionContext)
AspNetCore.Pages_Index.b__31_10() in Index.cshtml

                        <abp-column size-md="_6">
                            <abp-card-title>@L["UserId"]</abp-card-title>
                        </abp-column>
                    </abp-row>
                </abp-card-header>
                <abp-card-body>
                    <abp-select asp-for="UserId"></abp-select>
                </abp-card-body>
                <abp-modal-footer>
                    <abp-button id="search-button" button-type="Primary" text="Search"/>
                </abp-modal-footer>
            </abp-card>
        </form>

Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
AspNetCore.Pages_Index.b__31_8()
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
AspNetCore.Pages_Index.b__31_3()
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.GetChildContentAsync(bool useCachedResult, HtmlEncoder encoder)
Microsoft.AspNetCore.Mvc.TagHelpers.RenderAtEndOfFormTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count)
AspNetCore.Pages_Index.ExecuteAsync() in Index.cshtml`

@gdlcf88
Copy link
Member

gdlcf88 commented Aug 25, 2021

How to reproduce? Is your app ABP version 4.3.0?

https://github.com/EasyAbp/Abp.TagHelperPlus/blob/master/Directory.Build.props#L4

@washyn
Copy link
Author

washyn commented Aug 26, 2021

I tried it in the example of BookStore, with version abp 4.4, I solved it by adding an additional parameter in the c # file of your package "TagHelperPlusAbpSelectTagHelperService.cs" line 40 "var innerHtml = await GetFormInputGroupAsHtmlAsync (context, output, null);"


 public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
        {
            
            var innerHtml = await GetFormInputGroupAsHtmlAsync(context, output, **null**);

            var order = TagHelper.AspFor.ModelExplorer.GetDisplayOrder();

            AddGroupToFormGroupContents(context, TagHelper.AspFor.Name, SurroundInnerHtmlAndGet(context, output, innerHtml), order, out var suppress);
...

@gdlcf88
Copy link
Member

gdlcf88 commented Aug 26, 2021

Please always ensure that the module‘s ABP version and the app's ABP version are the same.

@gdlcf88 gdlcf88 closed this as completed Aug 26, 2021
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