Hello people and big thanks to @marcofernandes for bringing the excellent Gutenberg editor to the Drupal world.
I am facing some problems with the Editor - have searched everywhere but no solution worked for me. Same bugs appear on 2 different totally clean Drupal 8.7.10 instances with latest 8.x-1.10 Gutenberg module. Hope I could get some help here.
Adding simple text/images
Adding a simple paragraph text, images, lists - everything works ok.
Drupal Media Entity block
Trying to add an image by adding the 'Drupal Media Entity' block. Console reads "index.js Uncaught (in promise) Error: Actions may not have an undefined "type" property. Have you misspelled a constant?" Note that the image is displayed normally on the frontend. Only when editing the node, my Console displays the above error. But I can still preview the image on the /edit screen. So, no big trouble here.
Drupal Media Entity with custom media types
Adding the 'Drupal Media Entity' block makes the Media library modal appear. But unexpectedly I cannot see my custom media types on the vertical menu (gutenberg-no-custom-media-type.jpg). Compare this with custom-media-type.jpg which is what i get when i try to access the media library from another content type which has an Entity Reference field. Clearly the Video, Remote Video, Youtube_Videos custom media types are missing.
Reusable Blocks
Transforming a normal block to be reusable by clicking at 'Add to Reusable blocks' successfully creates the reusable block (/admin/content/reusable-blocks) but this very block cannot be seen anymore on the /edit screen, Instead the infamous "Block has been deleted or is unavailable" message (block-is-deleted.jpg) appears where this very block used to be. If 'Visual Editor' is disabled from the Gutenberg options then i see <!-- wp:block /--> instead of <!-- wp:block {"ref":11} /--> which in my case actually prints the block. This of course means that the reusable block is not visible anymore on both frontend/backend screen.
Previous tickets showed that somehow most of those issues are solved. But i was disappointed to see that in my case it doesnt work.
Thanks in advance to anyone that could spend some time to help me on this.
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | reusable_block_ref_check-3097718-27.patch | 714 bytes | rwohleb |
| #20 | media-types.png | 68.62 KB | pipicom |
| #20 | gutenberg-media-modal.jpg | 118.17 KB | pipicom |
Comments
Comment #2
shane birley commentedI was notified today that a client is experiencing this after the upgrade to 1.10 -- we should look into this fairly quickly as it may break Gutenberg installations with previously created reusable blocks.
I tried re-saving the reusable blocks and created a new block in order to test it out but the error is persistent. I know there was a bug over here:
But I think this was fixed already.
Comment #3
shane birley commentedI did a bit of tinkering and if you create a new reusable block or re-connect a reusable block, the block will function. Once you edit the node, the reusable block will break.
Comment #4
pipicom commented@shane-birley this is exactly what I experienced.
Comment #5
shane birley commentedI have done some additional tinkering this morning and there are no errors being tossed (at least, that I can locate). Nothing in the browser console, nothing on my test server -- the code for the blocks is stripped upon edit. You can re-add them and everything will work but that should only be considered a work around for the moment.
I have reviewed:
Everything looks to be "normal". I am going to dig more but any help would be amazingly awesome.
I conducted additional testing on a fresh install of Drupal 8.7.10 with a fresh install of Gutenberg and the result is the same.
Comment #6
shane birley commentedI also just want to acknowledge that the commits log is hopping the last couple of days.
@marcofernandes is an amazing beast!
I reviewed a few of them and I suspect there are two or three items in there related to what we're experiencing. I will give it a little bit more time and possibly test a dev release or... possibly a new release is imminent.
Comment #7
shane birley commentedComment #8
balajidharmaReusable Block issue
I am able to replicate same issue. I switched to code editor the "ref" is missing.
<!-- wp:block /-->Verified on DB, the "ref" is available
<!-- wp:block {"ref":2} /-->Comment #9
shane birley commentedComment #11
marcofernandes commentedReusable block issue is fixed.
Previous the core/block was being unregistered and registered back again with the ref attribute. This was how WordPress was doing too. But since we now have the registerBlock filter, things changed :)
Comment #12
shane birley commented@marcofernandes,
I have updated to the latest development release on my test box and I can confirm the issue appears to be resolved. You are awesome!
Make sure to clear the cache on your installs before testing. My previously created reusable blocks failed to load on the initial test as I forgot to clear.
Comment #13
shane birley commentedI have tested the latest development release on three separate Drupal 8 websites running Gutenberg and I am comfortable saying that the reusable block issue has been resolved.
We shall all bow to the amazingness that is @marcofernandes!
Comment #14
pipicom commentedGreat news! I am testing this right now,,
Comment #15
pipicom commentedI can also confirm that there is no more issues with reusable blocks on Drupal 8.8.1 with latest 8.x-1.x-dev version of Gutenberg module.
Thank you SOOOO much @marcofernandes, @shane-birley and everybody else who helped resolve this issue.
Why isn't Gutenberg already the default editor for Drupal 8?
Comment #16
shane birley commented@pipicom,
It isn't the default editor mainly because it isn't just an editor... it is a full page builder. But the world isn't 100% ready for such a change yet. Close, I think. But not yet. The WP community freaked out when the old editor was changed out and it resulted in a plugin being created to revert to the previous editor. I think they are allowing the plugin to work until the latter part of 2021.
Comment #17
pipicom commented@shane-birley
Yeah, i remember the WP people freaking out on this :)
However this could be easily solved if by default Gutenberg Editor would include only the tools/blocks already present in CKEditor eg. Headings, Alignment tools, Bullet points, Paste from Word etc. Then on the Gutenberg config page (is there one?) or an "Extra Tools" submodule would make all blocks visible. This approach would cater for all type of users.
Comment #18
shane birley commented@pipicom,
Actually, you can. If you edit the content type, you can select which Drupal blocks will be available on that content type to the Gutenberg module.
As for the formatting options (bullets, alignments, etc) that is already available in the interface. Do you not see it?
Comment #19
pipicom commented@shane-birley
Yes, i have seen it but somehow I forgot about it :)
Thank you for getting back on this.
Comment #20
pipicom commented@marcofernandes
@shane-birley
Would someone help me on my last issue which is still not resolved?
When trying to add a media block via Gutenberg the modal that appears (gutenberg-media-modal.jpg) will not display my custom media types (media-types.png) but only the default ones - ie, the ones that Drupal creates when installing the Media module.
Therefore the extensive list of Media provider modules cannot be used.
Or should i open another issue for this?
Thank you for your time!
Comment #21
shane birley commented@pipicom,
I haven't done a whole lot of research on this yet but I think this is being discussed over here:
I think this is only related to the media system and not directly with Gutenberg's integration. I will do a bit more digging and see what I can find out.
Comment #22
pipicom commentedThank you Shane! Really appreciate this..
I am reading the issue right now and comment here should i come up with something.
Comment #23
pipicom commentedSo I tried many, many hours but couldnt make this work.
- Tried all possible configurations @ admin/config/content/formats/manage/gutenberg
- Editing the configs (admin/structure/types/manage/myContentType) didnt help either
- Tried to edit the file "GutenbergMediaLibraryUiBuilder.php" in case the media library modal is called in a 'wrong' way
- Installed 'entity_browser' module in order to create a brand new media modal
Long story short, Gutenberg editor cannot "see" custom media types (/admin/content/media) and therefore add them into the body content. Another content type on my project - using CKEditor - worked like a charm, the respective media modal displays the custom media types.
Comment #24
marcofernandes commentedYep, it's not showing custom media types. @pipicom could you please open a bug issue? So we can perhaps close this one and move this issue fixes to the next release.
Comment #25
pipicom commentedDone => https://www.drupal.org/project/gutenberg/issues/3107837
Thank you @marcofernandes .
Comment #26
rwohlebWhile testing gutenberg with different combinations of modules, I found I ended up with a node containing:
<!-- wp:block {"editorskit":{"devices":false,"desktop":true,"tablet":true,"mobile":true,"loggedin":true,"loggedout":true,"acf_visibility":"","acf_field":"","acf_condition":"","acf_value":"","migrated":false}} /-->This results in a hard error in ReusableBlockFilter when trying to view the node since the ref attribute is missing.
Seems like a check needs to be added to make sure the ref property exists before trying to use it.
Comment #27
rwohlebComment #29
marcofernandes commentedApplied rwohleb's patch regarding the exception.
Issue with custom media types at https://www.drupal.org/project/gutenberg/issues/3107837
Comment #30
kswamy commentedHi,
Can you give a tentative date when the current DEV version with above fixes would be released for use in Production? I tried applying the commit but it is not working. Replacing the complete module with current DEV version only works. But I cannot use in Production unless this is released as a stable version.
Comment #31
kswamy commentedSorry updated status by mistake. Reverting back