Discovering this thru https://advanced-gutenberg-blocks.com/ and Capitaine WP I see that this plugin was remove only a few days ago.
Was it somehow ment to replace ACF, or do you know such an alternative dedicated to Gutenberg using custom fields in its nice UI ?
I’m trying to highlight powershell and have added:
function my_custom_languages( $languages ) {
$languages[] = array(‘slug’ => ‘powershell, ‘mode’ => ‘PowerShell’, ‘label’ => ‘Powershell’) ;
return $languages;
}
add_filter( ‘advanced_gutenberg_blocks_code_languages’, ‘my_custom_languages’ );
While the block is displayed as it should, there is no markup for the code.
What can be done?
]]>On desktop, the TOC flushes left and has plenty of room and looks OK.
But on mobile it seems to flush right and then gets squeezed. The H3s, H4s and H5, only fit 1-2 words per line. As a result the TOC is taking up much more space than it should and is hard to make sense of.
Is there a way to tweak it so the subheads go more to the left and have more room?
It happens on all the TOCs, the above is just one example.
]]>Didn’t link because I worked around it.
But CSS rules like
@media screen and (max-width: 1087px) and (min-width: 769px)
.advgb-columns.tbl-layout-stacked .advgb-column {
width: 100% !important;
}
force the child columns to full width when the parent is full-width blocks at that screen size.
And visa-versa.
]]>This is how it looks – https://prnt.sc/uhimie
site – https://wptuts.ru/
]]>How to make PHP code highlight without typing <?php ?> ?
]]>Hi
Over the last 24 hours, I’ve been seeing a lot of errors when editing pages. One error suggests that Advanced Gutenberg Blocks may be connected to the problem.
The error is:
Error: An error occurred while running ‘mapSelect’: Cannot read property ‘advgb_blocks_columns_visual_guide’ of undefined.
The pages are loading fine on the front-end, but they’re only half built and I can’t get the editor to load to finish them.
Has anyone one else come across this and/or know how to resolve?
]]>Hi Maxime,
Thanks for this very useful plugin.
I have noticed an issue with the Table of Contents block when it is placed after a “regular” list (bullet or number).
See screenshot here: https://gyazo.com/850128ea86527d0e1fb049893802a6c9
As you can see, my ul
list has 6 items, therefore the TOC blocks believes the first item of the TOC is the seventh item of the list.
One workaround would be to use bullet point instead of number inside the TOC, but that’s not what I want to do.
EDIT: please note that if I move the TOC before the list, it works fine.
Thanks,
]]>Hello,
First of all sorry about my english, this is not my native language.
I have created a blocks.registerBlockType on a core/list block
to add a boolean attribute and overwrite SAVE function.
My filter has multiple version, to avoid validation error, I need register a deprecated.
I did it by the same filter.
I a first time it don’t work until I see in the locks.registerBlockType doc :
Since v6.1.0 this filter is also applied to each of a block’s deprecated settings.
It was the point, I realised my filter function is called two time : one for the block and one for his deprecated version.
It didn’t work because on the second call, when my filter function replace the save function, it replace the save function of the deprecated version…
I fixed it like this. I compare settings.save and deprecated.save functions.
const deprecated = [...];
const newAttributes = {...};
const save = function(props){...}
export function extendCoreList(settings, name) {
if (name == 'core/list') {
if (settings.save == deprecated[0].save) {
return settings;
}
const newSettings = {
...settings,
attributes: {
...settings.attributes,
...newAttributes,
},
save,
deprecated: [
...settings.deprecated || [],
...deprecated
],
};
return newSettings;
}
else {
return settings;
}
}
addFilter('blocks.registerBlockType', 'lbdm-native-blocks/extendCoreLis/attributes', extendCoreList);
It’s awkward and A temporary fix.
My question, is there a solution to know if the ‘blocks.registerBlockType function is called for the main object or a deprecated ?
Or a way to properly compare settings argument with deprecated possibilities ?
…Or a other way to avoid this problem.
]]>If you use the Duplicate block feature the Advanced Image block unique id doesn’t get updated so all the duplicates have the same id and can’t have separate styling or they conflict.
]]>It would be great if the link on an advanced image could be duplicated on the text as well. I think most people would instinctively try to click on the text which is currently not an active link.
]]>I have opened a PR in Github attempting to fix the lack of proper sanitization of PHP variable output:
https://github.com/maximebj/agb.plugin/pull/61
Please take a thorough look and implement whatever you feel is necessary.
Let me know if you have any questions.
]]>I use the code blocks, but can’t show the style
and console shows error msg : CodeMirror is not defined
]]>Hello
I am using a different header block in my pages (not the native WP GB block).
The Table of Content block does not work with that other heading.
See support thread here:
https://generatepress.com/forums/topic/generateblocks-headin-block-no-id/
Do you have a solution for this issue?
Thanks!
Dan
Hello
We can’t activate the “Map” block and put the Google API key.
Have you had this feedback recently.
Here is a page where the map should be activated: WEBSITE
Awaiting your return,
Sincerely
]]>Hello,
Here is a small suggestion, add to your exention the possibility to put a tooltip on a text or a bimage or a button.
Thank you for your understanding
Sincerely,
]]>In the page I have linked you can see the table of contents, it seems to look very different to the one that is in the editor, which looks like this: https://imgur.com/a/TlY3xYv
Is this correct, or have I got something setup wrong?
Thank you!
]]>Hello,
When using the “product” block, there is at least 2 issues.
1/ It’s impossible to choose a product. Only the 10 last added products are available.
We have to add manually the desired product number within the article code editor.
2/ Clicking on the “Add to cart” button works ok but redirects the visitor to the home page instead of keeping him or her on the present page.
Regards.
JMB
Hi, thanks you for this useful plugin.
How could I change the font-size in the header text of the Advanced Accordion?
Thanks!
I am using Jquery Manager which provides an updated v3.4.1
Other blocks work fine, but when I use the Table of contents block I get a ReferenceError: Can’t find variable JQuery. This is a problem without caching (so that does not seem to be the issue). Any ideas?
Thanks
]]>Adv Gutenberg Blocks v1.9.8 with TwentyTwenty theme v1.2, on WP 5.4
Blocks, Tweak Editor shows colors I have Added.
Posts, Edit, paragraph block, only default palette shown in Color Settings.
After exiting the Edit Post screen, the colors I defined shill show in Tweak Editor.
How do I use the Palette?
Note that might be related (from Firefox Developer Tools): “wp.editor.withColors is deprecated. Please use wp.blockEditor.withColors instead”.
in https://DOMAIN/wp-includes/js/dist/deprecated.min.js?ver=cd9e35508705772fbc5e2d9736bde31b line 1625
How about a palette designer, user specifies a base color and this lets user pick from among the analogous and monochromatic colors, for text and for background? Have another field, “Theme Background color”, so can warn against text colors with too-low contrast. (User picks text color, then picks from that text color shown against each background color.) Specify color and background-color in CSS, using class names based on palette color order; so when change base color, the palette classes change too.
]]>It is awesome that one can easily change the marker in this Map block.
However, the original Google Marker icon (for the searched+selected location) is still shown behind the custom marker icon. It would look better if there is no default marker behind it.
After upgrading to WP 5.4, any block selected shows the following error:
“The block has encountered an error and cannot be previewed.”
This is causing the site not to work as expected whereby I’m unable to create posts using blocks.
]]>After updating to the latest version I’m getting the following error:
Parse error: syntax error, unexpected '?' in /var/www/clients/devgiving/wp-content/plugins/advanced-gutenberg-blocks/classes/Blocks/Code.php on line 257
I believe that you are using the ?? operator which is PHP 7 and above only. I’m running 5.6 and the repository doesn’t say that this is supposed to work for 5.6 and after.
]]>Hey there,
At first I just wanted to extend one of WordPress Gutenberg blocks by learning purposes. I chose the ‘core/code’ block. I added the h4 tag for a title below the default content, this part worked fine. Then I decided to change the h4 tag to h2 tag. As I understand now I need to add deprecated array to settings object. I did this but I am getting this error:
Block validation: Expected tag name h2
, instead saw h4
.
const { InspectorAdvancedControls } = wp.editor;
const { createHigherOrderComponent } = wp.compose;
const { Fragment } = wp.element;
import { RichText} from "@wordpress/editor";
import deprecated from "./deprecated";
const enableExtendOnBlocks = [
'core/code',
];
function addAttributes( settings, name ) {
if ( ! enableExtendOnBlocks.includes( name ) ) {
return settings;
}
if( typeof settings.attributes !== 'undefined' ){
settings.attributes = {
...settings.attributes,
vista:{
type: 'string',
default: 'vista',
source: 'html',
selector: 'h2',
}
};
settings.title = 'My Code';
settings.supports = {
html: false,
};
settings.deprecated = deprecated;
}
return settings;
}
wp.hooks.addFilter(
'blocks.registerBlockType',
'extend-block-example/custom-attributes',
addAttributes
);
const withInspectorControls = createHigherOrderComponent( ( BlockEdit ) => {
return ( props ) => {
if ( ! enableExtendOnBlocks.includes( props.name ) ) {
return <BlockEdit { ...props } />;
}
const onChangeVista = (vista) => {
props.setAttributes({
vista: vista
});
};
return (
<Fragment>
<BlockEdit { ...props } />
<RichText
tagName="h2"
formattingControls={[]}
value={props.attributes.vista}
onChange={(vista) => onChangeVista(vista)}
/>
</Fragment>
);
};
}, "withInspectorControl" );
wp.hooks.addFilter( 'editor.BlockEdit', 'my-plugin/with-inspector-controls', withInspectorControls );
function codeSaveElement( element, blockType, attributes ) {
if ( blockType.name !== 'core/code' ) {
return element;
}
return (
<>
<pre className={attributes.className}>
<code>{ escape( attributes.content ) }</code>
</pre>
{/*{element}*/}
<RichText.Content
tagName="h2"
value={attributes.vista}
/>
</>
);
}
wp.hooks.addFilter(
'blocks.getSaveElement',
'extend-block-example/custom-save',
codeSaveElement
);
and the depricated array:
import {RichText} from "@wordpress/editor";
const oldAtt = {
vista: {
type: 'string',
source: 'html',
selector: 'h4',
default: 'vista',
},
content: {
type: "string",
source: "text",
selector: "code",
},
className: {
type: "string",
}
};
const oldAtt2 = {
content: {
type: "string",
source: "text",
selector: "code",
},
className: {
type: "string",
}
};
const deprecated = [
{
attributes: oldAtt2,
save: function (oldAtt2) {
return (
<>
<pre className={oldAtt2.className}>
<code>{ escape( oldAtt2.content ) }</code>
</pre>
</>
);
},
},
{
attributes: oldAtt,
save: function (oldAtt) {
return (
<>
<pre className={oldAtt.className}>
<code>{ escape( oldAtt.content ) }</code>
</pre>
<RichText.Content
tagName="h4"
value={oldAtt.vista}
/>
</>
);
},
},
];
export default deprecated;
What I am doing wrong?
]]>Is it possible to have the image title, description, etc. appear below the image on lightboxes for default Gutenberg galleries. It seems there is an option for this on the configuration screen but it seems to have no effect. Thank in advance for your help.
]]>On the linked page, the section with the video “Why We Matter” and the paragraph starting “We offer the most flexible…” is using the Columns Manager with the Inner Columns Full Height setting selected. However, as you can see, the paragraph with the white background is not expanding to the full height of the column with the video. Expected result would be that column to match height of the video with white background. Text can be vertically centered (preferred) or top-aligned.
Any suggestions?
]]>When you add an additional css class to whatever Gutenberg block in the block settings, that class is normally added to the class=”whatever_classes” string of the block tag during html output. That works with all blocks, but 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.
]]>Hello ??
I found this in your plugin
https://prnt.sc/qmqqyl
bonjour
Apres installation sur wordpress
j’ai ce message:
Cette extension a généré 217 caractères de sortie inattendus lors de son activation. Si vous remarquez des messages ? headers already sent ?, des problèmes avec vos flux de syndication ou d’autres soucis, essayez de désactiver ou de supprimer cette extension.
est-ce normal?
]]>