notum-cz / strapi-plugin-record-locking

This plugin provides the functionality to prevent data loss in cases where multiple users are simultaneously editing the same record within STRAPI v4.
20 stars 7 forks source link

Enabling Record Locking Blocks Access to Single Types #6

Closed RWransky closed 2 years ago

RWransky commented 2 years ago

Bug report

Required System information

Package dependencies and plugins:

"dependencies": {
    "@babel/core": "^7.18.0",
    "@notum-cz/strapi-plugin-record-locking": "^0.2.4",
    "@strapi/admin": "^4.2.0",
    "@strapi/database": "^4.2.0",
    "@strapi/helper-plugin": "^4.2.0",
    "@strapi/plugin-content-manager": "^4.2.0",
    "@strapi/plugin-content-type-builder": "^4.2.0",
    "@strapi/plugin-documentation": "^4.2.0",
    "@strapi/plugin-email": "^4.2.0",
    "@strapi/plugin-graphql": "^4.2.0",
    "@strapi/plugin-i18n": "4.2.0",
    "@strapi/plugin-sentry": "^4.2.0",
    "@strapi/plugin-seo": "^1.7.3",
    "@strapi/plugin-upload": "^4.2.0",
    "@strapi/plugin-users-permissions": "^4.2.0",
    "@strapi/provider-upload-aws-s3": "^4.2.0",
    "@strapi/provider-upload-local": "^4.2.0",
    "@strapi/strapi": "4.2.0",
    "@strapi/utils": "^4.2.0",
    "css-loader": "^6.7.1",
    "knex": "^0.21.21",
    "objection": "^2.2.18",
    "pg": "8.7.1",
    "strapi-plugin-email-designer": "^2.1.1",
    "strapi-plugin-import-export-entries": "^1.4.1",
    "strapi-plugin-notes": "^1.0.1",
    "strapi-plugin-publisher": "^1.1.3",
    "strapi-plugin-react-editorjs": "^2.0.1",
    "strapi-provider-upload-aws-s3": "4.2.0",
    "style-loader": "^3.3.1",
    "webpack": "^5.72.1"
  },

Describe the bug

Single Types do not load in the admin panel Content Manager. I have tested this with and without internationalization, with and without React Dev Tools active on the site, and running the server in develop and production modes.

Steps to reproduce the behavior

  1. Create a Single Type in the Content-Type Builder. Does not matter what fields are present even a simple short text box is fine.
  2. Save and go to the Content Manager.
  3. Click on the Single Type to make an entry.
  4. Experience white screen of death and cry.

Expected behavior

The Single Type edit page should load and allow entries added.

Screenshots

This screenshot shows the exact error shown in Chrome Dev Tools image

This screenshot shows the API requests for the single type comes back successful. image

Here are the permissions set for Single Types in our server: image

Additional context

Note that Strapi can successfully retrieve all relevant information via API requests to Single Types still. This appears to solely be a bug related to how the record locking plugin interacts with rendering the Strapi frontend.

Upgrading to Strapi v 4.2.0 nor returning to original v 4.1.11 resolved the issue.

I am confident that the record locking plugin is the culprit as removing the plugin immediately restores access to Single Types.

martincapek commented 2 years ago

Hi, sorry for late response. It is bug, since we are not supporting single types right now. I will disable it for single types in new version and open feature request for it.

aeadedoyin commented 2 years ago

Hi @martincapek Any update on this? I think it's critical given that the plugin is entirely unusable. Can we have the config say, disable for a single type or something of that nature

matepaiva commented 2 years ago

I can confirm that this bug makes the plugin unusable, as it breaks my single types.

matepaiva commented 2 years ago

Thanks!!!