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

The method PositionWrapper.AddAsync not implemented. #14896

Closed
MikeAlhayek opened this issue Dec 14, 2023 · 5 comments
Closed

The method PositionWrapper.AddAsync not implemented. #14896

MikeAlhayek opened this issue Dec 14, 2023 · 5 comments
Labels
Milestone

Comments

@MikeAlhayek
Copy link
Member

I am seeing this in my log file

115365:2023-12-14 14:35:45.3067|us|00-52e8d3559962e864e6b802b71da88ff3-e95ca432b6052d61-00||Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware|ERROR|An exception was thrown attempting to execute the error handler. System.NotImplementedException: The method or operation is not implemented.
115366-   at OrchardCore.DisplayManagement.PositionWrapper.AddAsync(Object item, String position)
115367-   at OrchardCore.DisplayManagement.Theming.ThemeLayout.ExecuteAsync()

The methosd AddAsync is indeed not implemented.

throw new System.NotImplementedException();

I do not see a note why it should not be implemented. The AddAsync method seems to be called by the ThemeLayout.ExecuteAsync

await ThemeLayout.Zones["Content"].AddAsync(body);

I think it should be implemented.

@MikeAlhayek
Copy link
Member Author

Maybe same implementation as the one we have here

public class ShapeViewModel : IShape, IPositioned

@sebastienros sebastienros added this to the 1.x milestone Dec 14, 2023
@sebastienros
Copy link
Member

I am wondering why a Zone ("Content") is wrapped in a PositionWrapper in the first place. PositionWrapper is done for shapes that don't have a Position property, like "strings". This is why it's not implemented. We need to understand when it get wrapped.

@ns8482e
Copy link
Contributor

ns8482e commented Feb 10, 2024

@MikeAlhayek PositionWrapper is used to wrap pre-rendered items like IHtmlContent and string and shape should not be used with PositionWrapper.

AddAsync not implemented is intentional and PositionWrapper should not contain any items.

@MikeAlhayek
Copy link
Member Author

Yeah. Too bad how can't recall how to reproduce the issue. Something was calling that method.

@sebastienros
Copy link
Member

Please re-open when you can repro.

@MikeAlhayek MikeAlhayek modified the milestones: 2.x, 2.0 Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants