apostrophecms / apostrophecms/apostrophe
self.manager.edit is not a function
- Dominant language
- JavaScript
- Stars
- 4.6k
- Forks
- 650
- Avg merge
- 19h 21m
- Merged PRs (30d)
- 23
Description
## To Reproduce
Step by step instructions to reproduce the behavior:
1. Have a custom piece ([current case](https://github.com/jansensan/arts-et-medias/blob/master/lib/modules/aem-persons/index.js))
2. Have another custom piece that uses that piece ([current case](https://github.com/jansensan/arts-et-medias/blob/master/lib/modules/aem-articles/index.js#L58))
3. When editing the consuming piece in the modal, click on the "Edit" button

4. An error is thrown in the console: `self.manager.edit is not a function`.

## Expected behavior
- No error should be thrown
- If it does occur, the red toaster should probably appear in the notification area
## Describe the bug
> A clear and concise description of what the bug is.
## Details
**Version of Node.js:**
v12.19.1
**Version of ApostropheCMS:**
v2.113.3
**Server Operating System:**
macOS Catalina and also prod server (Linux, details TBC)
Contributor guide
Research direction
Start by reproducing the modal editing flow with the custom pieces in lib/modules/aem-persons/index.js and lib/modules/aem-articles/index.js, especially the usage at line 58. Trace why the consuming piece reaches self.manager.edit and verify the behavior against the reported Node.js and ApostropheCMS versions. Done means clicking Edit throws no error and the expected notification behavior is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100