Giter Club home page Giter Club logo

geta-optimizely-sitemaps's People

Contributors

adnanzameer avatar ajuris avatar bbsdddougla avatar brianweet avatar ellinge avatar fatso83 avatar frederikvig avatar garkavy avatar imgbotapp avatar jeff-fischer-optimizely avatar jefffischer-episerver avatar joshuafolkerts avatar jry avatar ken-tzu avatar lanorkin avatar lukadevic avatar marijorg avatar marisks avatar mattisolsson avatar patkleef avatar ravimotha avatar sayeedchoudhury avatar svenrog avatar valdisiljuconoks avatar vicr123 avatar yungis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geta-optimizely-sitemaps's Issues

Clean up UI

image
Looks messy and can be a bit confusing (especially the relative path). Maybe move the options around and format input fields nicely.

Is there a way to include assets in the sitemap?

In some cases it would make sense to include assets (media) in the sitemap - for example pdf's and other documents. I can't seem to get them included no matter what setting I use. What's the best way to override this behavior?

AddTrailingSlash throwing exception

If an admin has filled out "path to avoid" in this way (with a trailing semicolon) in the config then the property PathsToAvoid in the SiteMapData object will contain an empty string
Skärmbild 2024-03-04 104517

When generating the sitemap this method will throw an exception since it's trying to check on a negative index of this string that is empty

        private static string AddTailingSlash(string url)
        {
            if (url[url.Length - 1] != '/')
            {
                url = url + "/";
            }

            return url;
        }

The config tool should avoid saving empty strings and the AddTrailingSlash method should be changed to this

        private static string AddTailingSlash(string url)
        {
            if (!string.IsNullOrWhiteSpace(url) && url[^1] != '/')
            {
                url += "/";
            }

            return url;
        }

DXP environment throwing Unable to find a module by assembly error after updating Version=3.0.0.0

2022-10-25T11:29:28 You are now connected to the log stream...
2022-10-25T11:29:03.121912865Z warn: EPiServer.Shell.Modules.ModuleFinder[0]

2022-10-25T11:29:03.121980965Z The modules finder couldn't find a directory at '~/EPiServer/episerver-telemetry-ui'

2022-10-25T11:29:03.121989866Z warn: EPiServer.Shell.Modules.ModuleFinder[0]

2022-10-25T11:29:03.121995366Z The modules finder couldn't find a directory at '/EPiServer/episerver-telemetry-ui'

2022-10-25T11:29:03.123857392Z warn: EPiServer.Shell.Modules.ModuleFinder[0]

2022-10-25T11:29:03.123883493Z The modules finder couldn't find a directory at '~/EPiServer/Geta.Optimizely.Sitemaps'

2022-10-25T11:29:03.124906407Z warn: EPiServer.Shell.Modules.ModuleFinder[0]

2022-10-25T11:29:03.125031509Z The modules finder couldn't find a directory at '/EPiServer/Geta.Optimizely.Sitemaps'

2022-10-25T11:29:29.707110646Z fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]

2022-10-25T11:29:29.707164547Z An unhandled exception has occurred while executing the request.

2022-10-25T11:29:29.707171447Z System.ArgumentException: Unable to find a module by assembly 'Geta.Optimizely.Sitemaps, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' (Parameter 'moduleAssembly')

2

Sitemaps file not taken from database

Sitemap file is generated each request instead of using file generated by scheduled job and stored in database.

How it looked for Epi 11

 if (sitemapData.Data == null || (SitemapSettings.Instance.EnableRealtimeSitemap))
            {
                if (!GetSitemapData(sitemapData))
                {
                    Log.Error("Xml sitemap data not found!");
                    return new HttpNotFoundResult();
                }
            }

            CompressionHandler.ChooseSuitableCompression(Request.Headers, Response);

            return new FileContentResult(sitemapData.Data, "text/xml; charset=utf-8");

How it looks in EPI 12:

var sitemapData = _sitemapRepository.GetSitemapData(Request.GetDisplayUrl());

           if (sitemapData == null)
           {
               return SitemapDataNotFound();
           }

           if (_configuration.EnableRealtimeSitemap)
           {
               return RealtimeSitemapData(sitemapData);
           }

           return SitemapData(sitemapData);

Errors in Sitemap tool, can it be reset?

The Sitemap plugin has stopped displaying in our integration site and the sitemap.xml path is returning a 404. Also, the icon is no longer visible in the cms. There is no role restriction for it.

It's enabled under plugins:
image

It's still working fine in our local and staging environments. It seems to be related to the database somehow.

Note, I can run the scheduled job to build the sitemap without errors.

Here's what we're seeing under the logs if we navigate to sitemap.xml

image

Two questions:

  1. How can I find the source of the 'System.ArgumentNullException: Value cannot be null. (Parameter 'uriString')'?
  2. Is there a way to reset the sitemap tool? i.e. wipe it from the database and start again?

Any other ideas?

Thanks in advance
Dan

Security Issue with Vulnerable JavaScript dependency(jquery version 3.2.1.slim.min) and bootstrap version 4.0.0

Path: /EPiServer/Geta.Optimizely.Sitemaps/container

Issue detail

We observed 2 vulnerable JavaScript libraries.

We detected jquery version 3.2.1.slim.min, which has the following vulnerabilities:

CVE-2019-11358: jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution
CVE-2020-11022: Regex in its jQuery.htmlPrefilter sometimes may introduce XSS
CVE-2020-11023: Regex in its jQuery.htmlPrefilter sometimes may introduce XSS

We also detected bootstrap version 4.0.0, which has the following vulnerabilities:

CVE-2019-8331: XSS in data-template, data-content and data-title properties of tooltip/popover
CVE-2018-14041: XSS in data-target property of scrollspy
CVE-2018-14040: XSS in collapse data-parent attribute
CVE-2018-14042: XSS in data-container property of tooltip
CVE-2016-10735: XSS is possible in the data-target attribute.

404 on generated sitemaps

By using the workaround mentioned in #27 im able to generate sitemaps:
image

However, this link gives a 404 when visited:
image

This also happens when creating sitemaps with a wildcard language.
Any fix for this?

Cannot find table 0

HI,

Got an error when trying to run the schedule job. Anyone know why this exception is thrown?

2022-11-10 08:25:46 - In total will process unique references: 165
Processing [740] failed, exception: System.IndexOutOfRangeException: Cannot find table 0.
at System.Data.DataTableCollection.get_Item(Int32 index)
at Geta.NotFoundHandler.Optimizely.Data.SqlContentUrlHistoryRepository.IsRegistered(ContentUrlHistory entity)
at Geta.NotFoundHandler.Optimizely.Core.AutomaticRedirects.ContentUrlIndexer.IndexContentUrls(ContentReference contentLink)
at Geta.NotFoundHandler.Optimizely.Core.AutomaticRedirects.IndexContentUrlsJob.Execute()

Unable to find a module by assembly Geta.Optimizely.Sitemaps

  • Setup Foundation site
  • Install Geta.Optimizely.Sitemaps 1.0.0-rc4 package
  • Build, start and go to edit

There is a following error,

An unhandled exception occurred while processing the request.

ArgumentException: Unable to find a module by assembly 'Geta.Optimizely.Sitemaps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' (Parameter 'moduleAssembly')

EPiServer.Shell.Paths.ToResource(Assembly moduleAssembly, string moduleRelativeResourcePath)

Exception when generating sitemap when the current website has only 1 host set up

Steps:

  1. a Optimizely CMS 12.1.0 project with 1 host set up as below:
    image
  2. Go To set up Seo Sitemaps, choose Standard site map, click Update/save
  3. Run the Scheduled job to generate sitemaps
  4. Error: Job successfully executed.
    Generated sitemaps:
    Error creating sitemap for "sitemap.xml" appear in History of the Scheduled job, with an exception in Backend: fail: Geta.Optimizely.Sitemaps.XML.SitemapXmlGenerator[0] Error on generating xml sitemap System.ArgumentNullException: Value cannot be null. (Parameter 'uriString') at System.Uri..ctor(String uriString) at Geta.Optimizely.Sitemaps.XML.SitemapXmlGenerator.Generate(SitemapData sitemapData, Boolean persistData, Int32& entryCount)
  5. Sitemap is not generated and it's not accessible

Workaround:
Have a website with multiple hosts, that way when we go to Seo Sitemaps admin, there's a dropdown to choose hosts, then click Update, the SiteUrl is not null anymore. After this, Generating sitemaps work as normal and things work fine.

I think this is a bug because when there is no dropdown to choose the Host, the SiteUrl is not passed into the Api call, and thus the exception occurs.

Scheduled Task can set priority values that can not be set by the user in the CMS

The options available to the user when setting priority values are 0, 0.25, 0.5, 0.75 and 1. However when these values aren't set manually it is possible for the scheduled job to set values that are impossible for the user to set. Is it possible to give users the option to have more granular select options (0.1 intervals rather than 0.25)?

Cloudflare blocks Geta Sitemaps

Hi,

I'm using Geta Sitemaps for an Episerver/Optimizely solution in NET5

Cloudflare seems to block us when we tried to see a part of the website using this plug in.

image

We noticed this issue on october 24, 2:45pm EST. Everything was well few hours before.
Is there something we can do?

Thank you

Caroline

Handle routing / razor pages configuration internally

We now require projects to configure razor pages. This should be something we handle inside the package.
Next to the fact that it is slightly annoying, an actual issue occurs when a project has custom configuration for razor pages.
The package should still work regardless of the project configuration.

Look into official packages to see how they do it; they have a controller and some additional module set up. (e.g. EPiServer.Cms.UI.Admin)

Latest Sitemaps and NotFoundHandler dont work together in .Net6

Related to #60 and Geta/geta-notfoundhandler#52

If we try to use Geta.Optimizely.Sitemaps 3.0.0 and Geta.NotFoundHandler 5.0.0 in Net6 - it won't build

To reproduce (assuming Net6 installed):

dotnet new web
dotnet add package EPiServer.CMS
dotnet add package Geta.Optimizely.Sitemaps
dotnet add package Geta.NotFoundHandler.Admin
dotnet add package Geta.NotFoundHandler.Optimizely
dotnet build

error during build:

error : Two assets found targeting the same path with incompatible asset kinds:  [C:\work\temp\geta6\geta6.csproj]
error : '<..>\packages\geta.optimizely.sitemaps\3.0.0\contentFiles\any\net6.0\wwwroot\css\dashboard.css' with kind 'All' [C:\work\temp\geta6\geta6.csproj]
error : '<..>\packages\geta.notfoundhandler.admin\5.0.0\contentFiles\any\net6.0\wwwroot\css\dashboard.css' with kind 'All' [C:\work\temp\geta6\geta6.csproj]
error : for path 'css/dashboard.css' [C:\work\temp\geta6\geta6.csproj]

Sitemap data is cached forever with no option to clear it

With the following values in the configuration:

services.AddSitemaps(x =>
{
      x.EnableLanguageDropDownInAdmin = true;
      x.EnableRealtimeCaching = true;
      x.EnableRealtimeSitemap = true;
});

sitemap data is being cached forever due to the fact that the CacheEvictionPolicy is set to null (if I'm not a googleBot):

https://github.com/Geta/geta-optimizely-sitemaps/blob/master/src/Geta.Optimizely.Sitemaps/Controllers/GetaSitemapController.cs#L109

var cachePolicy = isGoogleBot
            ? new CacheEvictionPolicy(TimeSpan.Zero,
                                      CacheTimeoutType.Sliding,
                                      new[] { _contentCacheKeyCreator.VersionKey })
            : null;
CacheManager.Insert(cacheKey, sitemapData.Data, cachePolicy);

I think it would be reasonable to cache it for some limited period - maybe 1 day or maybe 1 day by default with an option to overwrite this value in configuration?

Geta.Mapping

Geta.Optimizely.Sitemaps depends on Geta.Mapping but that nuget package does not exist, so i get this error when installing Geta.Optimizely.Sitemaps 1.0.0-rc:

Unable to find package Geta.Mapping. No packages exist with this id in source(s): episerver, episerver-beta, nuget.org

Pages with query string URLs not appearing in sitemap

Pages like this are not appearing in our sitemap:

https://www.allspringglobal.com/investments/mutual-funds/fund-profile/overview/?accountingId=WBAB&shareClass=A

It instead displays like this (without the query string)

<url>
<loc>https://www.allspringglobal.com/investments/mutual-funds/fund-profile/overview/</loc>
<lastmod>2023-01-11T16:43:16+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.6</priority>
</url>

Any ideas on how to get these kinds of pages included?

Sitemap.xml on load balanced environment is giving 404.

I have a new site on CMS 12; running on three webservers on-prem;

  • Edit server edit.mysite.com
  • Two Front web servers under load balancer www.mysite.com

I have configured the root page ID to the home page and have run the scheduled jobs; 330 entries.
I can access the sitemap via https://edit.mysite.com/sitemap.xml
I cannot access the sitemap via https://www.mysite.com/sitemap.xml - it is giving 404 (redirected to my 404 page)

Could there be a reason for the front web servers to not return the sitemap in the same manner as on the edit server?

How to format the Path to Include value

Hi!
I am trying to only generate a sitemap for a certain path but I cannot find any documentation that shows examples of how to format the value of the Path to include field.
For example, if I am trying to generate a sitemap for pages under https://www.jotun.com/ww-en/decorative/interior/ I would expect to enter decorative/interior/ in the Path to Include field, but this does not seem to be working!

Could you please provide an example of how the Path to Include value should be formatted for the example I have provided.

CreatingSitemapExample

Language routing does not seem to be working (404 error)

Hi,
It seems like the language routing to the sitemaps.xml file is not working at all.
I've loaded the nuget packages into my project and configured two sitemaps.

  • One without language.
    image

  • One with language.
    image

image

After having generated my sitemaps in the scheduled job
image

I see the following behaviour:

The routing for my configuration without without language https://localhost:5001/Sitemap.xml seems to be working fine (I've confirmed this by adding a breakpoint in your GetaSitemapController.Index() endpoint and verifying that my breakpoint is actually triggered) and by confirming that the sitemap.xml is served.

image

However, the routing for my configuration without language https://localhost:5001/sv/Sitemap.xml does not seem to be working at all. My breakpoint in the GetaSitemapController.Index() endpoint is not triggered at all which leads me to believe there is something wrong with the language routes for the endpoint.

I think might be related to this issue: #28

Exclusion path doesn’t seem to work - Version=3.0.3

I've tried all kinds of combos, but the exclusion path field seems to be ignored.

We have a multi-tenant instance of EPi.

We tried:
https:\domain.com\path
https:\domain.com\path*
https:\domain.com\path*

\path
\path*
\path
\path*

*\path
\path
*\path
*\path*

path
path*
path
path*

*path
path
*path
*path*

https:\domain.com\path%
https:\domain.com\path%

\path%
\path%

%\path
%\path%
%\path
%\path%

path%
path%

%path
%path%
%path
%path%

Unable to find a module by assembly Geta.Optimizely.Sitemaps, Version=3.0.2.0

After installation of the Geta.Optimizely.Sitemaps and Geta.Optimizely.Sitemaps.Commerce, I have the System.ArgumentException: Unable to find a module by assembly 'Geta.Optimizely.Sitemaps, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null' (Parameter 'moduleAssembly') error after deployment.

Note:

  1. It happens only after deployment. Works fine locally.
  2. Versions (both CMS and Commerce) are 3.0.2.
  3. Invocation code in the Startup file:
services.AddSitemaps(options =>
{
    options.EnableLanguageDropDownInAdmin = false;
    options.EnableRealtimeCaching = true;
    options.EnableRealtimeSitemap = false;
});

services.AddSitemapsCommerce();
  1. There's an invocation code for the MapRazorPages as well.
  2. Target framework is .NET 6.

Similar thread for 1.x RC version: #26


Stack:

2022-11-03T07:36:18.466390688Z fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]

2022-11-03T07:36:18.466468789Z       An unhandled exception has occurred while executing the request.

2022-11-03T07:36:18.466474789Z       System.ArgumentException: Unable to find a module by assembly 'Geta.Optimizely.Sitemaps, Version=3.0.2.0, Culture=neutral, PublicKeyToken=null' (Parameter 'moduleAssembly')

2022-11-03T07:36:18.466480389Z          at EPiServer.Shell.Paths.ToResource(Assembly moduleAssembly, String moduleRelativeResourcePath)

2022-11-03T07:36:18.466484889Z          at Geta.Optimizely.Sitemaps.MenuProvider.GetMenuItems()

2022-11-03T07:36:18.466489589Z          at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()

2022-11-03T07:36:18.466494389Z          at EPiServer.Shell.Navigation.MenuAssembler.GetMenuItems(String parentPath, Int32 relativeDepth)

2022-11-03T07:36:18.467672102Z          at EPiServer.Shell.Navigation.MenuAssembler.GetMenuHierarchy(String rootPath, Int32 relativeDepth, String selectionPath)

2022-11-03T07:36:18.467704003Z          at EPiServer.Shell.Web.Internal.NavigationService.GetCurrentProduct()

2022-11-03T07:36:18.467711503Z          at EPiServer.Shell.Web.Internal.NavigationService.GetCurrentProductId()

2022-11-03T07:36:18.467716803Z          at EPiServer.Shell.Navigation.MenuHelper.CreateMenuRootElement()

2022-11-03T07:36:18.467721603Z          at EPiServer.Shell.Navigation.MenuHelper.CreatePlatformNavigationMenu()

2022-11-03T07:36:18.467726803Z          at AspNetCoreGeneratedDocument.CmsUIViews_Views_Shared_Bootstrapper.b__7_2()

2022-11-03T07:36:18.467741703Z          at Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSectionAsyncCore(String sectionName, Boolean required)

2022-11-03T07:36:18.467747003Z          at Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(String name, Boolean required)

2022-11-03T07:36:18.467751503Z          at Microsoft.AspNetCore.Mvc.Razor.RazorPage.RenderSection(String name)

2022-11-03T07:36:18.467756003Z          at AspNetCoreGeneratedDocument.CmsUIViews_Views_Shared_Sleek.b__12_1()

2022-11-03T07:36:18.467761103Z          at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()

2022-11-03T07:36:18.467766303Z          at AspNetCoreGeneratedDocument.CmsUIViews_Views_Shared_Sleek.ExecuteAsync()

2022-11-03T07:36:18.467771103Z          at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)

2022-11-03T07:36:18.467788504Z          at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)

2022-11-03T07:36:18.467794104Z          at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderLayoutAsync(ViewContext context, ViewBufferTextWriter bodyWriter)

2022-11-03T07:36:18.467798804Z          at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)

2022-11-03T07:36:18.467803704Z          at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)

2022-11-03T07:36:18.467808904Z          at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)

2022-11-03T07:36:18.467829704Z          at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)

Extend Admin GUI tool with regards to implementation & User friendliness to exclude certain fields from the final sitemap.xml file

1- Out of the box/Custom implementation for getting the filtered dropdown list of sites:
Including the package in my multi site application ,the dropdown lists of sites shows both http & https sites. Can there be a custom implementation to overwrite GetSiteHosts and ShouldAddToSiteHosts methods that will filter out the list to include only https sites.
Another customization that I am looking for is to filter the dropdown list based on a site level property setting to exclude/include the site itself from appearing in the dropdown list.
I believe having a site level configured filtered list will eliminate the chances of editorial mistakes to generate unwanted or unsecured list of sitemap for a site.
2- Option to exclude Priority & Frequency from the generated XML similar to Debug Info.
Google's general guideless for sitemap slates that it ignores priority & frequency & only considers lastmod value(https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap#general-guidelines).So just like Debug info option ,can there be a setting to exclude priority/frequency from the xml file?

Shouldn't this plugin be placed under Admin->Tools?

Thank you for this and the other packages you've developed. There's one question that I don't quite understand. (I'm new to Optimizely, so I'm sorry if my question seems naive). Why don't you add this plugin under Admin -> Tools, like in the old version of this package (https://github.com/Geta/SEO.Sitemaps) for the old versions of Optimizely. Doesn't the navigation bar look crowded when there are too many plugins? It seems to me that this plugin should be placed under Admin - > Tools as in the previous version.

Sitemap stopped working in CMS 12 suddenly.

We configured CMS 12 sitemap xml as per the document here and it was working fine now it stopped rendering SEOSitemaps property correctly and wizard of SEO sitemaps also not working.

image
image

None of the button works in above wizard.

There is any specific order we need to follow in Startup -> Configure() method while calling AddSitemap() function? It's not logging any error in log file as well. If there is any order, please let us know so that it will help to resolve this issue.

Splitting sitemaps into multiple files

There is a constraint defined in sitemap specs - a single sitemap file should not contain more than 50,000 URLs and must be no larger than 50MB. The package seems to ignore this and always generate a single sitemap file.

This becomes a problem in sites with a lot of content / large catalogs. Should implement sitemap splitting in accordance with the spec:

https://www.sitemaps.org/protocol.html#index

All sitemap links get file: prefix

So all my page links are non-absolute and prefixed with "file:". For the alternate urls the correct urls are resolved, so shouldn't be a general issue with url resolving.

image

Sitemap data not found

Hello,

I am using 1.0.1 and no matter what I try I cannot get this to work.

In my job I see

Job successfully executed.
Generated sitemaps:
"http://localhost:8000/sitemap.xml": 12 entries

If I go to http://localhost:8000/sitemap.xml I get a 404

Geta.Optimizely.Sitemaps.Controllers.GetaSitemapController[0]
Xml sitemap data not found!

I have two languages, EN and FR (both /en/ and /fr/ added to the URL does nothing), using the latest OptimizelyCMS.

I have

services.AddSitemaps(x =>
{
    x.EnableLanguageDropDownInAdmin = false;
    x.EnableRealtimeCaching = true;
    x.EnableRealtimeSitemap = false;
});

And I have the MapRazorPages().

Everything seems to work but it just won't return the sitemap data.

Remove usage of Microsoft.AspNetCore.Mvc.ViewFeatures

Microsoft.AspNetCore.Mvc.ViewFeatures has dependecy to

Microsoft.AspNetCore.Routing 2.2.0
[CVE-2020-1161] CWE-20: Improper Input Validation

A denial of service vulnerability exists when ASP.NET Core improperly handles web requests, aka 'ASP.NET Core Denial of Service Vulnerability'.

Microsoft.AspNetCore.Http 2.2.0
[CVE-2020-1045] CWE-noinfo
A security feature bypass vulnerability exists in the way Microsoft ASP.NET Core parses encoded cookie names.
The ASP.NET Core cookie parser decodes entire cookie strings which could allow a malicious attacker to set a second cookie with the name being percent encoded.
The security update addresses the vulnerability by fixing the way the ASP.NET Core cookie parser handles encoded names.

404s on Edit, Delete and New sitemap action

Encountered on version 3.1.0. Additionally, the job fails with SiteUrl null exception:

[2023-08-23 08:02:23] Information: Error on generating xml sitemap
[2023-08-23 08:02:23] Information: System.ArgumentNullException: Value cannot be null. (Parameter 'uriString')
[2023-08-23 08:02:23] Information: at System.ArgumentNullException.Throw(String paramName)
[2023-08-23 08:02:23] Information: at System.Uri..ctor(String uriString)
[2023-08-23 08:02:23] Information: at Geta.Optimizely.Sitemaps.XML.SitemapXmlGenerator.Generate(SitemapData sitemapData, Boolean persistData, Int32& entryCount)
[2023-08-23 08:02:23] Information: fail: Geta.Optimizely.Sitemaps.Controllers.GetaSitemapController[0]
[2023-08-23 08:02:23] Information: Xml sitemap data not found!
[2023-08-23 08:02:24] Information: fail: Geta.Optimizely.Sitemaps.Controllers.GetaSitemapController[0]
[2023-08-23 08:02:24] Information: Xml sitemap data not found!

sitemaps-google-chrome-2023-08-23-10-51-24_Hk99oTjL.mp4

[Consider] Move PropertySEOSitemaps property in Core

When services registration and page definitions are in different projects, to get PropertySEOSitemaps property we need to install the whole Geta.Optimizely.Sitemaps NuGet package and then it generates modules\_protected\Geta.Optimizely.Sitemaps twice.

My consideration is to create Core project and move PropertySEOSitemaps inside.

Sitemap

Path to exclude doesn't work. Do you have any examples of what to use for paths to avoid? Is it a fully qualified URL? or a regex expression?

Changing Priority & Frequency settings on individual pages

Does changing priority &frequency properties on individual pages make any difference when sitemap.xml is generated .I have been trying to change them for a few of the pages & running the scheduler to generate the sitemap.xml but cant see any difference.The generated xml still holds the old value (priority/frequency)for the page.

404 or 500 when clicking on SEO Sitemap admin tool

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):

<iframe src="/Geta.Optimizely.Sitemaps" width="100%" height="500" style="border:none;" title="Sitemaps" onload="resizeIframe(this)"> </iframe>

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

[Change Request] Add the ability to create an Image XML Sitemap

We are using the Geta Sitemaps module on a number of clients. One has recently requested the addition of an image xml sitemap.

Based on: https://www.holisticseo.digital/technical-seo/image-sitemap/

An Image only sitemap may look like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
    <image:image>
        <image:loc>https://www.holisticseo.digital/image-1.jpg</image:loc>
        <image:caption>Everything you need to know about Images</image:caption>
        <image:geo_location>London, United Kingdom</image:geo_location>
        <image:title>Image Sitemap Example</image:title>
        <image:license>Creator:HolisticSEO.Digital, Credit Line: HolisticSEO, Copyright Notice: Free to Use</image:licence>
    </image:image>
</urlset>

An Images within a regular sitemap may look like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 
    xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
    <url>
        <loc>https://www.holisticseo.digital/image-sitemap</loc>
        <image:image>
            <image:loc>https://www.holisticseo.digital/image-1.jpg</image:loc>
        </image:image>
        <image:image>
            <image:loc>https://www.holisticseo.digital/image-2.jpg</image:loc>
        </image:image>
    </url>
</urlset> 

Do you have any plans to expand your functionality into including an Image Sitemap? are you open to collaborations if this is not on your roadmap?

Sitemap Job runs successfully but has zero entries

We are using the Geta.SEO.Sitemaps 3.1.1 in Episerver CMS 12.19. The following is the configuration -
image

When the scheduled job is run there are no errors shown, even when we are using debug = true, and the job runs successfully -
image

But as seen in the image above and confirmed from the created sitemap.xml there are zero entries on the xml file.
image
image

  • Job runs successfully.
  • Debugging the solution locally shows no errors.
  • The same discrepancy / behaviour was observed in other environments but after rerunning the job the xml was correctly created.
  • There have been no changes to the code and version of Geta.SEO.Sitemaps is still same 3.1.1.

Please help on this as we are unable to figure out why the xml is empty at times and populated at others when there are no changes in configuration and code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.