pluginpal / strapi-plugin-sitemap Goto Github PK
View Code? Open in Web Editor NEWπ Generate a highly customizable sitemap XML in Strapi CMS
Home Page: https://www.pluginpal.io/plugin/sitemap
License: MIT License
π Generate a highly customizable sitemap XML in Strapi CMS
Home Page: https://www.pluginpal.io/plugin/sitemap
License: MIT License
Hello π
I'm wondering whether it would be possible to make the write/read directories configurable rather than hard-coded?
We are building for a AWS Lambda deployment and can only write the to /tmp directory.
With serverless becoming more and more common, maybe others would benefit from this as well?
Hi, I'd like to leave you a question, is the development branch compatible with the Strapi v3.6.X?
I'm asking it because as I installed it, there were some dependencies that my project didn't have such as the @strapi/helper-plugin, and after installing these dependencies and building the project again, it didn't open, so, is this branch only available for versions >v4?
Can you and a new option to URL bundles
to exclude last modification date for collections.
We have a pages on website that receive part of data from Strapi CMS and another part from our own API. In our case last modification date in Strapi CMS is incorrect because our API updates data more frequently and we want to exclude last modification date from sitemap for this pages.
The problem is when I try to reach my sitemap through this URL http://localhost:1337/sitemap/index.xml, I got nothing rendered in the browser, and when I check the chrome dev tool network I got this error
Request URL: http://localhost:1337/sitemap/xsl/sitemap.xsl
Request Method: GET
Status Code: 404 Not Found
Remote Address: 127.0.0.1:1337
Referrer Policy: no-referrer
>=16.16.0 <=18.x.x
>=6.0.0
4.4.1
2.0.8
Maybe this is related to the issue when I installed the plugin I had to create a sitemap
manually inside the public
folder, otherwise, I get an error
2022-10-24 13:25:54.947] error: [strapi-plugin-sitemap]: Something went wrong while trying to write the sitemap XML file to your public folder. Error: ENOENT: no such file or directory, open 'public/sitemap/index.xml'
Error
I'm using this plugin at a sitemap in my site, but I get a bug:
I set all collection types in the settings:
As can be seen, both Tags and Categories are collection types with a valid UID field(slug), but, navigation to the site map, we get this:
<url>
<loc>https://localhost/pages/education</loc>
<lastmod>2020-10-20T12:08:32.430Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/work-experience</loc>
<lastmod>2020-10-31T13:42:22.293Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/about-me</loc>
<lastmod>2020-10-20T12:42:11.136Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/projects</loc>
<lastmod>2020-10-18T22:47:14.513Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/posts</loc>
<lastmod>2020-10-18T22:47:14.658Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/read-the-documentation-fool</loc>
<lastmod>2020-11-01T14:22:39.533Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/grid-and-flex-layout-making-responsiveness-handling-easier</loc>
<lastmod>2020-11-01T14:31:31.554Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/pages/home</loc>
<lastmod>2020-11-01T13:16:42.930Z</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://localhost/</loc>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
No trace of tags or categories, even though there are at least five records in each.
I tested this both in local and production but i am getting the same result. I thought it could be because of the draft system, but both tags and categories do not use this feature.
What could be the problem then?
PD: there is also another collection type which not use a uid field but i would like to add to the sitemap, is there any way to do that?
Thanks
Right now it is not possible to create a sitemap entry with query params. The input field simply permits typing in a questionmark. e.g.:
Is there any reason for this? Or any workaround?
Thank you!
A clear and concise description of what the bug is.
Sitemap is generated
If remove filter by published_at
in core services - works fine. So suggested solution is to check for Exclude drafts
config set to false
and then not filter by published_at
Edit: I have figured out most of it. I was overlooking that we add the data TYPE to allowed fields, instead of the field names. So now I have the fields available in the settings UI.
The only issue that I am seeing now is there is a many -to-one relation field that (this content type is the "one" part of the relation). The value is not showing in the sitemap, even though everything appears fine in the UI.
Edit 2: After digging through the source code, it appears that relation fields aren't supported. Closing this issue.
I am trying to use this plugin to generate a sitemap and am having an issue when trying to add some fields in the allowedFields
section of config.
In config/plugins.js
, I have added the following:
module.exports = {
sitemap: {
enabled: true,
config: {
autoGenerate: true,
allowedFields: ['id', 'title']
}
}
}
Then when I attempt to add a new url bundle using the sitemap settings, I get the following error:
The only field that seems to work is "id". I don't know what I am missing here.
Any guidance would be appreciated.
Node version 16.13.0
Strapi plugin sitemap: 2.0.6
Strapi: 4.0.7
NPM : 8.1.3
OS: Windows 11
DB: sqlite
@boazpoolman awesome job, really great plugin. I'm running into a problem with hosting it in a container though. Most of the plugins for strapi get added to either /api
or /extensions
, but this one doesn't. I suspect that it is saving everything under the local node_modules folder? This then becomes an issue when packaged since the routes added to save configs don't get packaged, so you can't update once in the container.
Looking for thoughts on how to get around this. Once I figure that out, I'll be happy to help you add it to the package permanently.
I found that there is some links missed and double generate links in sitemap. Links are generated by URL Bundles
In config/plugins.js
module.exports = ({ env }) => ({
'sitemap': {
enabled: true,
config: {
autoGenerate: true,
allowedFields: ['id', 'uid', 'slug'],
excludedTypes: [],
},
},
publisher: {
enabled: true,
},
});
No duplicated loc items and all item in URL Bundles should be generated
I am trying to add the 'text' field type to allowedFields, by adding 'text' to the allowed fields array in config/plugins.js. however the UI in Strapi does not update to make 'text' fields available in the dropdown.
module.exports = ({ env }) => ({ sitemap: { enabled: true, config: { autoGenerate: true, allowedFields: ['id', 'uid', 'text'], excludedTypes: [], } } })
After adding 'text' to the allowedFields array in the config/plugins.js file I would expect this field to be available in the UID Field dropdown in Strapi.
module.exports = ({ env }) => ({ sitemap: { enabled: true, config: { autoGenerate: true, allowedFields: ['id', 'uid', 'text'], excludedTypes: [], } } })
As of #75 you can add relation fields to the URL pattern like so:
/test/[relation.field]/[id]
Though this only works for single relations. If the relation
would be of target *ToMany
we wouldn't know which entity to query exactly.
We should allow the pattern to be written like this to select a specific item of an array of relations.
/test/[relation[1].field]/[id]
Here we would select the second entity on the relations array.
Hey! I'm very interested in this, would it be possible to make the video available? Thanks!
Generate the sitemap XML in batches.
So that you Strapi app wonβt timeout when you are tryinh to build a sitemap with a lot URLs.
Register some kind of queue of batches where each batch would add e.g. 10.000 URLs to the sitemap. This queue will then run in the background.
can't see any notification of sitemap is generating when pressing the button there is no info that how much time it will take or its generating the sitemap
It should show that sitemap is generating
If I don't have the i18n plugin installed, the sitemap plugin throws the following error when I access the plugin page in the admin panel:
error: Model plugin::i18n.locale not found
No error is thrown, missing i18n plugin is ignored.
Even better would be, if the plugin just hid all the i18n-related settings. Just a nice to have.
(Shouldn't matter)
Can't find/see the plugin settings in the admin panel after installation of the plugin, rebuilding en restarting. The plugin seems to be added and present in the plugins overview.
npm install strapi-plugin-sitemap --save
Find the settings section of this plugin in the Settings page of Strapi
Please add support for the sitemapindex
.
We generally split our sitemaps using a global sitemap index, which loads the site's sub-sitemaps.
This makes it easier to request a re-indexing from search engines, and allows to combine the sitemap of a global site from different sub-site.
For instance, instead of the existing custom URLs, a separate front-end could generate its own routes-based sitemap, and in Strapi we could request the inclusion of this specific sitemap.
N/A
When we use a pattern like /[uri]
which can contain /
, the resolved url does not contain the hostname
/[uri]
http://localhost:3000/
(or http://localhost:3000
)/foo/bar
as uri
The url should contain the hostname
Adding any string in the pattern before the brackets like /foo/[slug]
or /foo/bar/[id]
works
The Go to the Sitemap navigate to http://localhost:4000/sitemap/index.xml instead of the live domain
The page should be navigated to https://admin.cgafrica.com/sitemap/index.xml
If applicable, add screenshots to help explain your problem.
If applicable, add code samples to help explain your problem.
Add any other context about the problem here.
Serve a compressed sitemap.xml.gz
file.
When you have large sitemaps the file size increases. It's best to compress this according to the documentation of https://github.com/ekalinin/sitemap.js
hi, I want to add a trailing slash at the end of my routes.
how can I do that? thanks.
Currently the plugin assumes that all Strapi pages are at the root of the site. URLs like https://my-site.com/articles/my-strapi-article-1
are not supported because the UID field used in the sitemap doesn't allow slashes. Custom entries have the same problem. I had a go at a solution here that adds an area
property to the settings for both custom and collection entries. Let me know what you think.
I am currently unable to generate the sitemap if my collection name has a space (We have done this for it to be human readable on the CMS itsself, annoyingly strapi does not allow for seperate display and data names..)
This is an example of a collection model that does not work:
{ "kind": "collectionType", "connection": "default", "collectionName": "help_article", "info": { "name": "Help Article" }, "options": { "increments": true, "timestamps": true }, "attributes": { "Url slug": { "type": "string" }, "Article title": { "type": "string" }, "Image": { "model": "file", "via": "related", "plugin": "upload" }, "Sub title": { "type": "string" }, "Blurb": { "type": "string" }, "Content": { "type": "richtext" }, "Page title (head tag)": { "type": "string" }, "Page description (head tag)": { "type": "string" } } }
We believe it blows up on this line
Thanks for any help on this!
After generating sitemap, plugin admin page breaks and shows white page.
When I build strapi, it is built as production thus I could not resolve where the error originated from.
Plugin admin page(/admin/plugins/sitemap) shows that current xml is loaded.
Important note : after downgrading this plugin to 2.0.8, things work properly.
probably these changes are inducing the error. (2.0.8 vs 2.0.9)
With the release of Strapi 3.6.0 we are now able to translate our pages.
Multiple languages means multiple URLs.
We should implement this throughout the sitemap based on Google's guidelines: Multilingual sitemaps
Hi there,
After I set up the sitemap plugin, I cannot deploy the code to the Google Cloud Platform App Engine.
This is the error I'm having.
> strapi start
[2021-12-21 01:52:20.738] debug: \u26d4\ufe0f Server wasn't able to start properly.
[2021-12-21 01:52:20.742] error: Could not load js config file /app/node_modules/strapi-plugin-sitemap/strapi-server.js: Unexpected token '.'
Error: Could not load js config file /app/node_modules/strapi-plugin-sitemap/strapi-server.js: Unexpected token '.'
at loadJsFile (/app/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:18:11)
at loadFile (/app/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:35:14)
at Object.loadPlugins (/app/node_modules/@strapi/strapi/lib/core/loaders/plugins/index.js:109:26)
at async Strapi.loadPlugins (/app/node_modules/@strapi/strapi/lib/Strapi.js:279:5)
at async Promise.all (index 1)
at async Strapi.register (/app/node_modules/@strapi/strapi/lib/Strapi.js:311:5)
at async Strapi.load (/app/node_modules/@strapi/strapi/lib/Strapi.js:409:5)
at async Strapi.start (/app/node_modules/@strapi/strapi/lib/Strapi.js:161:9)
Any Idea?
Strapi supports Draft & Publish and will be good if this plugin can exclude all Draft entries from sitemap
Have a strapi-sitemap
CLI with a generate
command so you can generate the sitemap XML from the CLI.
This is useful when using a loadbalancer with multiple Strapi instances.
Generating sitemap in each instance separately can cause problems (performance and race-conditions).
So when having a CLI you can disable auto generation and have a special worker dedicated to generating the sitemap.
This plugin has been written to use UID type fields as URLs to build the sitemap xml.
Potentially we could use a non UID field as (part of the) URL, to use the ID field for example.
This is kind of an interest check. If this is something you would like to see, let me know in this issue.
If this is highly requested I will update the plugin.
Hello,
First time I'm using the plugin and I'm struggling with it.
I have a 404 when I try to go to the plugin settings
I'm using an old version of strapi : "strapi": "3.0.0-beta.20",
Not sure it's supported ?
Also not sure how to generate the site map once you added settings. I used postman and the routes to populate my settings (not sure it's correct, and the hostname is not populating).
Thanks in advance,
Marie
A clearer explanation of the Allowed fields in the Readme to explain that it is the type of the fields and not the field names
At first I thought that this field was an array of the fields names instead of being their types, so I filled with the names that I wanted for the sitemap to be generated with.
When it didn't work, I searched through the source code to understand why it doesn't work and found it that this array was instead a list of types to be included.
Make it clearer that it is a list of types. I know that it is said that way in the Readme, but it is not very clear what it is.
Maybe include an example of an array that is not only ["id", "uid"], but also something like ["id", "string"].
Sorry if this feels a bit much, but I was almost being discouraged of using this plugin as I thought that there was a bug inside.
Hey, I use version 2.0.8
of this package and I wonder if there is a way to add a single collection type under URL bundles? For example, right know I can't add something like "about", which is a single page/single collection type, with the URL /about
.
The only solution seems to add it under "custom URLs" or am I missing something?
To generate a sitemap when the server boots
We run Strapi in Google Cloud Run, these scale to zero so now sometimes when we retrieve the sitemap it does not exist, creating one on boot would solve this.
When the server boots to also create an sitemap.
First of all, this plugin is amazing. Thank you for working on this!
The current behavior is kind of random - the content type sometimes appears in a locale as default and other times with another. That affects how the pages are ranked.
The content using the default locale should always be used as the default URL.
Notice that the default URL for the https://croct.com/blog/pt-br/post/perfil-progressivo
appears as pt-br
while for https://croct.com/blog/post/ultimate-guide-ab-testing-analysis
is en-us
(the correct is en-us, as it's the default locale).
When you generate a large sitemap it can take some time. We should show some kind of progress indicator to show you the progress of building the sitemap XML.
Because otherwise the developer is waiting for a long time and doesn't know what's going on.
Some kind of progress indicator that shows you a percentage of how far the sitemap build is.
With the strapi version v.4.5.5 , after updating core strapi packages. Trying to build the strapi project dosn't work.
{
"dependencies": {
"@notum-cz/strapi-plugin-content-versioning": "^0.4.7",
"@palmabit/strapi-app-version": "^1.1.0",
"@strapi/plugin-graphql": "^4.5.5",
"@strapi/plugin-i18n": "^4.5.5",
"@strapi/plugin-seo": "^1.7.7",
"@strapi/plugin-users-permissions": "^4.5.5",
"@strapi/strapi": "^4.5.5",
"better-sqlite3": "^8.0.1",
"strapi-plugin-comments": "^2.2.1",
"strapi-plugin-duplicate-button": "^1.0.4",
"strapi-plugin-preview-button": "^1.0.1",
"strapi-plugin-publisher": "^1.1.4",
"strapi-plugin-sitemap": "^2.0.8",
"strapi-plugin-slugify": "^2.3.2"
}
}
npm run build
Plugin should be working fine after updating
ModuleNotFoundError: Module not found: Error: Can't resolve '@fortawesome/react-fontawesome' in '/home/woozi/work/admire/2022/karthikaspices/website/backend-karthika/node_modules/strapi-plugin-sitemap/admin/src/components/PluginIcon'
Somehow, when trying to get into the Sitemap view we are getting this problem:
[2022-08-07 23:30:00.122] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:31:00.132] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:32:00.149] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:95) Warning: [deprecated] In future versions, Strapi will stop reading directly from the environment variable API_TOKEN_SALT. Please set apiToken.salt in config/admin.js instead.
For security reasons, keep storing the secret in an environment variable and use env() to read it in config/admin.js (ex: `apiToken: { salt: env('API_TOKEN_SALT') }`). See https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/environment.html#configuration-using-environment-variables.
(Use `node --trace-warnings ...` to show where the warning was created)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
[2022-08-07 23:33:00.198] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:34:00.188] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:35:00.187] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:36:00.152] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:37:00.161] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:38:00.151] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:38:10.917] info: File created: /srv/app/docker-compose.yaml
Starting the compilation for TypeScript files in /srv/app
The server is restarting
[2022-08-07 23:39:23.680] info: -------- MIGRATION STARTED --------
[2022-08-07 23:39:23.702] warn: No migration directory found.
[2022-08-07 23:39:23.703] info: -------- MIGRATION FINISHED --------
[2022-08-07 23:39:23.741] info: [website builder] manual trigger enabled
Project information
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Time β Sun Aug 07 2022 23:39:24 GMT+0000 (Coordinated β¦ β
β Launched in β 27742 ms β
β Environment β development β
β Process PID β 95 β
β Version β 4.3.2 (node v14.20.0) β
β Edition β Community β
ββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββ
Actions available
Welcome back!
To manage your project π, go to the administration panel at:
http://localhost:1337/admin
To access the server β‘οΈ, go to:
http://localhost:1337
[2022-08-07 23:40:00.154] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:41:00.162] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:42:00.163] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:43:00.145] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:44:00.157] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:45:00.184] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:46:00.220] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:47:00.184] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:48:00.174] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:49:00.134] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
[2022-08-07 23:50:00.162] error: [strapi-plugin-sitemap]: Something went wrong while trying to build the SitemapStream. TypeError [ERR_INVALID_URL]: Invalid URL:
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error
at Object.createSitemap (/srv/app/node_modules/strapi-plugin-sitemap/server/services/core.js:248:11)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
This altogether
We should not get any error in both the docker logs and the website.
Add any other context about the problem here.
Each time i am changing the area/path for a collection type it's going to be changed for every other collection also which means i can not set individual areas/paths.
Tried already reinstalling the plugin but it seems like the "config file" isn't removed that way.
Can you add an ability to specify a few patterns for the same collection?
For example I have collection products
and I want to have a few patterns for it. For example:
/products/[id]
/products/[id]/another-slug-1
/products/[id]/another-slug-2
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
There are 2 options for that:
Hello,
Thanks for you great work on this beautiful plugin.
For now plugin don't very support cloud-based deployments, and it's will be nice to have it, main problems:
When you have the autoGenerate
setting enabled and you update a piece of content, all the pages that should be included in the sitemap are queried and afterwards added to the sitemap. If you have a larger sitemap is could be a big performance issue.
It is probably best to only update the URL of the page you have just created, edited or deleted. So only that page will be queried. We can do this by implementing some kind of caching layer.
Solution 1:
Create a urls.json
file in which you store al the URLs of the sitemap.
You could surgically add, edit or remove URLs from this file and afterwards regenerate the sitemap.xml based on that JSON file.
Solution 2:
Instead of having an extra JSON file that holds the URLs, we could (maby) also just read the URLs from the sitemap.xml file itself and use those to then again regenerate the sitemap.
Allow querying relational fields in the URL pattern like /prefix/[relation.slug_field]
.
For better dynamic URL patterns.
Deploying a strapi-plugin-sitemap project to Google App Engine does not work.
Did anyone got this plugin to work on a GAE?
From my understanding the GAE filesystem is read only. For writing files Google Cloud Storage is recommended. Therefore the plugin can not create nor write to files in the /public/sitemap folder.
plugin shall work on GAE
Provide a setting to change the path of the generated sitemap.
In case of GAE it might be enough to change the path to /tmp/sitemap or to a Google Cloud Link.
Let us know if this is related to any issue/pull request.
Hello, thank you for an amazing plugin. I have a question - is there any way to get JSON output without XML?
Because the frontend side has a different domain name and few frontend-specific routes, such as /terms
, privacy
, sign in
, etc
JSON output with pagination support for split-sitemaps
Same issue as in #62
Strapi version: 4.1.2
Plugin version: 2.0.6
Configuration:
sitemap: {
enabled: true,
allowedFields: [
'id',
'uid',
'text'
],
},
However, it only suggests the id
field, and when trying to use something else, an error message pops up, saying "Pattern contains forbidden fields":
I am trying to combine this plugin with that one: https://github.com/ComfortablyCoding/strapi-plugin-slugify
On adding a URL bundle for a pre-existing collection that existed before plugin installation, links are not generated. Links are only generated for new entries made after installation. Duplicating pre-existing content does not generate a link either.
URL's created for the content collection.
Some of the other collections weren't generating either.
For one, I could get them generated by editing and saving content.
For another, I had to duplicate the content and delete the old one.
Neither of these worked for the ones created before adding the plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.