close
The Wayback Machine - https://web.archive.org/web/20201125080256/https://github.com/apostrophecms/apostrophe/issues/1365
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

No warning for piece types adding a field called "type" #1365

Open
abea opened this issue May 10, 2018 · 1 comment
Open

No warning for piece types adding a field called "type" #1365

abea opened this issue May 10, 2018 · 1 comment

Comments

@abea
Copy link
Member

@abea abea commented May 10, 2018

Right now there's no warning for creating a piece type with new added field with name: 'type'. This is used by Apostrophe already and any data users attempt to store there will be overridden.

I attempted to solve this by adding it to the forbiddenFields array in doc-type-manager, but that was too far-reaching. There might need to be solution closer tied to apostrophe-pieces.

@abea abea added the bug label May 10, 2018
@abea abea self-assigned this May 10, 2018
@boutell boutell unassigned abea Oct 2, 2018
@boutell
Copy link
Member

@boutell boutell commented Mar 22, 2019

Hint: this could be checked for in apostrophe-pieces and apostrophe-widgets in afterConstruct, where self.schema should already be fully baked. It should not be checked for in the universal case in apostrophe-schemas because for pages, a type field is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.