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

[BUG] Underscores in Contenttypes cause issues with relations #6051

Closed
maximilianredt opened this issue Nov 15, 2016 · 0 comments
Closed

[BUG] Underscores in Contenttypes cause issues with relations #6051

maximilianredt opened this issue Nov 15, 2016 · 0 comments
Assignees

Comments

@maximilianredt
Copy link

If a Contenttype uses an underscore (e.g. pages_en) this will cause issues with relations, because in Bolt\Legacy\Storage::getRelation() instead of the tablename the slug is being used. For contenttypes with an underscore this by default gets replaced by a dash.

Bolt Version: 3.2.2

Possible solution:
Change
$contenttype = $content[util::array_first_key($content)]->contenttype['slug']
to
$contenttype = $content[util::array_first_key($content)]->contenttype['tablename']

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

No branches or pull requests

2 participants