we have following issue with Elementor 3.x:
for our WordPress theme we need to change a couple of default Elementor’s settings during the theme’s activation. In Elementor 2.9.14 we have used following code for this:
function my_theme_activate_elementor_settings() {
$cpt = get_option('elementor_cpt_support') ? get_option('elementor_cpt_support') : array();
$cpt = array_merge($cpt, array('post', 'page', 'my_title', 'my_footer', 'product'));
update_option('elementor_cpt_support', $cpt);
update_option('elementor_disable_color_schemes', 'yes');
update_option('elementor_disable_typography_schemes', 'yes');
update_option('elementor_container_width', '1170');
update_option('elementor_stretched_section_container', '#main');
update_option('elementor_page_title_selector', '.page-title-block h1');
update_option('elementor_global_image_lightbox', 'no');
}
However, starting from Elementor 3.x you have moved the settings container_width, stretched_section_container, page_title_selector, global_image_lightbox from wp options to meta field _elementor_page_settings of Default Kit template.
And here is our question: how we can change this settings during the theme activation now?
Scenario 1: the theme is being installed AFTER Elementor’s installation (Default Kit template is already available during the theme’s activation).
Scenario 2: the theme has been installed BEFORE Elementor’s installation (No Default Kit template available during the theme’s acativation).
]]>I’ve noticed since the recent update that the photographs I’ve inserted using the image gallery block are now incorrectly sized and escaping from their border/edge of the box.
Would anyone be able to give me some pointers on how to fix this problem? I’ve tried all the delete cache tricks and rolling back the update, but nothing has worked so far.
This is my system info:
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: MariaDB Server v10.3.24
PHP Version: 7.3.20
PHP Max Input Vars: 1000
PHP Max Post Size: 64M
GD Installed: Yes
ZIP Installed: No
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 5.5
Site URL: https://explorecornwall.org
Home URL: https://explorecornwall.org
WP Multisite: No
Max Upload Size: 64 MB
Memory limit: 400M
Permalink Structure: /%postname%/
Language: en-GB
Timezone: 0
Debug Mode: Inactive
== Theme ==
Name: New Blog
Version: 1.2.8
Author: www.postmagthemes.com
Child Theme: No
== User ==
Role: administrator
WP Profile lang: en_GB
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36
== Active Plugins ==
Akismet Anti-Spam
Version: 4.1.6
Author: Automattic
Elementor
Version: 2.9.14
Author: Elementor.com
FileBird Lite
Version: 4.0.6
Author: Ninja Team
GDPR Cookie Consent
Version: 1.9.0
Author: WebToffee
Google Analytics for WordPress by MonsterInsights
Version: 7.12.2
Author: MonsterInsights
Jetpack by WordPress.com
Version: 8.8.2
Author: Automattic
My Simple Space
Version: 1.2.8
Author: Michael Mann
Really Simple SSL
Version: 3.3.5
Author: Really Simple Plugins
SiteOrigin CSS
Version: 1.2.9
Author: SiteOrigin
Widget Importer & Exporter
Version: 1.6
Author: ChurchThemes.com
WIP Custom Login
Version: 1.1.7
Author: ThemeinProgress
WIP WooCarousel Lite
Version: 1.0.9.6
Author: ThemeinProgress
WordPress Importer
Version: 0.7
Author: wordpressdotorg
WP Fastest Cache
Version: 0.9.0.9
Author: Emre Vona
WPForms Lite
Version: 1.6.2.2
Author: WPForms
WP Rollback
Version: 1.7.1
Author: Impress.org
Yoast SEO
Version: 14.8.1
Author: Team Yoast
== Elements Usage ==
wp-post : 32
google_maps : 28
heading : 46
image : 154
image-carousel : 19
image-gallery : 79
tabs : 39
text-editor : 318
wp-page : 2
html : 1
image : 2
text-editor : 2
== Log ==
Log: showing 20 of 392020-08-25 17:34:22
JS: showing 2 of 2JS: 2020-06-16 18:57:23 [error X 4][https://explorecornwall.org/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.9.12:31:166757] Cannot read property \’get\’ of undefined
JS: 2020-08-28 12:11:03 [error X 2][https://explorecornwall.org/wp-content/plugins/elementor/assets/js/editor.min.js?ver=3.0.3:2:470394] Cannot read property \’document\’ of undefined
PHP: showing 1 of 1PHP: 2020-08-29 15:31:05 [error X 2][/home/explorec/public_html/wp-content/plugins/elementor/includes/plugin.php::612] Uncaught Error: Class ‘Elementor\Core\App\App’ not found in /home/explorec/public_html/wp-content/plugins/elementor/includes/plugin.php:612
Stack trace:
#0 /home/explorec/public_html/wp-content/plugins/elementor/includes/plugin.php(514): Elementor\Plugin->init_components()
#1 /home/explorec/public_html/wp-includes/class-wp-hook.php(287): Elementor\Plugin->init(”)
#2 /home/explorec/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#3 /home/explorec/public_html/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#4 /home/explorec/public_html/wp-settings.php(546): do_action(‘init’)
#5 /home/explorec/public_html/wp-config.php(90): require_once(‘/home/explorec/…’)
#6 /home/explorec/public_html/wp-load.php(37): require_once(‘/home/explorec/…’)
#7 /home/explorec/public_html/wp-admin/admin-ajax.php(22): require_once(‘/home/explorec/…’)
#8 {main}
thrown [array (
‘trace’ => ‘
#0: Elementor\Core\Logger\Manager -> shutdown()
‘,
)]
one more bug in 3.0 discovered. After adding repeater control to column settings in Elementor 3.0 we get js errors when trying to remove/delete widgets from the column (the same happens with section as well).
How to reproduce:
we have made a fresh new install with a simple plugin containing following code:
use Elementor\Controls_Manager;
add_action( ‘elementor/element/column/section_style/before_section_end’, ‘my_test_repeater’, 10, 2 );
function my_test_repeater( $element, $args ) {
$element->add_control(
‘my_test_title’,
[
‘label’ => ‘Test Title’,
‘type’ => Controls_Manager::HEADING,
]
);
$element->add_control(
‘my_width’,
[
‘label’ => ‘Width’,
‘type’ => Controls_Manager::NUMBER,
]
);
$repeater = new \Elementor\Repeater();
$repeater->add_control(
‘width’,
[
‘label’ => ‘Width’,
‘type’ => Controls_Manager::NUMBER,
]
);
$element->add_control(
‘my_test_repeater’,
[
‘type’ => Controls_Manager::REPEATER,
‘fields’ => $repeater->get_controls(),
‘title_field’ => ‘Test Repeater’
]
);
}
This plugin adds repeater control to column settings.
After adding a new section/column with some widgets to the page and by trying to remove / delete this widgets we get following js errors in console:
https://prntscr.com/u66ypd
common.min.js?ver=3.0.1:2 TypeError: Cannot set property children of #<Container> which has only a getter
And widgets cannot be removed – nothing happens, widgets remain in column.
Please be so kind to fix this asap. Thank you