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

No buttons in admin panel #137

Open
BorisKamp opened this issue Jun 24, 2024 · 1 comment
Open

No buttons in admin panel #137

BorisKamp opened this issue Jun 24, 2024 · 1 comment

Comments

@BorisKamp
Copy link

Hi!

This is my package.json:

{
  "dependencies": {
......
    "strapi-plugin-populate-deep": "^3.0.1",
    "strapi-plugin-preview-button": "^2.2.2",
    "styled-components": "^5.3.11"
  },
.......
    "node": "18.x.x",
    "npm": "10.x.x"
  },
  "license": "MIT"
}

And here is my config/plugins.ts file:

export default ({ env }) => ({
  upload: {
    config: {
      provider: 'aws-s3',
      providerOptions: {
        accessKeyId: env('AWS_ACCESS_KEY_ID'),
        secretAccessKey: env('AWS_ACCESS_SECRET'),
        region: env('AWS_REGION'),
        params: {
          Bucket: env('AWS_BUCKET'),
        },
      },
      actionOptions: {
        upload: {},
        uploadStream: {},
        delete: {},
      },
    },
  },
  email: {
    config: {
      provider: 'sendgrid',
      providerOptions: {
        apiKey: env('SENDGRID_API_KEY'),
      },
    },
  },
  'preview-button': {
    config: {
      contentTypes: [
        {
          uid: 'api::page.page',
          draft: {
            url: `${env('FRONTEND_URL')}/{slug}`,
            query: {
              preview: true,
            },
          },
          published: {
            url: `${env('FRONTEND_URL')}/{slug}`,
          },
        },
        {
          uid: 'api::news-item.news-item',
          draft: {
            url: `${env('FRONTEND_URL')}/news/{slug}`,
            query: {
              preview: true,
            },
          },
          published: {
            url: `${env('FRONTEND_URL')}/news/{slug}`,
          },
        },
      ],
    },
  }
});

And I specified FRONTEND_URL=http://localhost:3000 in my .env file.

However, nothing in my admin panel:
Screenshot 2024-06-24 at 21 41 20

What am I doing wrong @mattmilburn ?

@BorisKamp
Copy link
Author

BorisKamp commented Jun 24, 2024

When I fetch the collection type entry in the admin panel I see this in my console:
Screenshot 2024-06-24 at 21 45 00
So something is working tho...

And I rebuild Strapi several times, even manually deleted the dist and .strapi folder and rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant