-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Matrix in Hyper #184
Comments
This is correct and unavoidable behaviour for now in Craft 5. This is because non-inline-blocks mode requires the parent owner to be a saved element. Hyper does not use elements for its content to increase performance, particularly for nested content. I'm looking into alternatives, but right now it would require some PRs to Craft just to suit Hyper, which they may or may not be open to as it's niche and goes against the "everything is an element" approach. |
I might have encountered another Matrix issue within Hyper. I can't seem to replicate it elsewhere. It's the same scenario as the original issue, even within the same project. We are using the same Matrix field in Hyper, and we went for inline-editable blocks as you suggested, but we're seeing Axios errors. However, on local development, the functionality still seems to work. On our staging/production environment, though, it doesn't trigger and just times out. If we start fresh, no errors appear, but the functionality still doesn't work. It continues to work locally, but once you go deeper, Axios errors start showing up. We have different types of navigations: Hyper-only, Hyper within Matrix, and Matrix within Hyper. The issues are only happening with the Matrix within Hyper setup. Local example 1: https://share.cleanshot.com/d1pDN6t8fhxvRVb5CxJT Staging example 1: https://share.cleanshot.com/HRzY5K1gW9BTJsGjxCBy Any idea what's going on? Craft CMS version: 5.4.4 |
Thanks for those videos. Can you check out the Network requests associated with those (in the Network tab of dev tools) and look at the Preview of those failed requests (the ones in red)? It's showing lots of 400 errors, but keen to know what the returned data is for those requests. It's also tricky to see exactly what requests are failing as the request name is cutoff. |
Ah of course, my bad!
|
Thanks for the videos, that's very helpful! So it seems it's due to our handling of Hyper in a Matrix field for Craft 5. Because of the Matrix/Entry changes and the different layouts, it's change Matrix's behaviour quite considerably. In this instance, it always expects the owner of a Matrix field to have an element, but as Hyper doesn't use elements for performance, we've had to skirt around things. It's the reason why we're limited to Having said that, I'd say this is due to the Hyper > Matrix > Hyper scenario you've got going on here. I'm investigating what's involved here, but it's a tricky situation with how Matrix fields work. It relies on have a saved owner element to even render. |
Describe the bug
A Matrix field in Hyper only works when the Matrix field's view mode is set to
As inline-editable blocks
. When the view mode is set to eitherAs cards
orAs an element index
it will throw invalid owner errors.Steps to reproduce
As cards
orAs en element index
Craft CMS version
5.3.4
Plugin version
2.0.4
Multi-site?
Yes
Additional context
No response
The text was updated successfully, but these errors were encountered: