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

Action 'elementor/element/post/document_settings/after_section_end' doesn't work with 2.7.0 and 2.7.1 #9060

Closed
5 tasks done
stannvanheusden opened this issue Sep 11, 2019 · 4 comments
Assignees
Labels
bug Indicates a bug with one or multiple components.

Comments

@stannvanheusden
Copy link

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

My plugin extends Elementor by adding Page Settings for SEO. Since 2.7.0 and 2.7.1 the following code doesn't seem to work anymore:


function est_add_elementor_page_settings_controls( $page ) {
	
	$page->start_controls_section(
			'seo_section',
			[
				'label' => __( 'SEO', 'elementor' ),
				'tab' => \Elementor\Controls_Manager::TAB_SETTINGS,
			]
		);
	$page->add_control(
		'_est_seo_focuskw',
		[
			'label' => __( 'Keywords', 'elementor' ),
			'type' => \Elementor\Controls_Manager::TEXT,
			'classes' => 'est-keywords',
		]
	);
	$page->add_control(
		'_est_seo_title',
		[
			'label' => __( 'SEO Title', 'elementor' ),
			'type' => \Elementor\Controls_Manager::TEXT,
		]
	);
	$page->add_control(
		'_est_seo_metadesc',
		[
			'label' => __( 'Meta description', 'elementor' ),
			'type' => \Elementor\Controls_Manager::TEXTAREA,
		]
	);

	// $page->add_control(
	//	'_est_seo_kd',
	//	[
	//		'label' => __( 'Keyword Density', 'elementor' ),
	//		'type' => \Elementor\Controls_Manager::RAW_HTML,
	//		'raw' => '<hr/><span class="kd">Loading...</span>',
	//		'content_classes' => 'kd',
	//	]
	// );
	$page->end_controls_section();
}

add_action( 'elementor/element/post/document_settings/after_section_end', 'est_add_elementor_page_settings_controls' );

It returns nothing anymore, while in the previous version it showed a SEO settings section under the general tab of Page Settings.

I also tried to fix this issue using the exact code from the developer docs, but that doesn't seem to work anymore aswel: https://developers.elementor.com/elementor-document-settings/

Steps to reproduce

Make sure to have Elementor 2.6.8 installed first.

  1. Install the following plugin: https://downloads.wordpress.org/plugin/easy-seo-toolkit.zip
  2. Go to a page built with Elementor and go to Page Settings. You will see a "SEO" section
  3. Update to the latest Elementor version. You will see that the section is gone.

Isolating the problem

  • This bug happens with only Elementor plugin active (and Elementor Pro).
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Environment

System Info ```

== Server Environment ==
Operating System: Linux
Software: nginx/1.16.1
MySQL version: MariaDB Server v5.5.59-MariaDB-38.11
PHP Version: 7.2.22
PHP Max Input Vars: 1000
PHP Max Post Size: 8M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected

== WordPress Environment ==
Version: 5.2.3
Site URL: https://easyseotoolkit.com
Home URL: https://easyseotoolkit.com
WP Multisite: No
Max Upload Size: 2 MB
Memory limit: 256M
Permalink Structure: /%year%/%monthnum%/%postname%/
Language: en-US
Timezone: 0
Debug Mode: Inactive

== Theme ==
Name: Hello Elementor
Version: 2.2.0
Author: Elementor Team
Child Theme: No

== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36

== Active Plugins ==
Better Search Replace
Version: 1.3.3
Author: Delicious Brains

Easy SEO toolkit
	Version: 0.5.3
	Author: stanleyvanheusden

Elementor
	Version: 2.6.8
	Author: Elementor.com

Elementor Pro
	Version: 2.5.14
	Author: Elementor.com

== Log ==
:
Log: showing 10 of 102019-09-11 09:06:35 [info] elementor::elementor_updater Started
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_0_rename_document_types_to_wp Start
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_0_rename_document_types_to_wp Finished
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_1_remove_old_usage_data Start
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_1_remove_old_usage_data Finished
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_1_recalc_usage_data Start
2019-09-11 09:06:35 [info] Elementor/Upgrades - _v_2_7_1_recalc_usage_data Finished
2019-09-11 09:06:35 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor',
'from' => '2.6.8',
'to' => '2.7.1',
)]
2019-09-11 09:06:35 [info] Elementor data updater process has been queued. [array (
'plugin' => 'Elementor',
'from' => '2.6.8',
'to' => '2.7.1',
)]
2019-09-11 09:08:01 [info] Elementor data updater process has been completed. [array (
'plugin' => 'Elementor Pro',
'from' => '2.6.2',
'to' => '2.6.5',
)]

</details>
@riadcitaku
Copy link

I confirm that the action below doesn't work either.

elementor/element/post/document_settings/before_section_end

@beratgashi
Copy link

Yep that's true it doesn't work at all.

@matipojo matipojo self-assigned this Sep 15, 2019
@arielk arielk added the bug Indicates a bug with one or multiple components. label Sep 15, 2019
@beratgashi
Copy link

beratgashi commented Sep 16, 2019

They fixed it after writing them on twitter they told me to let you now that they fixed it,

the action elementor/element/post/document_settings/before_section_end is deprecated but we can use the:
elementor/element/wp-post/document_settings/before_section_end
or
elementor/element/wp-page/document_settings/before_section_end .

@stannvanheusden
Copy link
Author

Great, thanks @beratgashi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates a bug with one or multiple components.
Projects
None yet
Development

No branches or pull requests

5 participants