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

Issue #136 : Page preview problem fixes #146

Conversation

sudipto68
Copy link

@sudipto68 sudipto68 commented Oct 13, 2022

Fixes: #136

Page preview problem fixed.

@stpaultim
Copy link
Member

stpaultim commented Oct 14, 2022

@sudipto68 - We don't usuallly simply comment out lines. If we want to remove these, we'll need to actually remove them before this get's merged.

However, this might be good enough to get some eyes on the PR to make sure the change makes senses and/or to get someone else to test it.

@laryn - Does this look like a reasonable approach?

@sudipto68 - See the coding standards notes below. We will also need to fix those.

@sudipto68
Copy link
Author

@stpaultim Thanks for your information. I have removed the commented code and the coding standards problem was on that commented code, so It will also be removed.

@laryn
Copy link
Member

laryn commented Oct 14, 2022

@stpaultim @sudipto68 I think this code that is being removed was intended to help with the front end admin functionality -- rendering an insertion point if there are no paragraphs added in a paragraphs field. That said I'm not sure if we've tested that this is doing what it is supposed to on the front end (and I didn't see an issue about that in the queue, at least at a glance). If it's possible to have that functionality and to skip this bit of code if we're in preview mode, I think we'd have the best of both?

With this change, have you tested both nested paragraphs as well as front end modal administration?

@herbdool
Copy link
Contributor

I've tested commenting out that section. Still has problems though. I've got a node with a wrapper paragraph type that contains three "card" paragraph types. When I preview the node it only shows the first nested card paragraph. And then going back to edit and it still only shows the first card. Refreshing brings back the rest.

@nattywebdev
Copy link

I have just come across this issue, for a customer that wants to preview pages with paragraphs. Has there been any update since the comments above?

@herbdool
Copy link
Contributor

@laryn that section doesn't seem to be doing much. It's getting $entity_ids but then does nothing with them. And if it needs to return an empty array (with return $element), then maybe it should be moved inside of if (!empty($instance['settings']['modal_admin'])) {. Though even there is it working properly? I assume that someone could still edit the node even if the modal_admin setting is enabled. So it's got to know if it is actually in the modal or if it's in the regular editing form. Currently it is not doing that.

@herbdool
Copy link
Contributor

Regarding the issue I have with some paragraphs not displaying is because of paragraphs embedded in paragraphs, I now suspect that it's not because of the modal_admin work. Might be something with the way Backdrop does node preview vs Drupal 7.

@laryn
Copy link
Member

laryn commented Aug 30, 2024

Thanks @sudipto68 -- and sorry I couldn't give more explicit time and attention here. I'm closing this one in favor of #190 which was just merged.

@laryn laryn closed this Aug 30, 2024
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

Successfully merging this pull request may close these issues.

Page Preview Not Working
5 participants