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

TypeError: Cannot read properties of undefined (reading 'replace') #139

Open
leonleles opened this issue Aug 9, 2024 · 1 comment
Open

Comments

@leonleles
Copy link

I am experiencing this error in production. The plugin works fine on localhost. What could be happening?

image
image

 "preview-button": {
      config: {
        contentTypes: [
          {
            uid: 'api::country.country',
            draft: {
              url: process.env.URL_PAGE,
              query: {
                _preview: "true",
              },
            },
            published: {
              url: process.env.URL_PAGE,
            },
          },
          {
            uid: 'api::city.city',
            draft: {
              url: process.env.URL_PAGE,
              query: {
                _preview: "true",
              },
            },
            published: {
              url: process.env.URL_PAGE,
            },
          },
        ],
      },
    },
@leonleles
Copy link
Author

I found that the plugin settings in the plugins.ts file are not injecting the env('URL_PAGE'). Do you have any idea how to fix it?

@strapi/strapi": "4.24.2

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