Giter Club home page Giter Club logo

Comments (10)

ComfortablyCoding avatar ComfortablyCoding commented on July 18, 2024 3

Can you please provide the following information:

  • strapi version
  • plugin version
  • plugin configuration

If possible a reproducible example.

from strapi-plugin-slugify.

ComfortablyCoding avatar ComfortablyCoding commented on July 18, 2024 2

@vmptk and @chan-fullstack

This looks to be a bug on strapis end.

The only way I was able to reproduce this was to not have the plugin listed in the plugins.js file. It looks like if the plugin is not listed in that file the register file for the plugin still triggers while the bootstrap one does not. That is the cause of this issue and not something I should need to fix on my end.

At minimum to fix this issue one of the following configurations in the plugins.js file is required

slugify:{
  enabled: false
}

or

slugify:{
  enabled: true
}

I was not able to reproduce the issue with either of the above configurations.

TLDR: it looks to be a bug on strapis side. The plugin should be listed in plugins.js (which it should be) with a minimum configuration.

from strapi-plugin-slugify.

chan-fullstack avatar chan-fullstack commented on July 18, 2024

I'm also facing the same issue.

Strapi Version: v4.1.0
Plugin Version: 2.1.1
Plugin configuration: N/A As I've just installed the plugin and run the server.

Thanks!

from strapi-plugin-slugify.

mikeyfe6 avatar mikeyfe6 commented on July 18, 2024

Hi! Same problem over here..

Strapi Version: v4.1.2
Plugin Version: ^v2.1.1
Plugin Configuration:

(..config/plugins.js)

   slugify: {
    enabled: true,
    config: {
      contentTypes: {
        instantie: {
          field: "slug",
          references: "profiel",
        },
      },
    },
  },

Thanks in advance!

from strapi-plugin-slugify.

ComfortablyCoding avatar ComfortablyCoding commented on July 18, 2024

Thank you for the information. I will investigate the issue.

I did test it on my side before release and had no issues. Very strange.

from strapi-plugin-slugify.

SoftCreatR avatar SoftCreatR commented on July 18, 2024

I can't reproduce this issue in the exact same constellation.

from strapi-plugin-slugify.

ComfortablyCoding avatar ComfortablyCoding commented on July 18, 2024

Hi! Same problem over here..

Strapi Version: v4.1.2 Plugin Version: ^v2.1.1 Plugin Configuration:

(..config/plugins.js)

   slugify: {
    enabled: true,
    config: {
      contentTypes: {
        instantie: {
          field: "slug",
          references: "profiel",
        },
      },
    },
  },

Thanks in advance!

@mikeyfe6 do you have a reproducible example? This as this case looks to be different than the original issue, when I tried this configuration the server started with no issue.

from strapi-plugin-slugify.

maneroto avatar maneroto commented on July 18, 2024

Hello, I had the same problem and I found how to avoid the issue at least.
In the ./config/plugins.js file you need to make sure to list all the slugify configuration just before the graphql one, therefore, you need to have the graphql plugin config.

module.exports = ({ env }) => ({
    slugify: {
        enabled: true,
        config: {
            contentTypes: {
                modelName: {
                    field: 'slug',
                    references: 'title',
                },
            },
        },
    },
    graphql: {
        enabled: true,
        config: {
            defaultLimit: 10,
            maxLimit: 20,
            shadowCRUD: true,
            apolloServer: {
                tracing: true,
            },
        }
    },
})

P.S: If you switch the plugins config, you might reproduce the error.

from strapi-plugin-slugify.

vmptk avatar vmptk commented on July 18, 2024

@ComfortablyCoding with the inverted order in the plugin config it is working... definitely it is a bug in the Strapi plugin system. @maneroto thanks for the hint!!!

Updated repo: https://github.com/vmptk/strapi-slug

from strapi-plugin-slugify.

ComfortablyCoding avatar ComfortablyCoding commented on July 18, 2024

At the moment it does not look like plugin order can be enforced.

I will add a note about ensuring graphql is placed before the plugin config as well as a minimal config is required.

Thanks @maneroto for finding this requirement.

from strapi-plugin-slugify.

Related Issues (20)

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.