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

'elementor/element/post/document_settings/after_section_start', Action stopped working from 2.7 #9080

Open
latheeshvmv opened this issue Sep 15, 2019 · 8 comments

Comments

@latheeshvmv
Copy link

commented Sep 15, 2019

Description

add_action('elementor/element/post/document_settings/after_section_start', this was all good till 2.68 . But after this is not working.

Steps to reproduce

add_action('elementor/element/post/document_settings/after_section_start', 'function_to_test', 20 , 2 );

function_to_test(\Elementor\Core\DocumentTypes\Post $page){
$page->start_controls_section(
			'content_section',
			[
				'label' => __( 'Content', 'plugin-name' ),
				'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
			]
		);

		$page->add_control(
			'widget_title',
			[
				'label' => __( 'Title', 'plugin-domain' ),
				'type' => \Elementor\Controls_Manager::TEXT,
				'default' => __( 'Default title', 'plugin-domain' ),
				'placeholder' => __( 'Type your title here', 'plugin-domain' ),
			]
		);

		$page->end_controls_section();
}

Isolating the problem

  • [x ] This bug happens with only Elementor plugin active (and Elementor Pro).
  • [x ] This bug happens with a default WordPress theme active.
  • [x ] I can reproduce this bug consistently using the steps above.
@latheeshvmv latheeshvmv changed the title 'elementor/element/post/document_settings/after_section_start', Action stopped working from 2.7 'elementor/element/post/document_settings/after_section_start', Action stopped working after 2.7 Sep 15, 2019
@latheeshvmv latheeshvmv changed the title 'elementor/element/post/document_settings/after_section_start', Action stopped working after 2.7 'elementor/element/post/document_settings/after_section_start', Action stopped working from 2.7 Sep 15, 2019
@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 15, 2019

i noticed that do_action( 'elementor/documents/register_controls', $this ); works on the 2.7 but not on 2.68. No fallbacks? Please keep the filters and actions intact

@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 15, 2019

Something is really wrong add_action('elementor/element/wp-post/document_settings/after_section_start' seems to be the new one now ..is wp the prefix?

image

after changing the settings-> page refreshes and then setting become empty and I have to click the setting again all happening on 2.7 update

@arielk arielk added the bug label Sep 15, 2019
@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 18, 2019

Any update on this bug? The action issue seems to be got fixed by latest version but the empty settings problem sill there. As the screen refreshes the settings become empty

@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

is there any changes to

  elementor.settings.page.addChangeCallback( 'ggowl_d_custom_post_selector', function( newValue ) {
            elementor.saver.update( {
                onSuccess: function() {
                    elementor.reloadPreview();
                    elementor.once( 'preview:loaded', function() {
                        elementor.getPanelView().setPage( 'page_settings' );
                    } );
                }
            } );
        } );

@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 19, 2019

elementor.getPanelView().setPage( 'page_settings' ); this results in the problem i think

@VadymPogorelov

This comment has been minimized.

Copy link

commented Sep 24, 2019

This is because the developers have once again changed the name of the element (panel) with Page Settings: first it was called 'page-settings', then 'post', now 'wp-post'.
I have been developing themes for WordPress for many years and worked with different Page Builders (such as Visual Composer, Site Origin Panels, King Composer) and none of them allowed themselves to change the rules of the game so often! I wish the developers of "Elementor" took into account that they do not write a usual plugin. They write a Page Builder, for which other developers will write addons. And with each such change of names that are used in actions and filters or names and class structures, they doom many other developers to problems with clients who suddenly have something stopped working and urgent release of updates to their themes and plugins due to lost compatibility! Over several years of use WPBakery PageBuilder (aka Visual Composer) we haven't been as many forced updates, how much we had to do over the past year, the use of Elementor!
We do not in any way regret the transition - Elementor is really the best PageBuilder that is on the market today, but we would like its creators to pay more attention to backward compatibility when releasing new updates.
I apologize for my English, but I hope I will understand and hear the developers of "Elementor".

@VadymPogorelov

This comment has been minimized.

Copy link

commented Sep 24, 2019

And until for compatibility with different versions was in Elementor I forced to do so:

// Add tab with theme-specific Page Options to the Page Settings
//---------------------------------------------------------------
if ( ! function_exists( 'basekit_elm_add_page_options' ) ) {
	add_action( 'elementor/element/after_section_end', 'basekit_elm_add_page_options', 10, 3 );
	function basekit_elm_add_page_options( $element, $section_id, $args ) {
		if ( is_object( $element ) ) {
			$el_name = $element->get_name();
			if ( in_array( $el_name, array( 'page-settings', 'post', 'wp-post' ) ) && 'section_page_style' == $section_id ) {
				...
@latheeshvmv

This comment has been minimized.

Copy link
Author

commented Sep 24, 2019

@VadymPogorelov Yeah I agree!. They have marked it as a bug but still no update, It's been 10 days. No wonder why people are moving to Divi. Very good support and coding standards, documentation. Elementor Developers has follow some standards if they want to grow.

They have another action for that but there is some bug with elementor.getPanelView().setPage( 'page_settings' );

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