V2 elements/styles not working

I made some long-overdue updates yesterday, adding the new V2 elements.
I’m running X theme version 5.25 and Cornerstone version 2.17.

Cornerstone loads without issue, and I’m able to add new v2 elements to my pages.
But I can’t then style these elements in any way using the Content Builder.

For example, I’ll add in a new v2 headline, the text (dummy text or text of my own choosing) will show on the page. But any adjustment in the Content Builder to size, color, style, padding, etc doesn’t work.

It’s not just a live preview issue, either; if I save and open the page, no styles are present there either.

  • I can still modify styles using classes and custom CSS
  • Classic elements still work as before.

I’ve tried the following:

  • clearing all WP caches
  • deactivating all pluging
  • deleting all custom sitewide custom css and js

but nothing seems to be working.

Any suggestions for what to try next?

Hello @nigel.kehler,

Thanks for asking. :slight_smile:

While editing and saving the changes I am getting Content failed to save error message. We recommend you to increase your memory allocated to PHP. To increase it, please edit your wp-config.php file and insert these lines:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

We would loved to know if this has work for you.

Thanks.

Thanks Prasant.
I updated the wp-config.php file as directed, but it doesn’t seem to have corrected the problem.

Are you still getting a content failed to save error?

Hello There,

I was able to save the changes now without any issues. Please understand that v2 elements has their own individual and default styles. These v2 elements does not follow the global styles. You can change it in the v2 elements settings if you want to change the color, font size, and any other attribute to the element because they are independent with the theme settings and other elements.

If you want to force apply a css, you must add a v2 element class or ID so that the custom style you may have added will be applied to the element.

Hope this helps.

Hi RueNel -

The problem is that the v2 element settings aren’t working. I can add a new v2 element to the page, but changing the settings in the content builder doesn’t seem to do anything.

I did a quick screen recording of the problem; you’ll notice that modifying the element settings doesn’t change the element at all:

Hello There,

Thanks for sending the video. Yes I can replicate the issue in your site. I change the color settings and it is not saving on the page. It looks as if all the settings were not displayed in your front end.

After further investigation, it turns out that you have removed the custom generated css and this is the reason why all the v2 elements is not working. You added this functions in your child theme:

function remove_inline_customizer_css($value='')
{
	remove_action('wp_head','x_output_generated_styles', 9998);
}

add_action('after_setup_theme', 'remove_inline_customizer_css');

This function removes all the css generated output style and v2 element styling is not longer working.

If you remove this function, v2 element styling should be working again.

Thanks - this worked. Really appreciated your help figuring it out.

You’re welcome! Thanks for letting us know that it has worked for you.
We’re just glad we were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.