Open
Description
node -v
v22.13.1
from package.json
"dependencies": {
"@strapi/plugin-cloud": "5.12.1",
"@strapi/plugin-users-permissions": "5.12.1",
"@strapi/strapi": "5.12.1",
"better-sqlite3": "11.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"strapi-plugin-preview-button": "^3.0.0",
"styled-components": "^6.0.0"
},
I have create a content type "article"
{
"kind": "collectionType",
"collectionName": "articles",
"info": {
"singularName": "article",
"pluralName": "articles",
"displayName": "article"
},
"options": {
"draftAndPublish": true
},
"attributes": {
"slug": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
have installed plugin with
npm install strapi-plugin-preview-button@latest
and the configuration file is
// config/plugin.js
module.exports = () => ({
'preview-button': {
config: {
enable: true,
contentTypes: [
{
uid: 'api::article.article',
draft: {
url: 'http://localhost:3000/api/preview',
query: {
type: 'page',
slug: '{slug}',
},
},
published: {
url: 'http://localhost:3000/{slug}',
},
},
],
},
},
});
when go to create a new content for api::article.article Strapi log me out !!!
when edit an existing content, preview button does not appear
where is the problem ?
why strapi log me out when plugin is enabled ?
Metadata
Metadata
Assignees
Labels
No labels