Forum Replies Created

Viewing 30 posts - 1 through 30 (of 488 total)
  • Author
    Posts
  • @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: disabled

    That information says your installation is out of date.

    @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.

    in reply to: New Update (4.2.6) broke my videos #924643

    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.

    in reply to: New Update (4.2.6) broke my videos #924635

    @lawelite this CSS rule is already active from the shortcode.js in Enfold 4.2.6.

    in reply to: New Update (4.2.6) broke my videos #924516

    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 8 months, 2 weeks ago by  mensmaximus.
    in reply to: Error saving event – Events Calendar Pro + Event Tickets Pro #918102
    This reply has been marked as private.

    This 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 ;-))

    I don’t see an entry in the changelog regarding this issue

    Issue 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/ (Purchase code hidden if logged out) -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.

    @kriesi

    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.

    @TJ i filled the report on behalf of my customer two weeks ago https://theeventscalendar.com/support/forums/topic/ (Purchase code hidden if logged out) -screen/ and I am afraid Tribe is reffering to my report for the known bug :-(

    Getting 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=edit

    Enfold:
    [_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_events

    But 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 saving

    I have the same issue with a customer and investigate since 10 hours. It is an Enfold issue but it is not the Calendar Integration.

    in reply to: update now white screen #900060

    @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.

    The filter ‘avf_header_setting_filter’ maybe helpfull.

    in reply to: comumn issue – maybe wpml #899694

    This is what i meant. Because I don’t use it I could not recall the name ;-)

    in reply to: comumn issue – maybe wpml #899686

    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?

    in reply to: Latest Theme Update – Site has crashed #899680

    @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 10 months ago by  mensmaximus.
    in reply to: comumn issue – maybe wpml #899675

    @michaelwalch I just visited the site and can’t see any layout issues. Have you cleared any cache (browser and plugins if applicable)?

    in reply to: Latest Theme Update – Site has crashed #899666

    @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.

    in reply to: PHP 7.2.1 issue on enfold 4.2 #899663

    @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.

    in reply to: Site down since update #899652

    @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.

    in reply to: Problem with latest version #899278

    @kahil I dont pat on my back. I just help people to solve the issue and many are thank full. You just yell ‘MATURE issue’ instead of sharing your knowledge. Have a nice day.

    in reply to: Problem with latest version #898905

    @kahil my answer wasn’t meant to be rude. Sorry if I offended you. But as I can read from your answer my hint solved your issue. You are welcome.

    in reply to: Problem with latest version #898882

    @kahil It is simply not the duty of a theme developer to address the laziness of users. You are using an outdated version of PHP that has been retired a long time ago. Just log in to your providers customer control panel and switch to at least PHP 7.0. This will address the issue in this thread.

    in reply to: Benötige eine alte Enfold Version 3.5.1 #898806

    Hast Du kein Backup Deiner Seite? Der Sprung von 3.5.1 auf 4.2.1 ist gewaltig. Warum wurde so lange kein Update gemacht? Welche PHP Version ist im Einsatz?

    in reply to: Need Enfold 4.2 #898804

    If your PHP Version is smaller than 5.6 update to at least 7.0

    in reply to: Problem with latest version #898802

    @jpollackphoto I bet your PHP version is very old and unsupported these days. The error you get is typically pre PHP 5.6. WordPress recommends PHP 7.2. You should at least have 7.0 installed.

    in reply to: is there a way to hide some menu-items onclick a button #890859

    @guenni007 would you mind to contact me directly? Talking in German might be easier and way faster than posting. We can use skype as well. You will find all my contact information on my homepage. I am happy to help one of the most valuable participants on this forum without cost (x-mas gift :-))

    in reply to: is there a way to hide some menu-items onclick a button #890828

    With jquery you simply check $(event.target). In your case this is the button. Take the button class to be stored in the cookie. Now you can conditionally display A or B.

    in reply to: is there a way to hide some menu-items onclick a button #890702

    I would probably create a second menu location and append it to the main menu. Either by overloading the helper-main-menu.php or using the ava_after_main_menu action hook. The second menu would represent the B items while the standard menu would show the A items. I would load the second menu hidden (css) and use a jquery script to set a cookie to indicate the currently displayed menu. Using jquery toggle I then would be able to hide the primary menu and unhide the secondary menu while setting the corresponding cookie. On page load i could use the avf_main_menu_nav filter to hide the primary menu in case the secondary menu has to be loaded in case the A/B menu items should be inherited by other pages.

Viewing 30 posts - 1 through 30 (of 488 total)