maximebj / agb.plugin Goto Github PK
View Code? Open in Web Editor NEWAwesome customizable blocks for the new WordPress Editor
Awesome customizable blocks for the new WordPress Editor
When using a Table of Contents block, the Undo function in the block editor doesn't work.
I discovered this while trying out this plugin to see if I could find some solutions for bugs in the current implementation of a core Table of Contents block PR that I and several others are working on. For reference, the current implementation in the PR has working undo, but it creates 2 undo steps (rather than the ideal of only 1) for each change to the content of a Heading block.
First off - thanks for your great work on this plugin! I've really enjoyed using it - great job.
I recently updated my blog to use Gutenberg 7.2.0 and with Advanced Gutenberg Blocks enabled the following error now shows in the devtools console when I try to edit a block in a post:
Block validation: Block validation failed for core/html
(
{name: "core/html", icon: {…}, attributes: {…}, keywords: Array(1), save: ƒ, …}
name: "core/html"
icon: {src: {…}}
attributes: {content: {…}}
keywords: ["embed"]
save: ƒ (e)
category: "formatting"
title: "Custom HTML"
description: "Add custom HTML code and preview it as you edit."
example: {attributes: {…}}
supports: {customClassName: false, className: false, html: false}
transforms: {from: Array(1)}
edit: ƒ n()
proto: Object
I'm also seeing this error after clicking on an existing block:
Error: Cannot bind alt+c. Alt and Shift+Alt modifiers are reserved for character input.
at index.js?ver=03b5f6921d69ba216629f9b6c1d83fd0:1
at Array.forEach ()
at index.js?ver=03b5f6921d69ba216629f9b6c1d83fd0:1
at Vb (react-dom.min.b694e242.js?ver=16.9.0:104)
at Xi (react-dom.min.b694e242.js?ver=16.9.0:151)
at unstable_runWithPriority (react.min.0212dc62.js?ver=16.9.0:26)
at Ma (react-dom.min.b694e242.js?ver=16.9.0:52)
at Yb (react-dom.min.b694e242.js?ver=16.9.0:150)
at O (react-dom.min.b694e242.js?ver=16.9.0:120)
at ze (react-dom.min.b694e242.js?ver=16.9.0:118)
After that I get the "This block has encountered an error and cannot be previewed." message. If I disable Advanced Gutenberg Blocks I can edit the post again but all of my custom code blocks break and aren't displayed in a given post of course. I've worked around it by using another custom code block plugin but it's not nearly as good as yours so I wanted to pass along the error info in hopes of getting it working again.
I'm creating a catalogue of blocks. The Google Map is not appearing in the front-end
https://blocks.wp.a2z/block/google-map-advanced-gutenberg-blocks-gmap/
It looks like wpautop has been run against the generated JavaScript.
I'll investigate further.
Hi @maximebj,
first and foremost congrats for the great work you're doing here. I tested your project few months ago but at the end I chosed to use the Atomic Blocks plugin because it has more marketing related blocks like CTA block and others.
Anyway I start using it but I didn't like it much because I had a feeling of "closed source".
You instead propose to contribute to the project right from the homepage and since I had my take on building blocks for fun I would like to contribute to the project because I do not think that the WordPress ecosystem needs another Gutenberg blocks bundle plugin (nor I think to have all the time needed to take care of a full project).
I saw the continuous work and improvement you've done here and I would like to know if is possible (and how) contribute to this project.
I have few ideas for next blocks and I think that this could a great opportunity for myself to learn something and partecipate in growing a really good project but since I didn't find any Contribute.md and I am not so active on Twitter I thought that open an issue could be a nice way to make contact.
All the best.
Hello,
From today, I have a Fatal Error with WP-CLI running a wp cron event run --due-now
(don't know there's a link between wp-cli command and the Fatale)
Fatal error: Uncaught Error: Attempt to modify property "registered_blocks" on null in /wp-content/plugins/advanced-gutenberg-blocks/classes/Services/Blocks.php:51
Stack trace:
#0 /wp-content/plugins/advanced-gutenberg-blocks/classes/Blocks/Plugin.php(28): AdvancedGutenbergBlocks\Services\Blocks::register_block()
#1 wp-content/plugins/advanced-gutenberg-blocks/classes/AdvancedGutenbergBlocks.php(99): AdvancedGutenbergBlocks\Blocks\Plugin->run()
#2/wp-content/plugins/advanced-gutenberg-blocks/plugin.php(22): AdvancedGutenbergBlocks\AdvancedGutenbergBlocks->run()
#3 /wp-settings.php(388): include_once('...')
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): require('...')
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1158): WP_CLI\Runner->load_wordpress()
#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(74): WP_CLI\Bootstrap\LaunchRunner->process()
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#9 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('...')
#10 /usr/local/bin/wp(4): include('...')
#11 {main}
thrown in /wp-content/plugins/advanced-gutenberg-blocks/classes/Services/Blocks.php on line 51
### wp-core ###
version: 5.6.1
site_language: fr_FR
user_language: fr_FR
timezone: Europe/Paris
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: closed
environment_type: production
user_count: 5
dotorg_communication: true
### wp-paths-sizes ###
wordpress_path: /var/www/thiverval-grignon
wordpress_size: 295,03 Mo (309360185 bytes)
uploads_path: /var/www/thiverval-grignon/wp-content/uploads
uploads_size: 2,32 Go (2489337749 bytes)
themes_path: /var/www/thiverval-grignon/wp-content/themes
themes_size: 5,24 Mo (5496186 bytes)
plugins_path: /var/www/thiverval-grignon/wp-content/plugins
plugins_size: 196,98 Mo (206543379 bytes)
database_size: 94,47 Mo (99059952 bytes)
total_size: 2,90 Go (3109797451 bytes)
### wp-dropins (2) ###
advanced-cache.php: true
object-cache.php: true
### wp-active-theme ###
name: Thiverval-Grignon V3 (thiverval-grignon_V3)
version: undefined
author: thivinfo.com
author_website: (undefined)
parent_theme: Twenty Fourteen (twentyfourteen)
theme_features: core-block-patterns, post-thumbnails, title-tag, editor-style, editor-styles, wp-block-styles, responsive-embeds, editor-color-palette, automatic-feed-links, menus, html5, post-formats, custom-background, featured-content, customize-selective-refresh-widgets, custom-header, widgets
theme_path: /var/www/thiverval-grignon/wp-content/themes/thiverval-grignon_V3
auto_update: Désactivé
### wp-parent-theme ###
name: Twenty Fourteen (twentyfourteen)
version: 3.0
author: L’équipe WordPress
author_website: https://wordpress.org/
theme_path: /var/www/thiverval-grignon/wp-content/themes/twentyfourteen
auto_update: Désactivé
### wp-themes-inactive (1) ###
Twenty Twenty-One: version: 1.1, author: L’équipe WordPress, Mises à jour auto désactivées
### wp-mu-plugins (4) ###
Functions: version: 1.0.0, author: Sébastien SERRE
ManageWP - Worker Loader: author: GoDaddy, version: (undefined)
MU plugins subdirectory loader: version: 1.0, author: BeAPI, WeMakeCustom
tg-acf.php: author: (undefined), version: (undefined)
### wp-plugins-active (44) ###
AD Sliding FAQ: version: 2.4, author: Thomas Villain - Anybodesign, Mises à jour auto activées
Advanced Custom Fields: Autocomplete: version: 1.0.0, author: Brian S. Reed, Max Lyuchin, Mises à jour auto activées
Advanced Custom Fields: Extended: version: 0.8.7.6, author: ACF Extended, Mises à jour auto activées
Advanced Custom Fields PRO: version: 5.9.5, author: Elliot Condon, Mises à jour auto activées
Advanced Editor Tools (previously TinyMCE Advanced): version: 5.6.0, author: Automattic, Mises à jour auto activées
Advanced Gutenberg Blocks: version: 1.9.8, author: maximebj, Mises à jour auto activées
Akismet Anti-Spam: version: 4.1.8, author: Automattic, Mises à jour auto activées
Annuaire des prodessionels: version: 1.0.0, author: Sébastien SERRE, Mises à jour auto activées
Cantine: version: 1.0.0, author: Sébastien SERRE, Mises à jour auto activées
Classic Editor: version: 1.6, author: WordPress Contributors, Mises à jour auto activées
Comarquage service-public.fr: version: 0.5.58, author: Kienso, Mises à jour auto activées
Download Monitor: version: 4.4.4, author: Never5, Mises à jour auto activées
Easy FancyBox: version: 1.8.18, author: RavanH, Mises à jour auto activées
Gravity Forms: version: 2.4.22, author: Gravity Forms, Mises à jour auto activées
Gravity Forms + Custom Post Types: version: 3.1.16, author: spivurno, Mises à jour auto activées
Imagify: version: 1.9.14, author: WP Media, Mises à jour auto activées
iThemes Security: version: 7.9.0, author: iThemes, Mises à jour auto désactivées
MailPoet 3 (New): version: 3.59.2, author: MailPoet, Mises à jour auto activées
ManageWP - Worker: version: 4.9.8, author: GoDaddy, Mises à jour auto activées
Marché Public: version: 1.0.0, author: Sébastien SERRE, Mises à jour auto activées
MetaSlider: version: 3.20.2, author: MetaSlider, Mises à jour auto activées
MetaSlider Lightbox: version: 1.11.3, author: MetaSlider, Mises à jour auto activées
Post Expirator: version: 2.4.1, author: Aaron Axelsen, Mises à jour auto activées
Really Simple SSL: version: 4.0.8, author: Really Simple Plugins, Mises à jour auto activées
Redirection: version: 5.0.1, author: John Godley, Mises à jour auto activées
Redis Object Cache: version: 2.0.17, author: Till Krüss, Mises à jour auto activées
Registre: version: 1.0.0, author: Sébastien SERRE, Mises à jour auto activées
Relevanssi Premium: version: 2.3.0, author: Mikko Saari, Mises à jour auto activées
SEOPress: version: 4.4.0.3, author: SEOPress, Mises à jour auto activées
SEOPress PRO: version: 4.4.0, author: SEOPress, Mises à jour auto activées
SF Admin Bar Tools: version: 4.0, author: Grégory Viguier, Mises à jour auto activées
The Events Calendar: version: 5.3.2.1, author: The Events Calendar, Mises à jour auto activées
ThFO Custom: version: 1.0.0, author: Sébastien SERRE, Mises à jour auto activées
Travaux Communaux: author: Sébastien Serre, version: (undefined), Mises à jour auto activées
User Switching: version: 1.5.6, author: John Blackbourn & contributors, Mises à jour auto activées
Weather Station: version: 3.8.9, author: Pierre Lannoy, Mises à jour auto activées
WP-Matomo Integration: version: 1.0.24, author: André Bräkling, Mises à jour auto activées
WP-Optimize - Clean, Compress, Cache: version: 3.1.7, author: David Anderson, Ruhani Rabin, Team Updraft, Mises à jour auto activées
WP Crontrol: version: 1.9.1, author: John Blackbourn & crontributors, Mises à jour auto activées
WP Grid Builder: version: 1.5.3, author: Loïc Blascos, Mises à jour auto activées
WP Offload SES Lite: version: 1.4.4, author: Delicious Brains, Mises à jour auto désactivées
WP Rocket: version: 3.8.4, author: WP Media, Mises à jour auto désactivées
WP to Twitter: version: 3.5.0, author: Joseph C Dolson, Mises à jour auto activées
Yoast Duplicate Post: version: 4.1.1, author: Enrico Battocchi & Team Yoast, Mises à jour auto activées
### wp-media ###
image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1687
imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
file_uploads: File uploads is turned off
post_max_size: 50M
upload_max_filesize: 50M
max_effective_size: 50 Mo
max_file_uploads: 20
imagick_limits:
imagick::RESOURCETYPE_AREA: 122 Mo
imagick::RESOURCETYPE_DISK: 1073741824
imagick::RESOURCETYPE_FILE: 768
imagick::RESOURCETYPE_MAP: 512 Mo
imagick::RESOURCETYPE_MEMORY: 256 Mo
imagick::RESOURCETYPE_THREAD: 1
gd_version: 2.2.5
ghostscript_version: 9.26
### wp-server ###
server_architecture: Linux 4.9.0-9-amd64 x86_64
httpd_software: Apache
php_version: 7.3.27-2+0~20210213.78+debian9~1.gbpc9cf23 64bit
php_sapi: fpm-fcgi
max_input_variables: 1000
time_limit: 30
memory_limit: 128M
admin_memory_limit: 256M
max_input_time: 60
upload_max_filesize: 50M
php_post_max_size: 50M
curl_version: 7.52.1 OpenSSL/1.0.2u
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true
### wp-database ###
extension: mysqli
server_version: 10.1.48-MariaDB-0+deb9u1
client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $
### wp-constants ###
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /var/www/thiverval-grignon/wp-content
WP_PLUGIN_DIR: /var/www/thiverval-grignon/wp-content/plugins
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: true
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_LOCAL_DEV: undefined
DB_CHARSET: utf8mb4
DB_COLLATE: undefined
### wp-filesystem ###
wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable
```
It seems that when I disable some blocks into the Gutenberg Blocks Settings interface, they aren't disabled in Gutenberg.
Plus, I have a beautiful error in my console:
Uncaught TypeError: deactivatedBlocks.forEach is not a function at deactivator.build.js?ver=1.3:4
I found this issue because I ran into a problem with my next plugin and I was curious how you achieved that.
To work correctly, you should wrap your code into window._wpLoadGutenbergEditor.then( function() { } );
and you should add wp-edit-post
as dependency. See WordPress/gutenberg#4848 (comment)
Hope this issue contributes to your plugin :)
Please see below message and advise
Uncaught Error: Attempt to modify property "registered_blocks" on null in /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Services/Blocks.php:51 Stack trace: #0 /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Blocks/Plugin.php(28): AdvancedGutenbergBlocks\Services\Blocks::register_block() #1 /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/AdvancedGutenbergBlocks.php(99): AdvancedGutenbergBlocks\Blocks\Plugin->run() #2 /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-content/plugins/advanced-gutenberg-blocks/plugin.php(22): AdvancedGutenbergBlocks\AdvancedGutenbergBlocks->run() #3 /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-admin/includes/plugin.php(2300): include('/home/506952.cl...') #4 /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-admin/plugins.php(191): plugin_sandbox_scrape() #5 {main} thrown in /home/506952.cloudwaysapps.com/khytrmnsvp/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Services/Blocks.php on line 51
I've created a test case with four of these blocks which should give the preview of four different websites. One (http://carolinaeyck.com) isn't rendered at all - an empty frame is displayed, from another (http://ethermagic.eu) only some text is shown, no picture.
The two others are actual Wordpress sites, both created with Gutenberg and the twenty seventeen theme. Although I'd expect these both to be the most compatible, it's just the page title of the static front page which is displayed, but even not the theme header picture.
To make debugging easier, I published this test case post here: https://theremin.academy/uncategorized/website-card-preview-test/
It's password protected, the password is test
Please check the website: https://advanced-gutenberg-blocks.com
The SSL has expired on the 20th of February.
If possible, use https://certbot.eff.org/ to automatically renew the certificate.
Hi,
thanks for the great work, the code block is pretty cool. Is it possible to extend it to the native code block so the existing code snippets would be highlighted ?
This happens when I try to activate the plugin:
Fatal error: Uncaught Error: Call to a member function set_block() on null in /home/u210965614/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Helpers/Extend.php:47 Stack trace: #0 /home/u210965614/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Blocks/Plugin.php(26): AdvancedGutenbergBlocks\Helpers\Extend::register_block('advanced-gutenb...', 'WordPress Plugi...', Array) #1 /home/u210965614/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/AdvancedGutenbergBlocks.php(95): AdvancedGutenbergBlocks\Blocks\Plugin->run() #2 /home/u210965614/public_html/wp-content/plugins/advanced-gutenberg-blocks/plugin.php(23): AdvancedGutenbergBlocks\AdvancedGutenbergBlocks->run() #3 /home/u210965614/public_html/wp-admin/includes/plugin.php(1897): include('/home/u21096561...') #4 /home/u210965614/public_html/wp-admin/plugins.php(172): plugin_sandbox_scrape('advanced-gutenb...') #5 {main} thrown in /home/u210965614/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Helpers/Extend.php on line 47
Whatever the selected language, the preview uses html to display the code:
screenshot of the editor
screenshot of the preview
Title says it all. After upgrading to Gutenberg 3.2 today, I get an error message „Advanced Gutenberg Blocks requires Wordpress 5.0 or Gutenberg plugin to be activated“
I fear that I updated the plugin too early...
Did not yet get the WP 5.0 update proposal, so I updated already the plugin. It seems to work at the frontend, but when I go into edit post or edit page in the backend, I get only a completely white page as long as the plugin is activated. When I deactivate it, I can edit posts and pages again, but then, the plugin is naturally not working...
hi, thanks for publishing these blocks! I'd love to use the card block but i would prefer not to depend on a third party service for it. Would you be open to a PR that replaces the opengraph.io requests by a WordPress Ajax action to retrieve the embed data using the embed/embed library?
Thanks!
Merci pour ton travail Maxime, c'est top.
Je cherche un moyen d'étendre le chargement des blocks depuis un thème ou child thème. C'est dans une roadmap ?
Could you please use spaces or tabs, not both the same file: https://github.com/maximebj/agb.plugin/blob/master/src/blocks/summary/index.js#L24-L39
Or activate editorconfig plugin you already setup: https://github.com/maximebj/agb.plugin/blob/master/.editorconfig#L14
Hi,
I just started a site with your plugin.
I wanted to use the plugin card block. I searched for the name of a plugin but the results of the search is not displayed correctly. You can see it in the picture below.
When I click on one of the plugins, nothing happens next.
Do you have a solution to correct this?
Thanks in advance,
Deniz.
I have opened a PR (#61) attempting to fix this issue.
Basically your plugin is vulnerable to XSS attacks if the PHP output is not properly filtered.
WP 4.9.4 multisite
Gutenberg 2.4.0
Custom theme
When using "Post" block there is a notice in admin : "Mise à jour échouée" and post do not update.
Console log :
Block "gutenblocks/products" is not registered. Block "gutenblocks/addtocart" is not registered. Block "gutenblocks/products" is not registered. Block "gutenblocks/addtocart" is not registered.
And in front, when loading the same post after update failed :
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 7 bytes) ...
If I remove the "Post" block everything is fine.
hello
setting wordpress 5.0.1 : PHP 7.2 - MYSQL v.5.5 / host at OVH
I can't activate your extension because there is this error message:
"The extension could not be activated because it triggered a fatal error.
Parse error: syntax error, unexpected 'LIST' (T_LIST), expecting identifier (T_STRING) in /home/denalogi/www/wp-content/plugins/advanced-gutenberg-blocks/classes/Helpers/Dashicons.php on line 23"
Thank you for helping me
francois
When you add an additional css class to whatever Gutenberg block in the advanced block settings, that class is normally added to the class=”whatever_classes” string of the block tag during html output. That works with all Gutenberg blocks, but apparently NOT with the Advanced Gutenberg Post block (did not yet test with other blocks from Maxime’s otherwise great plugin). The additional class(es) are simply not output 🙁
Actual html output:
<div class="wp-block-advanced-gutenberg-blocks-post">
Expected html output:
<div class="wp-block-advanced-gutenberg-blocks-post my-class">
Thus, I can’t re-style your single post block, which is sad since I finally found a css way to make the post block render vertically (picture above the text) to put 2 or 3 post blocks in columns.
Hi Team,
Is there a feature where I can highlight specific lines in a code rather than highlighting a specific range?
When adding the single post block in the Gutenberg editor, everything is fine. But when viewing the page containing this post block, the post title appears unfiltered, displaying as [:en]New in 2018[:fr]Nouveau en 2018[:de]Neu in 2018[:] - obviously not going through the WP multilang filter. In opposite, the default Wordpress category block renders (and translates) post titles correctly...
I'm getting this error on activation:
Notice: Undefined variable: submenu in /app/public/wp-content/plugins/advanced-gutenberg-blocks/classes/WP/Settings.php on line 71
Creating a maps block in the back-end is ok, works and renders well, but on the front-end, only a blank rectangle appears since the javascript which should fill it, has errors. More details here :
Hello, Just wondering if you were considering adding YAML syntax for the code block?
Gutenberg Styled Span Paragraph Blocks
It sure would be nice to be able to select some text in my paragraph blocks and make all sorts of font changes to it just as I might in a word document.
Instead of a font selection drop down with just font names and no preview (a font list drop down without previews is worthless to the 99% of people who have no idea what 99.9% of font’s look like) — and having to click the dropdown and scroll-down a massive list of fonts just to see what they might look like is a huge waste of thousands of people’s time. Please, bless us with both Styled Span Paragraph Blocks and an included font previewer function for quick and easy styling of text in the Gutenberg editor.
It'd be even cooler if we could set and save our own collection of prefered style combinations (NOT via CSS code fields but via mouse clicks and font and color and text effect selection).
Title says it all...
In the editor (admin), the single post block renders well and the url to the post is there.
In the front view, the block renders still nice, but the href tag behind is empty.
Notice: Undefined variable: post_id in /home/bworguk/public_html/wp-content/plugins/advanced-gutenberg-blocks/classes/Blocks/Code.php on line 103
ErrorException thrown with message "call_user_func_array() expects parameter 1 to be a valid callback, function 'update' not found or invalid function name"
Stacktrace:
#6 ErrorException in /var/www/application/wp-includes/class-wp-hook.php:286
#5 Themosis\Core\Bootstrap\ExceptionHandler:handleError in /var/www/application/wp-includes/class-wp-hook.php:286
#4 WP_Hook:apply_filters in /var/www/application/wp-includes/class-wp-hook.php:310
#3 WP_Hook:do_action in /var/www/application/wp-includes/plugin.php:465
#2 do_action in /var/www/application/wp-admin/includes/class-wp-upgrader.php:835
#1 WP_Upgrader:run in /var/www/application/wp-admin/includes/class-plugin-upgrader.php:108
#0 Plugin_Upgrader:install in /var/www/application/wp-admin/update.php:137
The upgrader_process_complete
's callback hook is incorrect:
public function register_hooks() {
register_activation_hook( Consts::get_path() . 'plugin.php' , array( $this, 'activate' ) );
register_deactivation_hook( Consts::get_path() . 'plugin.php' , array( $this, 'deactivate' ) );
- add_action( 'upgrader_process_complete', 'update', 10, 2 );
+ add_action( 'upgrader_process_complete', array( $this, 'update' ), 10, 2 );
}
Hello,
I have been using Advanced Gutenberg Blocks for a couple weeks, and always noticed that with the Advanced Code blocks, the theme I'm using sends inline CSS to force the color of the text to a specific value. Not only that, it also overrides padding and margin, so that the lines appear with huge spacing and make the editing almost impractical.
I solved my use case by appending the following to dist/blocks.style.build.css:
.wp-block-advanced-gutenberg-blocks-code .CodeMirror pre{color:inherit;margin:inherit;padding:inherit;}
This way I can finally edit plain text with a black background, and with the paddings/margins that appear in the published post.
Would it be possible to make this a feature, adding an on/off checkbox in the "Tweak Editor" settings page? Something like "Workaround for themes forcing styles in ACB".
I am not sure if those are the only 3 properties being overwritten by the theme, but I guess they're the most important ones to not mess up the preview (and esp. allowing seeing the text, when you have theme text color == block background color).
For reference, the theme displaying the issue for me is Typology: https://mekshq.com/theme/typology/
Says removed at request of author - will there be a commercial version soon? Or is the support load just overwhelming?
Hello Maxime,
Your block "Website Card Preview" doesn't include src
in the img
markup. :-(
My client's website at https://www.laureloakinn.com/location/ allows me to add two recent post blocks in the backend, but only the first one is rendered in the frontend. I am attempting to use one for category "Restaurants" and the second for category "Attractions".
Any advice on how to accomplish two recent post blocks on the same page would be most appreciated.
Can be created in the back end, renders well in the front end, but when returning to the back end, the info about the linked post gets lost :
https://wordpress.org/support/topic/post-block-again-broken-with-gutenberg-4-0/
The advanced table block shows a block-specific toolbar
but no table rows/columns/cells,
even when adding columns/rows using the toolbar,
the advanced table block stays empty.
Error logged in browser console when trying to add new table rows/columns:
ncaught TypeError: Cannot read property 'rows' of null
at w (table-plugin.min.js?ver=4.9.8:1)
at Object.O [as insertRows] (table-plugin.min.js?ver=4.9.8:1)
at mceTableInsertRowAfter (table-plugin.min.js?ver=4.9.8:2)
at Hx.<anonymous> (table-plugin.min.js?ver=4.9.8:2)
at c.exec.(:3000/wp/wp-admin/anonymous function) (http://localhost:3000/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4800-20180716:2:183956)
at qg.execCommand (tinymce.min.js?ver=4800-20180716:2)
at Hx.execCommand (tinymce.min.js?ver=4800-20180716:2)
at Object.onClick (blocks.js?ver=1.7.5:2819)
at Object.onClick (blocks.js?ver=1.7.5:2566)
at onClick (index.js?ver=1542062285:19)
w @ table-plugin.min.js?ver=4.9.8:1
O @ table-plugin.min.js?ver=4.9.8:1
mceTableInsertRowAfter @ table-plugin.min.js?ver=4.9.8:2
(anonymous) @ table-plugin.min.js?ver=4.9.8:2
c.exec.(anonymous function) @ tinymce.min.js?ver=4800-20180716:2
execCommand @ tinymce.min.js?ver=4800-20180716:2
execCommand @ tinymce.min.js?ver=4800-20180716:2
(anonymous) @ blocks.js?ver=1.7.5:2819
onClick @ blocks.js?ver=1.7.5:2566
onClick @ index.js?ver=1542062285:19
callCallback @ react-dom.24169eaf.js:140
invokeGuardedCallbackDev @ react-dom.24169eaf.js:178
invokeGuardedCallback @ react-dom.24169eaf.js:227
invokeGuardedCallbackAndCatchFirstError @ react-dom.24169eaf.js:241
executeDispatch @ react-dom.24169eaf.js:599
executeDispatchesInOrder @ react-dom.24169eaf.js:618
executeDispatchesAndRelease @ react-dom.24169eaf.js:719
executeDispatchesAndReleaseTopLevel @ react-dom.24169eaf.js:730
forEachAccumulated @ react-dom.24169eaf.js:700
runEventsInBatch @ react-dom.24169eaf.js:861
runExtractedEventsInBatch @ react-dom.24169eaf.js:870
handleTopLevel @ react-dom.24169eaf.js:4826
batchedUpdates$1 @ react-dom.24169eaf.js:17237
batchedUpdates @ react-dom.24169eaf.js:2307
dispatchEvent @ react-dom.24169eaf.js:4905
interactiveUpdates$1 @ react-dom.24169eaf.js:17292
interactiveUpdates @ react-dom.24169eaf.js:2326
dispatchInteractiveEvent @ react-dom.24169eaf.js:4882
react-dom.24169eaf.js:280 Uncaught TypeError: Cannot read property 'rows' of null
at w (table-plugin.min.js?ver=4.9.8:1)
at Object.O [as insertRows] (table-plugin.min.js?ver=4.9.8:1)
at mceTableInsertRowAfter (table-plugin.min.js?ver=4.9.8:2)
at Hx.<anonymous> (table-plugin.min.js?ver=4.9.8:2)
at c.exec.(:3000/wp/wp-admin/anonymous function) (http://localhost:3000/wp/wp-includes/js/tinymce/tinymce.min.js?ver=4800-20180716:2:183956)
at qg.execCommand (tinymce.min.js?ver=4800-20180716:2)
at Hx.execCommand (tinymce.min.js?ver=4800-20180716:2)
at Object.onClick (blocks.js?ver=1.7.5:2819)
at Object.onClick (blocks.js?ver=1.7.5:2566)
at onClick (index.js?ver=1542062285:19)
w @ table-plugin.min.js?ver=4.9.8:1
O @ table-plugin.min.js?ver=4.9.8:1
mceTableInsertRowAfter @ table-plugin.min.js?ver=4.9.8:2
(anonymous) @ table-plugin.min.js?ver=4.9.8:2
c.exec.(anonymous function) @ tinymce.min.js?ver=4800-20180716:2
execCommand @ tinymce.min.js?ver=4800-20180716:2
execCommand @ tinymce.min.js?ver=4800-20180716:2
(anonymous) @ blocks.js?ver=1.7.5:2819
onClick @ blocks.js?ver=1.7.5:2566
onClick @ index.js?ver=1542062285:19
callCallback @ react-dom.24169eaf.js:140
invokeGuardedCallbackDev @ react-dom.24169eaf.js:178
invokeGuardedCallback @ react-dom.24169eaf.js:227
invokeGuardedCallbackAndCatchFirstError @ react-dom.24169eaf.js:241
executeDispatch @ react-dom.24169eaf.js:599
executeDispatchesInOrder @ react-dom.24169eaf.js:618
executeDispatchesAndRelease @ react-dom.24169eaf.js:719
executeDispatchesAndReleaseTopLevel @ react-dom.24169eaf.js:730
forEachAccumulated @ react-dom.24169eaf.js:700
runEventsInBatch @ react-dom.24169eaf.js:861
runExtractedEventsInBatch @ react-dom.24169eaf.js:870
handleTopLevel @ react-dom.24169eaf.js:4826
batchedUpdates$1 @ react-dom.24169eaf.js:17237
batchedUpdates @ react-dom.24169eaf.js:2307
dispatchEvent @ react-dom.24169eaf.js:4905
interactiveUpdates$1 @ react-dom.24169eaf.js:17292
interactiveUpdates @ react-dom.24169eaf.js:2326
dispatchInteractiveEvent @ react-dom.24169eaf.js:4882
I added this function to correctly show F# code:
function my_custom_languages( $languages ) {
$languages[] = array('slug' => 'fsharp', 'mode' => 'mllike', 'mime' => 'text/x-fsharp', 'label' => 'FSharp') ;
return $languages;
}
add_filter( 'advanced_gutenberg_blocks_code_languages', 'my_custom_languages' );
However, the mime type is not applied as the code is shown as OCaml, not recognizing F# slash forward commenting.
What is exactly the purpose of the subhead block?
I want to group heading and other heading and/or
paragraph elements together so I can style them together (e.g. a border).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.