Coder Social home page Coder Social logo

TypeError: Cannot read property 'reduce' of undefined when trying to edit a role in Users & Permissions Plugin about strapi-connector-firestore HOT 6 CLOSED

arrowheadapps avatar arrowheadapps commented on May 8, 2024
TypeError: Cannot read property 'reduce' of undefined when trying to edit a role in Users & Permissions Plugin

from strapi-connector-firestore.

Comments (6)

brettwillis avatar brettwillis commented on May 8, 2024

Thanks for the bug report. I may not get a chance to look at this in depth until next week. From a glance, it seems that the permissions field doesn't exist on the role object that is fetched from Firestore.

https://github.com/strapi/strapi/blob/6b6c1e2f7d5ae969f92b6f9a9b145944df53cda3/packages/strapi-plugin-users-permissions/services/UsersPermissions.js#L200

This could be either

  1. The permissions field isn't set in Firestore,
  2. Or the permissions field is being removed by this connector because of some bug

In the meantime before I get a chance to look at this, you could help me to narrow down by checking if #1 is the case. Could you look at the Firestore data in your Firebase Console, look at the "roles" collection, find the document "2xmxFW0T9DJK0Y6dCYmU" and see if there is any value for the permissions field?

from strapi-connector-firestore.

aminta avatar aminta commented on May 8, 2024

In Firestore I have a "users-permissions_role" collection with a "2xmxFW0T9DJK0Y6dCYmU" document.

from strapi-connector-firestore.

brettwillis avatar brettwillis commented on May 8, 2024

Ok and does that document have any value set for the permissions field?

from strapi-connector-firestore.

aminta avatar aminta commented on May 8, 2024

No, these are the fields:

description : "Default role given to authenticated user." name : "Authenticated" type: "authenticated"

from strapi-connector-firestore.

brettwillis avatar brettwillis commented on May 8, 2024

Ok, thanks for that info. I'll take a look at this as soon as I get the chance.

from strapi-connector-firestore.

brettwillis avatar brettwillis commented on May 8, 2024

Please try 3.0.0-alpha.23 and let me know if this has resolved it for you?

from strapi-connector-firestore.

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.