• Resolved Isu

    (@isuke01)


    Hi,
    I’m having a custom block with template, which is locked.
    Upon insertion the block it fails, I noticed it fails due to AI Content extension.
    Tempalte declaration:

    
    export function templateWrapper(attributes) {
    	return applyFilters(
    		'external-card-template',
    		[
    			[
    				'core/group',
    				{
    					className: 'post-link',
    					layout: {
    						inherit: false,
    					},
    					templateLock: true,
    				},
    				[
    					[
    						'core/image',
    						{
    							id: attributes.imageId,
    							className: 'post-featured-image',
    						},
    					],
    					[
    						'core/group',
    						{
    							className: 'card-info',
    							align: 'full',
    							templateLock: true,
    						},
    						[
    							[
    								'core/heading',
    								{
    									level: 2,
    									className: 'post-title',
    									content: attributes.title,
    								},
    							],
    							[
    								'core/paragraph',
    								{
    									className: 'post-excerpt',
    									content: attributes.text,
    								},
    							],
    						],
    					],
    				],
    			],
    		],
    		attributes,
    	);
    }
    

    Usage:

    <div {...blockProps}>
       <InnerBlocks template={TEMPLATE} allowedBlocks={ALLOWED_BLOCKS} />
    </div>

    The issue happens only when templateLock is set to true by default.
    The issue does not happen when content is added manually in editor and then content lock is applied.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @isuke01,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Please ensure that you are using the latest version of Rank Math plugin. If not yet, please do update them. You may refer to our changelog page here: https://rankmath.com/changelog/

    Can you please share some screenshots of the error you see from your end when the block template is added while Rank Math’s Content AI is active?

    Looking forward to helping you.

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello,

    Assuming you are using the latest version of all the plugins, themes & WordPress and the issue is resolved, we are closing this support topic.

    If that is not the case, feel free to open a new support topic or reply to this one, and we will be more than happy to assist.

    Looking forward to helping you. Thank you.

    Thread Starter Isu

    (@isuke01)

    Hi,
    Sorry for late replay, that’s due to my limited time on this particular client.
    Today I’ll try to give more info for you.

    Also I’ll try reproduce it on clean WP install, since this also could be a factor.

    Thread Starter Isu

    (@isuke01)

    Seems like it was issue with an older version. I upgraded from 1.0.204 to 1.0.208.1 and it fixed the issue ??

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @isuke01,

    We are glad that everything has been sorted out.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AI content breaks block when template is lock’ is closed to new replies.