Problem
#3552862: Annotations for child components within slots are lost still happens from time-to-time, depending on timing issues. While #3559533: Make Nuxt preview rendering more reliable helps and makes it less likely to happen, it's still happening randomly.
Proposed resolution
For reliably fixing this see this canvas issue #3554239: Slots that have no markup in the in intial HTML document payload are not represented in the Overlay UI. MR-270 fixes it reliably.
I'm opening this issue for everyone who stumbles over it to find the fix easily.
Note: After applying the fix, you need to rebuild the canvas/ui. Run `npm run build` in the ui directory or check canvas docs for further details.
Issue fork canvas_extjs-3559579
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
fagoThis one got merged and is fixed with Canvas 1.0.0-rc5 (or later).
Comment #4
fagowell, but it's not yet fixed since there is some compatibility issue with rc5:
> PHP Fatal error: Declaration of Drupal\canvas_extjs\Plugin\Canvas\ComponentSource\ExternalJavaScriptComponent::rewriteExampleUrl(string $url): string must be compatible with Drupal\canvas\ComponentSource\UrlRewriteInterface::rewriteExampleUrl(string $url): Drupal\Core\GeneratedUrl in /var/www/html/web/modules/contrib/canvas_extjs/src/Plugin/Canvas/ComponentSource/ExternalJavaScriptComponent.php on line 682
Comment #6
fagoThere was also some breaking test due to the recent changes in custom_elements module. Fixed both, see MR.
Comment #8
fagoAll addressed. Merged -> Fixed by the update to canvas 1.0.0-rc5.