Geta / geta-optimizely-sitemaps

Search engine sitemaps.xml for Optimizely CMS 12 and Commerce 14
Apache License 2.0
10 stars 14 forks source link

404 or 500 when clicking on SEO Sitemap admin tool #57

Closed maer0216-star closed 1 year ago

maer0216-star commented 2 years ago

Hi

I have problem with loading the SEO Sitemap admin tool. Klicking on it gives me a 404 when checking the developer tool in the browser: Geta.Optimizely.Sitemaps https://localhost:44323/Geta.Optimizely.Sitemaps => 404

This is the source code that tries to load the resource(container):

In our opti. solution we are using /edit instead of /episerver. I wonder if that is causing the problem?

I have not set the

app.UseEndpoints(endpoints => { endpoints.MapRazorPages(); });

Since it gives me a 500 error instead:

InvalidOperationException: The model item passed into the ViewDataDictionary is of type 'Geta.Optimizely.Sitemaps.Pages.Geta.Optimizely.Sitemaps.IndexModel', but this ViewDataDictionary instance requires a model item of type 'CMS.Base.Helpers.LayoutViewModel'.

Regards Magnus

tomaszmadeyski commented 2 years ago

I have the same issue. It seems it was fixed by #51 but this version does not seem to be published as a nuget. Current version is 2.0.0 which was published 28th of April, before fix was merged.

Can you guys please publish latest version as Nuget?

@maer0216-star a temporary solution that worked for me was to clone the repo (which includes the fix) and reference it as a project in my solution (rather than a nuget).

Note, that in my project I have been using .MapContent() method on UseEndpoints configuration. In order for this plugin to work I had to add MapRazorPages() as well, so my config looks like this now:

app.UseEndpoints(endpoints =>
{
    endpoints.MapContent();
    endpoints.MapRazorPages();
});
maer0216-star commented 2 years ago

@tomaszmadeyski Thanks! I might take a look at your solution then

valdisiljuconoks commented 2 years ago

hi,

we are waiting on https://github.com/Geta/geta-optimizely-sitemaps/pull/58 - after then we release new version.

marisks commented 1 year ago

The release should be published.