Forum Replies Created
-
AuthorPosts
-
December 11, 2020 at 12:22 pm in reply to: Problems with Enfold in combination with WordPress 5.6 #1266517
The jQuery errors occur throughout the whole backend. Enfold was one of the best themes. Unfortunately the development can not keep up with changes in WordPress and now causes one issue after the other. And please stop asking your users for error descriptions or screenshots. Just use the developer console yourself and see all the errors yourself.
This issue is caused by Enfold loading some assets on some WooCommerce Admin Screens (e.g. Dashboard, Orders, Coupons) without solved dependencies.
The assets in question are:
/enfold/config-templatebuilder/avia-template-builder/assets/js/avia-tab-section.js /enfold/config-templatebuilder/avia-template-builder/assets/js/avia-table.js /enfold/config-templatebuilder/avia-template-builder/assets/js/avia-tab-toggle.js /enfold/config-gutenberg/js/avia_gutenberg.js /enfold/config-gutenberg/css/avia_gutenberg.css /enfold/config-templatebuilder/avia-template-builder/assets/js/avia-media.js
Theese javascript and css files have the following dependencies:
avia_builder_js avia_modal_js avia-modal-style avia-builder-style avia_element_js
The problem occurs because the dependencies don’t get loaded on the WooCommerce Admin Screens. Therefore the handles are not registered.
Enfold has always loaded those assets in various places where they are not needed at all (i reported that at least two times). With version 4.2 WooCommerce introduced a script preloader which checks for dependencies.Enfold has either to stop loading assets where they are not needed or to make sure the dependencies get loaded if an asset is needed.
As for now the only thing you can do is to switch of debug mode to get rid of the php notices. But you have to life with tons of error log entries until Enfold fixes the bug.
Can we please get a better changelog management. 4.6.4 is available but the changelog still does not show the changes for 4.6.4:
https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990?In this threads opening post you promise to post upcoming changes for 4.6.4. but you never did.
The version.txt file in the full-download zip at themeforest is version 4.6.3.
Updating without knowing what has changed is like playing russian roulette.
Please get your changelog / upcoming changes workflow fixed.
- This reply was modified 5 years ago by mensmaximus.
Hi Ismael
thank you for your reply. I already thought this might be the reason but e.g. layerslider resources or google maps resources should not be loaded if you don’t use the elements. I think the list should be reviewed carefully.
Kind regards
Michael
Thank you. Your second post came in while i was posting my answer :-)
Hi Günter, long time since we talked. Hope you are well. I had no time to debug the issue. It just came to my attention while working on a site. I think it is not a big deal and Kriesi and his team will fix it in 4.6.4.
@samurai_666 your best bet is to install the classic editor plugin and activate it before upgrading to WordPress 5.0. If you do it this way you will have no (known) issues with using Enfold and the Layout Architect.
@neverstar just activate the classic editor plugin and all is good.
@sd142ppr as for now (dec, 6th, 2018) you have to enable the classic editor plugin if you want to use the enfold layout editor. If you activate gutenberg you wont see the advanced layout editor at all. If your site is mission critical I advice to wait with an update to wp5 until january 2019. While writing this lines there are already 163 known issues tagged with wordpress 5.0.1. I won’t be surprised to see the first update (5.0.1) before x-mas.
Regards
MichaelP.S.
5 Min after writing this I got an update notice for enfold 4.5.1. With 4.5.1 you con’t need the classic editor plugin. The advaced layout editor button now shows up on the edit screen as usual even with gutenberg enabled.- This reply was modified 6 years ago by mensmaximus.
May 1, 2018 at 3:24 pm in reply to: Please read – Regarding Wordfence LayerSlider warning on Enfold 4.0.3 #949557@extraeyes I don’t insult you. I tried to help. So calm down. The information provided comes from your websites sourcecode:
Debugging Info for Theme support:
Theme: Enfold
Version: 3.3.2
Installed: enfold
AviaFramework Version: 2.2
AviaBuilder Version: 0.8
ML:256-PU:44-PLA:6
WP:4.7.3
Updates: disabledThat information says your installation is out of date.
April 30, 2018 at 10:33 pm in reply to: Please read – Regarding Wordfence LayerSlider warning on Enfold 4.0.3 #949247@extraeyes first of all disable w3 total cache. Second update your theme to the latest version. You are running on 3.3.2 which is heavily outdated. Before you do make a backup! Last but not least if you rely on your website for business you should have an wordpress expert at hand.
I have removed my video now. If this was a new bug I would say ‘can happen’. But this video issue is getting worse with each new version. I am tiered of debugging that problem again and again.
@LawElite this CSS rule is already active from the shortcode.js in Enfold 4.2.6.
Local mp4 files used for background videos on color section do not work either. Ajax loader image spins forever and mejs-container shows as small grey row.
- This reply was modified 6 years, 9 months ago by mensmaximus.
February 27, 2018 at 12:01 am in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #918102This reply has been marked as private.February 22, 2018 at 7:25 am in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #915925This would be absolutely inappropriate. It neither describes the issue nor does it contain any props to the person who found the core reason and provided a solution. (me ;-))
February 22, 2018 at 7:10 am in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #915921I don’t see an entry in the changelog regarding this issue
February 9, 2018 at 11:40 pm in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #910437Issue isolated.
tl;dr
1. Open /enfold/config-templatebuilder/avia-template-builder/php/meta-box.class.php
2. Locate function handler_wp_insert_post_data near line 223
3. Locate the code block if( ‘revision’ == $data[‘post_type’] ) { return $data; } within function handler_wp_insert_post_data
4. Add the following code block after the code block located in #3:/* * Temporary fix for Enfold triggering the non catchable error -1 * after executing the check_ajax_referer (wordpress core function) * if a tribe event has a ticket attached (woocommerce product). * * @see https://kriesi.at/support/topic/error-saving-event-events-calendar-pro-event-tickets-pro/ * * @todo Kriesi needs to implement a permanent fix */ if( $_POST['post_type'] == 'tribe_events' && $postarr['post_type'] == 'product' ) { $product_id = $postarr['ID']; $ticket_product_ids = isset( $_POST['tribe-tickets']['list']) ? array_keys($_POST['tribe-tickets']['list']) : array(); if( in_array( $product_id, $ticket_product_ids ) ) { return $data; } }
5. Save the file. You tribe events with attached tickets will save again.
Short description
Enfold introduced the function handler_wp_insert_post_data() in version 4.2.1. The call to check_ajax_referer() from within returns -1
Detailed description
The function handler_wp_insert_post_data() introduced in Enfold version 4.2.1 cares about Advanced Layout Builder Metaboxes attached to posts/pages. Posts/pages without ALB metaboxes are ignored. By default the posttype tribe_events does not support Enfold metaboxes and gets ignored by handler_wp_insert_post_data(). The plugin Tribe Event Tickets Plus allows to add tickets to events using WooCommerce. The posttype product used by WooCommerce supports Enfold metaboxes by default and gets handled by handler_wp_insert_post_data(). This is where the issue stems from.
Saving an event with attached ticket will trigger the WordPress core filter wp_insert_post_data two times. The first call is for the event (tribe_events). The second call is for the ticket (product). The function handler_wp_insert_post_data() is hooked into the filter wp_insert_post_data and parses both save actions. The first call is ignored because the posttype tribe_events has no ALB metaboxes attached. The second call gets processed because the posttype product has ALB metaboxes attached. But because the save action has been initiated from an event (tribe_events) the nonce needed to pass the call to check_ajax_referer() is missing. Therefore the result of check_ajax_referer() is false and because check_ajax_referer() is set to die by default ($die = true) instead of returning the result WordPress dies and returns -1.
Solution
As a quick fix you can modify the function handler_wp_insert_post_data() in class MetaBoxBuilder as described above. What it does it to check the original posttype where the save action has been invoked from (tribe_events) and the posttype passed to handler_wp_insert_post_data(). If the original posttype is tribe_events and the posttype seen in $postarr is product a second check is performed. It will test whether the ID of the product matches any of the ticket (product) IDs attached to the event. If this is true the processing of function handler_wp_insert_post_data() is aborted and the original data are returned.
Another solution might be to add ALB metaboxes to the posttype tribe_events using the filter avf_builder_boxes. However I did not test it because this won’t solve the root cause of the issue.
A permanent fix must work for tribe events with attached tickets regardless whether ALB metaboxes are attached or not. One way would be to introduce a new filter before calling check_ajax_referer() and to execute check_ajax_referer() conditionally. This would allow to move the logic of my fix into the config.php files of your plugin integrations.
February 9, 2018 at 5:28 pm in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #910318@TJ i filled the report on behalf of my customer two weeks ago https://theeventscalendar.com/support/forums/topic/adding-new-event-causes-whites-screen/ and I am afraid Tribe is reffering to my report for the known bug :-(
February 9, 2018 at 11:45 am in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #910208Getting closer to it ;-)
Twenty Seventeen:
If you hook into wp_insert_post_data to dump data for debugging purpose you will see wp_insert_post_data is triggered twice if a woocommerce product (the ticket) is attached to event.Enfold:
The second call to wp_insert_post_data for the product (the ticket) is not executed. Therefore my strong guess is the error happens during the first call to wp_insert_post_data which returns -1.Comparing the $_POST data there are 3 main differences between Enfold and Twenty Seventeen while saving the event:
Twenty Seventeen:
[_wp_http_referer] => /wp-admin/post.php?post=7245&action=edit&message=1
[referredby] => https://domain.tld/wp-admin/post.php?post=7245&action=edit
[_wp_original_http_referer] => https://domain.tld/wp-admin/post.php?post=7245&action=editEnfold:
[_wp_http_referer] => /wp-admin/post.php?post=7245&action=edit
[referredby] => https://domain.tld/wp-admin/edit.php?post_type=tribe_events
[_wp_original_http_referer] => https://domain.tld/wp-admin/edit.php?post_type=tribe_eventsBut there are no differences in the query object (global $wp_query).
The big question:
– Does Enfold change something that Events Tickets Plus needs to save the product data
or
– Does Events Tickets Plus modify something to prevent Enfold from savingFebruary 8, 2018 at 11:31 pm in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #910041I have the same issue with a customer and investigate since 10 hours. It is an Enfold issue but it is not the Calendar Integration.
@cnovery please update your PHP version to at least 5.6. Better to 7.1. Most hosting providers allow switching the PHP version from their customer control panel.
January 19, 2018 at 2:14 pm in reply to: Different logo on different-pages when using transparent header #899702The filter ‘avf_header_setting_filter’ maybe helpfull.
This is what i meant. Because I don’t use it I could not recall the name ;-)
Ah, I was looking on the frontpage (got there by changing the language in the top bar). Looks strange. Never had that issue before. Have you disabled the WPML Visual Editor Translater?
@ruffidea yes the effect would be immediate (if the hosting provider has no delay). Maybe an other plugin now has an issue with PHP7. Can you switch to PHP 5.6?
- This reply was modified 6 years, 11 months ago by mensmaximus.
@michaelwalch I just visited the site and can’t see any layout issues. Have you cleared any cache (browser and plugins if applicable)?
@ruffidea please update your PHP version to at least 5.6. Better to 7.1. Most hosting providers allow switching the PHP version from their customer control panel.
@crtdude the PHP 7.2.x bug tracker still lists a lot off issues. To be on the save side you might consider using PHP 7.1 for now. Many plugins dont work with 7.2.x and I guess it will take some time for the developers to jump on that train.
@yigit you would have to downgrade to PHP 5.4 to reproduce the issue. Other than stated by some participants you don’t need PHP 7.x to solve a ‘Can’t use function return value in write context’ issue. PHP 5.5 would theoretically be enough. However since 5.5 is EOL and 5.6 as well as 7.0 will be EOL end of 2018 it is recommended to upgrade PHP to 7.1.
The ‘Can’t use function return value in write context’ issue stems from the way you use empty(). Prior to PHP 5.5 only variables (strings) could be used within empty(). Starting with PHP 5.5 functions can be used. Enfold tests whether a trimmed array element is empty. Trim() is a function and therefore PHP 5.4 fails. PHP 5.4 is EOL since nearly 2.5 years. Unfortunately according to wordpress.org 25% of all WordPress installation still run on PHP 5.4 and smaller!
If I would be Christian I would disallow the theme activation if PHP is smaller than 5.6. For PHP less than 7.1 I would throw a warning notice about the upcoming end of life and suggest an update. If the top ten theme developers would form an alliance against outdated PHP versions such issues would never happen again. WordPress (the core development team) seems not brave enough to take this road.
-
AuthorPosts