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

%%order_class%% bug on Custom Post Type #190

Open
mrkenng opened this issue Nov 3, 2018 · 9 comments

Comments

@mrkenng
Copy link

commented Nov 3, 2018

Problem Description

When using custom post type with Visual builder, seems like %%order_class%% is generating the wrong css output that causes not to render properly due to that.

Only custom modules are having this issue.

e,g
.et-db .hello_world_0 #et-boc h1.et_pb_module_header
and it should be
.et-db #et-boc .hello_world_0 h1.et_pb_module_header

the only custom post type is working is the Divi built-in project which works very well with custom modules which is generating without the .et-db #et-boc

.hello_world_0 h1.et_pb_module_header
Any idea on this?

@mrkenng

This comment has been minimized.

Copy link
Author

commented Nov 3, 2018

Also noticed that the style-cpt.css is over writing font sizes on header/title for custom modules.

e.g

.et-db #et-boc .et_pb_column_1_3 h1, .et-db #et-boc .et_pb_column_1_4 h1, .et-db #et-boc .et_pb_column_1_5 h1, .et-db #et-boc .et_pb_column_1_6 h1, .et-db #et-boc .et_pb_column_2_5 h1

@atanas-angelov-dev

This comment has been minimized.

Copy link

commented Nov 5, 2018

Hi @mrkenng ,

Could you please share your the field configuration which produces the incorrect selector?

@mrkenng

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

Hi @atanas-angelov-dev

The font field. I tested out I think quite alot of custom modules out there and all of them are having same issue on Custom Post Type.

public function get_advanced_fields_config() { return array( 'fonts' => array( 'content' => array( 'label' => esc_html__( 'Content', 'et_builder' ), 'css' => array( 'main' => '%%order_class%% .divi-content', ), 'font_size' => array( 'default' => '14px', ), 'line_height' => array( 'default' => '1em', ), 'letter_spacing' => array( 'default' => '0px', ), ), ), ); }

@atanas-angelov-dev

This comment has been minimized.

Copy link

commented Nov 5, 2018

@mrkenng with that snippet the result I get is this:
.et-db #et-boc .mycm_foobar_module_0 .divi-content
which is correct (mycm_foobar_module is my test create-divi-extension module).

Could you please confirm you are on the latest version of Divi/Divi Builder? If yes, then the best course would be to create a minimal repro case - a blank create-divi-extension with only enough code to reproduce the issue so that we can investigate.

@mrkenng

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

@mrkenng

This comment has been minimized.

Copy link
Author

commented Nov 5, 2018

@atanas-angelov-dev Take a look at this video https://www.useloom.com/share/7f04cfaace7143a692ed58ea3ec91511
A clean installation of Divi and WordPress as well as the new created plugin from create-divi-extension

I'm using a quick method to create custom post type using a plugin for this purpose.

helloworld.zip

Attached is the both JSX and PHP and the screenshot of the wrong selector.

screenshot 2018-11-06 at 12 08 02 am

@atanas-angelov-dev

This comment has been minimized.

Copy link

commented Nov 6, 2018

I was able to reproduce the issue now so I'm marking this as a bug - thanks @mrkenng !

Developer Notes $outside_builder in PHP (there's an equivalent variable in JSX) incorrectly matches the order class as outside of the builder when prefixing selectors.
@mrkenng

This comment has been minimized.

Copy link
Author

commented Nov 7, 2018

Thanks! Hope to see this fixed in upcoming version or next 😀

@mrkenng

This comment has been minimized.

Copy link
Author

commented May 29, 2019

Hello @atanas-angelov-dev Just wonder if there's any update on this? Recently, i found out that using non-divi theme with Divi Builder plugin have such issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.