Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing CSS when importing reusable Qubely block #27

Open
adrien-robert opened this issue Nov 30, 2019 · 2 comments
Open

Missing CSS when importing reusable Qubely block #27

adrien-robert opened this issue Nov 30, 2019 · 2 comments

Comments

@adrien-robert
Copy link

adrien-robert commented Nov 30, 2019

Hello,

I'm considering pairing Qubely with Oxygen Builder but I run into an issue since the beginning of my testing of Qubely Pro...

This is what a reusable Qubely block looks like when imported in a Gutenberg page:
image

This is what a reusable Qubely block looks like when imported with a shortcode inside Oxygen Builder:
image

I have this code inside a Code Snippet to import my reusable gutenberg block (that use Qubely design layout):

add_shortcode('wp_oxy_reusable_block', 'my_reusable_block_sc');
/**
 * Add a shortcode to allow resuable blocks, that are created in WP editor, to be inserted in Oxygen templates using their IDs
 *
 * Sample usage: [wp_oxy_reusable_block id='2543']
 */
function my_reusable_block_sc( $atts ) {
	
	$attributes = shortcode_atts(
		array(
			'id' => null
		), $atts );
  
	$output = do_blocks( get_the_content('', '', get_post($attributes['id']) ) );
  
  	return $output;

}

And then in Oxygen Builder I use the shortcode [wp_oxy_reusable_block id='66'] with 66 as the ID of my reusable block.

How can I import CSS too? What code I need to use or add inside my code snippet?

Thanks.

@dovy
Copy link

dovy commented Jun 11, 2020

+1

@dovy
Copy link

dovy commented Jun 11, 2020

Found the issue. CSS is stored in a post_meta value called _qubely_css instead of in the template like every other block plugin. This data does not re-render properly. As such, migrations fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants