Skip to content

fix error blocking creation of new special classes #2035

Closed
@KodeDave

Description

@KodeDave

New Issue Checklist

Issue Description

SpecialClasses from /lib/Constants.js already have the '_' prefix, so adding it will send a double underscore to the Parse server (e.g.: '__Installation' instead of '_installation'), which resolves in an Invalid classname error, based on the SchemaController's function 'validateNewClass'

Steps to reproduce

On the sidebar, Browser section, click on "Create a class" button, select a special class (_Installation, _Product etc.), then click on 'Create class' or 'Create class & add columns'

Actual Outcome

Nothing happens on dashboard, and on the console an error appear from the parse server announcing an invalid classname

Expected Outcome

parse server creates the new class and the dashboard updates with this class

Environment

Node.js 16.13.2
parse 3.4.1

Dashboard

  • Parse Dashboard version: 4.0.0
  • Browser (Safari, Chrome, Firefox, Edge, etc.): Chrome
  • Browser version: 98.0.4758.80 (Official build) (arm64)

Server

  • Parse Server version: 4.10.4
  • Operating system: Ubuntu 20.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): VPS with Plesk

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: 4.4.12
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MongoDB Atlas

Logs

Uncaught (in promise) Error: Invalid classname: __Installation, classnames can only have alphanumeric characters and _, and must start with an alpha character

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions