Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 798 forks source link

Tiled Gallery Block: validation issues with some blocks when using NextGEN Gallery plugin. #17444

Closed ACEkin closed 4 years ago

ACEkin commented 4 years ago

Jetpack and NextGEN Gallery conflict. Jetpack has its own problem as well.

This started as a NextGEN Gallery problem but grew to be associated with Jetpack, then an isolated Jetpack problem emerged as well. There are two support forum threads that may help:

https://wordpress.org/support/topic/jetpack-breaks-nextgen-gallery/ https://wordpress.org/support/topic/cannot-add-a-gallery-in-block-editor/

When Jetpack is active, NextGEN Gallery (3.3.17.1) breaks. It cannot insert a gallery block. The Imagely team looked into this on a staging site I have and by installing a beta version of their plugin, they managed to fix their end of the problem. I could add a NextGEN Gallery block.

As of now, they acknowledged the conflict and they are working on resolving the matter. But, at this point, the problem exists on all sites that have JP 9.0.2 and NGG 3.3.17.1 will experience this problem.

While trying to follow the fixes and beta versions, I have also discovered that I cannot access the tiled gallery blocks in the editor although they continue to display on the front end. If someone wishes to have admin access to my staging site where this problem is manifest, tell me how I can provide credentials in a secure manner.

The following video screen capture shows what is and is not visible in the editor screen and then the browser view of the post.

https://www.dropbox.com/s/4657up7koas1dav/tiled-gallery.mp4?dl=0

The video is a bit on the large side and you may read the highlighted text in the opening.

Cemal

ACEkin commented 4 years ago

I am not sure why, but the video screen capture may not show what is on the screen unless it is downloaded.

jeherve commented 4 years ago

Thanks for the report. I wonder if this may be another instance of #16514.

Could you check for Javascript errors on the editor page, as explained here: https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/

It should tell us more about exactly why those 2 blocks appear as broken.

Let us know what you find!

ACEkin commented 4 years ago

I followed the instructions and enabled script debugging, that did not solve the problem. I removed that line from the config.php.

In Firefox, when I edit a page with Tiled Gallery blocks, those blocks do not show but an error appears in their place: This block encountered an error and cannot be previewed.

I opened the console and below is what I see with exclamation marks before their headers:

May I add an editorial comment that Tiled Galleries feature has been moving in the wrong direction for a while, very concerning.

TypeError: c[t] is undefined value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 re https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 Vg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 ph https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:217 lh https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:126 O https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:121 ze https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118 mg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53 react-dom.min.js:103:487 TypeError: c[t] is undefined value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 re https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 Vg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 ph https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:217 lh https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:126 O https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:121 ze https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118 mg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53 react-dom.min.js:103:487 TypeError: c[t] is undefined value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 value https://www.cemalekin.com/test/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.0.2:18 re https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 Vg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:95 ph https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:217 lh https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:126 O https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:121 ze https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:118 mg https://www.cemalekin.com/test/wp-includes/js/dist/vendor/react-dom.min.js?ver=16.9.0:53

jeherve commented 4 years ago

Thank you.

It would seem we have two distinct problems here.


1- Some Tiled Gallery blocks are broken in existing posts on your site

Unfortunately the error isn't too helpful in this case. It does, however, seem to point towards something else than the block validation errors I had in mind earlier.

To be able to find out more, I would like to be able to reproduce that error on a test site of mine. Unfortunately I haven't been successful until now. I am able to add and edit tiled galleries, in Chrome and Firefox, whether the NextGEN plugin is active or not.

I wonder if this could be because I run a different set of plugins than you do.


2- You cannot add a new NextGEN block in any post when Jetpack is active

I have been able to reproduce this one, and it does indeed to error out only when the Jetpack plugin is active.

You mentioned:

The Imagely team looked into this on a staging site I have and by installing a beta version of their plugin, they managed to fix their end of the problem. I could add a NextGEN Gallery block.

Is this Beta version publicly available somewhere? I'd like to see if it solves the problem for me as well, and I'd be interested in what the bug was and how they managed to fix it. It may help us avoid any further conflicts in the future.

I tried installing the beta version available here, but that seems to be a beta for an older version of the plugin (3.0.16.2), so I assume that's not the version you received on your end.

I'll comment on the forum thread as well to see if we can coordinate on all this.


May I add an editorial comment that Tiled Galleries feature has been moving in the wrong direction for a while, very concerning.

Do not hesitate to create a new issue with any bugs you may have found, or concerns you may have, so we can discuss about this further!

ACEkin commented 4 years ago

@jeherve

I have disabled all plugins except JetPack and one required by the theme in use, Mai Engine. The tiled gallery continued to give the same error message. What makes this problem really strange is that I have another staging site, running on the same server, using the same theme and tiled gallery blocks function fine in the editor or the front end. I'll be glad to give you admin access to both if you tell me how I could do that privately.

Regarding the second problem, I noticed you reached ot to Imagely on the support thread. Thank you.

Cemal

jeherve commented 4 years ago

What makes this problem really strange is that I have another staging site, running on the same server, using the same theme and tiled gallery blocks function fine in the editor or the front end.

When you try to create a new post, do you immediately get the block error for all tiled gallery blocks, or do you see the error only for existing blocks that you may have created a while ago?

I'll be glad to give you admin access to both if you tell me how I could do that privately.

Could you reach out to us at support@jetpack.com and mention this GitHub issue?

Thank you!

ACEkin commented 4 years ago

The problem is mainly with the existing tiled galleries. I can add a new one, I tried to show that in the video screen capture, but the existing ones display for a visitor but not in the block editor.

I will reach out via e-mail too. Stay tuned.

jeherve commented 4 years ago

Internal reference: 3398902-zen

jeherve commented 4 years ago

To loop back on this:

1- Some Tiled Gallery blocks are broken in existing posts on your site

Looking into this further, this appears to happen to some gallery blocks, when cloning a site to a different domain. Block validation errors then occur because of the domain mismatch, but not for all blocks. It may be linked to the gallery link settings, but I haven't been able to reproduce and thus confirm that theory:

image

(Edit: this seemed to happen with galleries with the "Media File" link setting so far)

At this point, replacing the URLs on the site to avoid that domain mismatch may be the easiest way to solve the issue. That's what I would recommend, at least until we can better understand exactly what is causing this.

2- You cannot add a new NextGEN block in any post when Jetpack is active

This was fixed in the most recent update of the NextGEN Gallery plugin.

ACEkin commented 4 years ago

Thanks a bunch for all the help.

Cemal