-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
Editor "Preview" button not working as expected with Modular content pages #254
Comments
Uhm strange! I don't have this problem. Which theme are you using? |
It didn't occur to me it might be theme related. I am using Materialize with a fair bit of inherited theme elements. |
Maybe put your user/ folder on Dropbox and post me a link on Gitter so I can try myself |
I'm the author of the Materialize theme, and don't have that problem on my test set-up. I did have some trouble, since fixed, with my theme's CSS intruding on the Admin. Now I can't remember how I fixed it! I'll keep looking; maybe there's a clue there. |
Thanks Flavio and Bob, here is a link to the user folder if that helps: https://www.dropbox.com/s/8u2pbz8ixu2h8q2/user.zip?dl=0 |
I installed and recreated, find the cause in this line: https://github.com/getgrav/grav/blob/develop/system/src/Grav/Common/Page/Page.php#L1634 Commenting that, it works. Not sure why that is needed. @rhukster have an explanation at why is that needed? Anyway this behavior is not happening on my other installs, I thought it could be related to the inherited theme and the fact it does not provide a default.html.twig (but adding it makes no difference, so I'm not sure). |
@flaviocopes can you let me know what that line is again? It doesn't match up anymore. Cheers. |
Sorry @rhukster missed your reply! |
PR getgrav/grav#460 fixes the issue without modifying the behavior on the frontend. Probably not the best way to handle it? |
I'm a bit confused. Does this only happen for Materialize theme? Can this be replicated in Antimatter? If not then I think this fix could cause more problems than it fixes. That process is there for a legitimate reason (even if i can remember exactly what that reason is!) |
Tested, it's not the theme, even with antimatter with the default modular pages (text for example), all works fine. If adding another one (with any name), it outputs this strange layout. |
For example I tried duplicating |
Ok was a bit tricky to track down, but found it! |
Great to hear, thanks! |
If the "Preview" button is clicked when editing a modular content page the UI of the editor itself seems to be presented along with the content preview.
Snapshots attached:
The text was updated successfully, but these errors were encountered: