Viewing 30 results - 1,231 through 1,260 (of 16,891 total)
  • Author
    Search Results
  • #1412537

    Hey antiguanice,
    Enfold Version 4.7.6.3 is not PHP v8 ready, you will need to update to v5.6.3
    unfortunately your version can not be updated automatically in the theme update option, you will need to manually update and then create a new Token in your Theme Forest account to enable future automatic updates.
    While typically most users don’t experience any issues with updating older versions, there is a chance that your customizations may not preform as expected, so I recommend creating a staging site first and test an update on it to check for any issues, and if you find none then update your live site.
    To update your version of Enfold you will need to download the latest installable WP version from your Theme Forest account and upload it to your WordPress ▸ Appearance ▸ Themes ▸ Add Themes ▸ Add New
    WordPress_Appearance_Themes_Add-Themes_Add-New.jpg
    after you choose the zip file and click install, you will see a This theme is already installed message because you are updating, you can continue
    Installing_theme_from_uploaded_file_This_theme_is_already_installed.jpg
    then you will see the Theme updated successfully message.
    Theme_updated_successfully.jpg

    Best regards,
    Mike

    #1412529
    antiguanice
    Participant

    Hi,
    We have a website which has the Enfold Version 4.7.6.3 theme that is on a server running PHP 7.4.33 and the hosting company will be updating it to PHP 8.0 in the next month.
    Please advise whether this theme and associated plugins are compatible with PHP 8.0.

    Thanks,

    #1412220

    Hey mathieu,
    It looks like an error in your child theme functions.php around line 619, try removing the customization in that part in your child theme functions.php and test again.
    Then review your customization to determine how to correct your customization.
    Please note that using the contact form is not appropriate for support questions, please log in to the support forum and open a new thread if you need further assistance.
    If you are unable to login to the support forum because you don’t have a activate support contract, please try going to your Theme Forest account and renew your support and then log in to the support forum and open a new thread.

    Best regards,
    Mike

    #1412198
    mathieu
    Guest

    When i try to edit a page, i get this error on my site, can you help?

    An error of type E_ERROR was caused in line 619 of the file /home/tradoto/public_html/wp-content/themes/enfold-child/functions.php. Error message: Uncaught Error: Call to a member function needs_shipping() on null in /home/tradoto/public_html/wp-content/themes/enfold-child/functions.php:619
    Stack trace:
    #0 /home/tradoto/public_html/wp-includes/class-wp-hook.php(310): patricks_billing_fields(Array)
    #1 /home/tradoto/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
    #2 /home/tradoto/public_html/wp-content/plugins/woocommerce/includes/class-wc-countries.php(1660): apply_filters(‘woocommerce_bil…’, Array, ‘US’)
    #3 /home/tradoto/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php(253): WC_Countries->get_address_fields(‘US’, ‘billing_’)
    #4 /home/tradoto/public_html/wp-content/themes/enfold-child/functions.php(664): WC_Checkout->get_checkout_fields()
    #5 /home/tradoto/public_html/wp-includes/class-wp-hook.php(308): o_woocommerce_confirm_password_checkout(Object(WC_Checkout))
    #6 /home/tradoto/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)
    #7 /home/tradoto/public_html/wp-include

    #1412193

    Mike,

    So i dug further and it’s not a matter of even using it in the content anywhere. Just by virtue of having the plugin (GravityView) installed is causing this error.

    “I don’t see that we can correct this plugin in the theme.” – It’s not a matter of fixing the plugin, it’s about fixing how the theme handles shortcodes from other developers. Enfold’s “balance shortcode” feature is what is throwing the errors. Somehow, however Enfold grabs the available shortcodes it’s trying to balance, it grabs that as one of the available shortcodes. It tries to create a regex from it and fails.

    In class-shortcode-parser.php in balance_shortcode() this is the $shortcodes variable it’s trying to process and dying on. With that you should be able to patch the theme so it handles anomalies like this properly.

    Array
    (
        [0] => wp_caption
        [1] => caption
        [2] => gallery
        [3] => playlist
        [4] => audio
        [5] => video
        [6] => embed
        [7] => expand
        [8] => colomat
        [9] => expandsub1
        [10] => expandsub2
        [11] => expandsub3
        [12] => expandsub4
        [13] => expandsub5
        [14] => expandsub6
        [15] => expandsub7
        [16] => expandsub8
        [17] => expandsub9
        [18] => expandsub10
        [19] => expandsub11
        [20] => expandsub12
        [21] => expandsub13
        [22] => expandsub14
        [23] => expandsub15
        [24] => expandsub16
        [25] => expandsub17
        [26] => expandsub18
        [27] => expandsub19
        [28] => expandsub20
        [29] => expandsub21
        [30] => expandsub22
        [31] => expandsub23
        [32] => expandsub24
        [33] => expandsub25
        [34] => expandsub26
        [35] => expandsub27
        [36] => expandsub28
        [37] => expandsub29
        [38] => gv_note_add
        [39] => gv_entry_link
        [40] => gv_edit_entry_link
        [41] => gv_delete_entry_link
        [42] => year
        [43] => av_privacy_allow_cookies
        [44] => av_privacy_accept_essential_cookies
        [45] => av_privacy_google_tracking
        [46] => av_privacy_google_webfonts
        [47] => av_privacy_google_maps
        [48] => av_privacy_video_embeds
        [49] => av_privacy_google_recaptcha
        [50] => av_privacy_custom_cookie
        [51] => av_privacy_accept_button
        [52] => av_privacy_accept_all_button
        [53] => av_privacy_do_not_accept_button
        [54] => av_privacy_modal_popup_button
        [55] => av_privacy_link
        [56] => av_privacy_cookie_info
        [57] => av_sb_instagram_feed
        [58] => av_leaflet_map
        [59] => av_productgrid
        [60] => av_productlist
        [61] => av_product_button
        [62] => av_product_info
        [63] => av_product_review
        [64] => av_product_tabs
        [65] => av_product_upsells
        [66] => avia_sc_product_meta
        [67] => av_product_price
        [68] => av_productslider
        [69] => gravityform
        [70] => gravityforms
        [71] => wpseo_breadcrumb
        [72] => gravityview
        [73] => gventry
        [74] => gvfield
        [75] => gvlogic
        [76] => gvlogic2
        [77] => gvlogic3
        [78] => gvlogicelse
        [79] => tribe:event-details
        [80] => boxzilla_link
        [81] => av_player
        [82] => av_playlist_element
        [83] => av_blog
        [84] => av_buttonrow
        [85] => av_buttonrow_item
        [86] => av_button
        [87] => av_button_big
        [88] => av_catalogue
        [89] => av_catalogue_item
        [90] => av_chart
        [91] => av_chart_dataset
        [92] => av_codeblock
        [93] => av_one_full
        [94] => av_one_half
        [95] => av_one_third
        [96] => av_two_third
        [97] => av_one_fourth
        [98] => av_three_fourth
        [99] => av_one_fifth
        [100] => av_two_fifth
        [101] => av_three_fifth
        [102] => av_four_fifth
        [103] => av_comments_list
        [104] => av_contact
        [105] => av_contact_field
        [106] => av_content_slider
        [107] => av_content_slide
        [108] => av_countdown
        [109] => av_events_countdown
        [110] => av_upcoming_events
        [111] => av_gallery
        [112] => av_horizontal_gallery
        [113] => av_google_map
        [114] => av_gmap_location
        [115] => av_layout_row
        [116] => av_cell_one_full
        [117] => av_cell_one_half
        [118] => av_cell_one_third
        [119] => av_cell_two_third
        [120] => av_cell_one_fourth
        [121] => av_cell_three_fourth
        [122] => av_cell_one_fifth
        [123] => av_cell_two_fifth
        [124] => av_cell_three_fifth
        [125] => av_cell_four_fifth
        [126] => av_heading
        [127] => av_headline_rotator
        [128] => av_rotator_item
        [129] => av_hr
        [130] => av_font_icon
        [131] => av_icon_circles
        [132] => av_icon_circle_item
        [133] => av_icon_box
        [134] => av_icongrid
        [135] => av_icongrid_item
        [136] => av_iconlist
        [137] => av_iconlist_item
        [138] => av_image
        [139] => av_image_diff
        [140] => av_image_hotspot
        [141] => av_image_spot
        [142] => av_partner
        [143] => av_partner_logo
        [144] => av_lottie
        [145] => av_magazine
        [146] => av_mailchimp
        [147] => av_mailchimp_field
        [148] => av_masonry_entries
        [149] => av_masonry_gallery
        [150] => av_submenu
        [151] => av_submenu_item
        [152] => av_notification
        [153] => av_animated_numbers
        [154] => av_portfolio
        [155] => av_post_metadata
        [156] => av_metadata_item
        [157] => av_postcontent
        [158] => av_postslider
        [159] => av_progress
        [160] => av_progress_bar
        [161] => av_promobox
        [162] => avia_sc_search
        [163] => av_section
        [164] => av_slideshow
        [165] => av_slide
        [166] => av_slideshow_accordion
        [167] => av_slide_accordion
        [168] => av_feature_image_slider
        [169] => av_fullscreen
        [170] => av_fullscreen_slide
        [171] => av_slideshow_full
        [172] => av_slide_full
        [173] => av_social_share
        [174] => av_tab_section
        [175] => av_tab_sub_section
        [176] => av_table
        [177] => av_row
        [178] => av_cell
        [179] => av_tab_container
        [180] => av_tab
        [181] => av_team_member
        [182] => av_team_icon
        [183] => av_testimonials
        [184] => av_testimonial_single
        [185] => av_textblock
        [186] => av_timeline
        [187] => av_timeline_item
        [188] => av_toggle_container
        [189] => av_toggle
        [190] => av_video
        [191] => av_sidebar
        [192] => av_dropcap1
        [193] => av_dropcap2
        [194] => gravityview_widget_search
        [195] => gravityview_widget_custom_content
        [196] => gravityview_widget_gravity_forms
        [197] => gv\widgets\page_size
        [198] => gravityview_widget_pagination_info
        [199] => gravityview_widget_page_links
    )
    NicomIT
    Participant

    Hi Support Team,

    I have custom post type “agentss” and i have change the permalink of this post type from site_url/agentss/post-name to site_url/agents/agent_id(post_meta_value)/post-name. Below is the code i have used in functions.php

    add_action( ‘init’, ‘pubmonth_register_rewrite_tag’);
    function pubmonth_register_rewrite_tag() {
    add_rewrite_tag( ‘%agent_id%’, ‘([0-9]{5}’);
    }

    add_filter(‘post_type_link’, ‘pub_term_permalink’, 10, 4);
    function pub_term_permalink($permalink, $post, $leavename, $sample)
    {
    if ( false !== strpos( $permalink, ‘agents/%agent_id%’ ) ) {
    //get the month of the publication
    $agent_id = get_post_meta($post->ID, ‘agent_id’, true);
    $rewritecode = array(
    ‘%agent_id%’,
    $leavename? ” : ‘%postname%’,
    );
    $rewritereplace = array(
    $agent_id,
    $post->post_name
    );
    $permalink = str_replace($rewritecode, $rewritereplace, $permalink);
    }
    return $permalink;
    }

    add_action( ‘init’, ‘pub_add_rewrite_rules’ );
    function pub_add_rewrite_rules() {
    add_rewrite_rule( ‘^([^/]*)/([0-9]{4})/([^/]+)?’, ‘agentss/index.php?pagename=$matches[2]’, ‘top’ );
    }
    then i saved the permalink. after this post link is showing correctly in the admin but wghen i open in front end it is throwing page-not-found/?avia_forced_reroute=1

    ss4
    ss3
    ss2
    ss1

    #1412112
    RavanH
    Participant

    Hi, I’m getting this errors in my error log:

    
    CRITICAL Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /home/xxx/public_html/wp-content/themes/enfold/framework/php/function-set-avia-backend.php:1146
    Stack trace:
    #0 /home/xxx/public_html/wp-content/themes/enfold/framework/php/function-set-avia-backend.php(1146): fread()
    #1 /home/xxx/public_html/wp-content/themes/enfold/functions-enfold.php(2344): avia_backend_create_file()
    #2 /home/xxx/public_html/wp-includes/class-wp-hook.php(308): avia_generate_stylesheet()
    #3 /home/xxx/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #4 /home/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 /home/xxx/public_html/wp-content/themes/enfold/framework/php/function-set-avia-backend.php(118): do_action()
    #6 /home/xxx/public_html/wp-includes/class-wp-hook.php(308): avia_update_helper->update_version()
    #7 /home/xxx/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #8 /home/xxx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
    #9 /home/xxx/public_html/wp-settings.php(645): do_action()
    #10 /home/xxx/public_html/wp-config.php(118): require_once('/home/xxx/...')
    #11 /home/xxx/public_html/wp-load.php(50): require_once('/home/xxx/...')
    #12 /home/xxx/public_html/wp-blog-header.php(13): require_once('/home/xxx/...')
    #13 /home/xxx/public_html/index.php(17): require('/home/xxx/...')
    #14 {main}
      thrown dans /home/xxx/public_html/wp-content/themes/enfold/framework/php/function-set-avia-backend.php à la ligne 1146
    

    Please advise…

    #1412103

    In reply to: PHP update error

    Hi,

    Thanks for that. The problem seems to be coming from your wp-config.php file, when this line is commented out, your site works as it should running both PHP 8.0 and 8.1:

    define( 'WP_AUTO_UPDATE_CORE', minor ); 

    That is related to automatic updates, but I can’t tell you why it’s breaking your site unfortunately. If you need further help with that, then please try reaching out to your hosting provider.

    Edit; I’ve left the code commented out for now, and the PHP version is set to 8.1.

    Best regards,
    Rikard

    • This reply was modified 2 years, 9 months ago by Rikard.
    #1412076

    Hi NCATIT,

    That’s nice, the file you need to edit is enfold\config-templatebuilder\avia-template-builder\php\class-popup-templates.php and find this function slideshow_button_links (line 759 in Enfold 5.6.3), just copy those arrays from Button 2 Label to Button 2 Link Target (line 844 – 895), add a comma after the closing parenthesis in line 895 and paste the whole button 2 arrays, then replace the labels with Button 3 and then replace the id as well.
    I hope it helps.

    Best regards,
    Nikko

    #1412042

    can you look inside that logoslider.php and post that line 778 to see what is the issue?
    Best would be to update to latest Enfold – with php 8 alot has changed – f.e. jQuery versions are now : 3.x and inside that new jQuery there are some deprecated functions.

    #1411966
    sabra
    Guest

    Hi there,

    I inherited a website with this theme. I did not build the site but am now maintaining it.

    I am experiencing an error:
    Warning: include(/home/customer/www/terrieschauer.com/public_html/wp-content/uploads/avia_fonts/fontello/charmap.php): failed to open stream: No such file or directory in /home/customer/www/terrieschauer.com/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-font-manager.php on line 477

    How do I get support for this?
    Do I buy the enfold theme through theme forest and then I can register and get help?

    Thank you,
    Sabra

    #1411933

    In reply to: PHP update error

    Hi Rikard,
    here are temporary admin credentials.
    Please note, that for the backend to work, I had to swith the php version back to 7.4 , which makes the error disappear (as the error only shows with pho 8)
    thank you

    #1411906
    infoglemser
    Participant

    We attempted to upgrade from Enfold 4.8.7.1 to the newest version that we just purchased and downloaded from ThemeForest. It was used by a previous developer to design the site and the theme was purchased under his license and not updated in some time. After uploading & installing Enfold, when we activated the associated Child theme, we received the, “There has been a critical error on this website,” message. The front end crashed, but the admin area was still functional (weird). We are running PHP 8.1 with Flywheel as our host. Upon inspection of the error logs we found the cause PHP Fatal error: Uncaught Error: Call to undefined method avia_partner_logo::default_args() in /www/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/logoslider/logoslider.php:778. Are you able to shed any light on what we need to do so that we can continue running the Enfold theme in its latest version? Please and thank you.

    #1411861

    Hello!

    I am having the same problem. I am on version 4.8.7.1

    PHP Version 8.1.20
    wordpress 6.2.2

    Can you please help me with this

    Thank you
    Martina

    #1411847

    Topic: Error

    Gary Bergen
    Guest

    WordPress has a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    Error Details
    =============
    An error of type E_ERROR was caused in line 1074 of the file /home/cskacanada/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php. Error message: Allowed memory size of 134217728 bytes exhausted (tried to allocate 46137376 bytes)

    #1411827

    In reply to: PHP update error

    see the server logs in the private section
    i can give you temporary access. but for that I have to switch back the php version to 7.4 -> in that case the error will disappear.
    Shall I do that?

    • This reply was modified 2 years, 9 months ago by Rio1.
    #1411743
    Blatze
    Participant

    Hi,
    Wenn ich im Backend die Frontseite bearbeiten möchte, wird mir ein kritischer Fehler angezeigt.
    https://therapieraum-wuppertal.de/wp-content/uploads/2023/06/Bildschirmfoto-2023-06-26-um-16.28.07.png
    In der Debug log-Datei steht folgendes:
    [26-Jun-2023 13:57:23 UTC] PHP Deprecated: Creation of dynamic property Avia_Popup_Templates::$resp_sizes_options is deprecated in /kunden/426540_45136/Wuppertal/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/base-classes/class-popup-templates-responsive.php on line 65
    […]

    Vielen Dank und liebe Grüße
    Caro
    —————-
    Hi,
    If I want to edit the front page in the backend, I get a critical error. I’ll give you access so you can look at the problem.
    https://therapieraum-wuppertal.de/wp-content/uploads/2023/06/Bildschirmfoto-2023-06-26-um-16.28.07.png
    The debug log file says the following:
    [26-Jun-2023 13:57:23 UTC] PHP Deprecated: Creation of dynamic property Avia_Popup_Templates::$resp_sizes_options is deprecated in
    /wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/base-classes/class-popup-templates-responsive.php on line 65
    […]

    Thank you and best regards
    Caro

    #1411726
    tobiasfries12
    Participant

    Hi dear all,

    unfortunately some Enfold components don’t work with PHP 7.4.
    So I need to update Enfold.

    What I already did:
    —————————–
    1. created envato Token and posted it in Enfold Settings
    2. Tried to update (unfortunately it says “you have version 4.5.2 and that is the latest version)
    3. I tried the Multipack Plugin, as mentioned in another post about WP Multisite Update, but unfortunately this did not help.

    QUESTION:
    How to update Enfold?
    Should I somewhere (where? Envato?) Download the latest version and physically install? What happens then with all settings?
    Or is there another smarter solution?

    Looking forward to hearing from you,
    best regards,
    Tobias

    #1411725

    In reply to: PHP update error

    how to reproduce: just visit the site. it will say there is a critical error

    “Es gab einen kritischen Fehler auf deiner Website.
    Erfahre mehr über die Problembehandlung in WordPress.”

    I can give you a temporary admin login, but for that I will have to switch the PHP Version back to 7.4
    in that case the error will disappear and the site will work again. Should I do that?

    #1411719
    sitecloudpl
    Participant

    Hi
    I have an old bug that has not disappeared after the update.
    Is there a way?
    Under PHP 8.0 the page does not load .

    WordPress has detected an error in the theme it is using: Enfold. WordPress Version 6.2.2
    Current theme: Enfold (version 5.6.2)
    Current plugin: (version )
    PHP Version: 7.4.30

    The E_ERROR error was caused on line 17 of the …/wp-content/themes/enfold/searchform.php file.
    Error message: Uncaught Error: Call to undefined function av_icon_char() in …/wp-content/themes/enfold/searchform.php:17
    Stack trace:
    # 0 …/wp-includes/general-template.php(308): require()
    # 1 …/wp-content/themes/enfold/includes/error404.php(17): get_search_form()
    # 2 …/wp-includes/template.php(785): require(‘/home/users/…’)
    # 3 …/wp-includes/template.php(718): load_template(‘/home/users/…’, false, Array)
    # 4 …/wp-includes/general-template.php(204): locate_template(Array, true, false, Array)
    # 5 …/wp-content/themes/enfold/404.php(30): get_template_part(‘includes/error4…’)
    # 6 …/wp-content/plugins/wp-cerber/cerber-load.php(4658): include(‘/home/users/…’)

    Daniel

    #1411672

    Topic: PHP update error

    in forum Enfold
    Rio1
    Participant

    Hi Enfold team,
    my site stops running when to php 8.0
    Enfold Version: 5.6.2

    I have updated everything (wordpress, all plugins and enfold) but still the issue is there.
    Please help me fix this issue.

    To make sure the site runs, i switched it back to php 7.4 but the server charges for that version

    #1411638

    Hey Monika,
    Thank you for your patience and the link to your site, to hide the video loader I added this css to your WordPress ▸ Customize ▸ Additional CSS

    /*hide video loader*/
    #top .mejs-overlay-loading {
        display: none !important;
    }

    To make the video not loop I edited your enfold/config-templatebuilder/avia-shortcodes/section.php on line 1581 ‘video_loop’ to False
    Enfold_Support_2457.jpeg
    To add this to your child theme so you won’t lose the change after your next update, create a directory in your child theme called shortcodes, then create a copy of the section.php file inside.
    Then add this code to your child theme functions.php:

    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/shortcodes/');
    
      return $paths;
    }
    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);

    Best regards,
    Mike

    #1411558

    In reply to: left sidebar problem

    Hi,
    I see that you are using Enfold v4.9.2.1 this version is not WordPress v6 ready, please update to Enfold v5.6.2
    Please note that if you have a header.php or footer.php in your child theme, you will need to remove these before you update.
    These will cause errors in your theme. We do not recommend adding these files to your child theme, it is the most common reason for errors when updating. If you have them in your child theme please remove these files and any customizations you wish to make should be done in your child theme functions.php

    To update your version of Enfold you will need to download the latest installable WP version from your Theme Forest account and upload it to your WordPress ▸ Appearance ▸ Themes ▸ Add Themes ▸ Add New
    WordPress_Appearance_Themes_Add-Themes_Add-New.jpg
    after you choose the zip file and click install, you will see a This theme is already installed message because you are updating, you can continue
    Installing_theme_from_uploaded_file_This_theme_is_already_installed.jpg
    then you will see the Theme updated successfully message.
    Theme_updated_successfully.jpg
    Best regards,
    Mike

    #1411498
    lzevon
    Participant

    Using the latest Enfold (v5.6.2) there are two errors in how Avia is parsing shortcodes.
    1. enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-parser.php – In check_wp_result_array(), it tries to access $sc[1] outside of the loop that creates the $sc variable.
    2. enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-parser.php – In balance_shortcode(), in the first preg_match_all it has this line:
    “/” . ShortcodeHelper::get_fake_pattern(false, $shortcodes) . “/s”
    which fails when GravityView is installed and being used. It is unable to parse the following shortcodes properly due to the extra slash: [gv\widgets\page_size] [/gv\widgets\page_size]
    These two errors cause continue errors to be generated in the error_log
    [21-Jun-2023 15:22:26 UTC] PHP Warning: preg_match_all(): Compilation failed: unknown property name after \P or \p at offset 5747 in /chroot/home/USERNAME/DOMAIN/html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-parser.php on line 562

    #1411487
    sezaitosun
    Participant

    The website not working with Enfold 5.6.2 and PHP 8.0, 8.1 or 8.2. WordPress is 6.2.2

    I tried all php versions. Plugin not installed.

    WordPress version: WordPress 6.2.2.
    Enfold Theme Version Number is 5.6.2

    support please

    • This topic was modified 2 years, 9 months ago by sezaitosun.

    Thanks very much for your suggestion, Mike. It helped me look quite deeply into this issue using Chrome’s debugger. I want to first apologise to you for keeping things so complicated using my in-development home page, which is quite complicated, instead of creating a test page for this topic question–which is exactly what I did to debug this issue after your reply.

    It turns out that the stackoverflow suggestion doesn’t work. Their suggestion is to add itemOpts.index = index; before the mfp._openClick({mfpEl:items}, jqEl, itemOpts); line as follows:

    $.fn.magnificPopup = function(options) {
    	_checkInstance();
    
    	var jqEl = $(this);
    
    	// We call some API method of first param is a string
    	if (typeof options === "string" ) {
    
    		if(options === 'open') {
    			var items,
    				itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
    				index = parseInt(arguments[1], 10) || 0;
    
    			if(itemOpts.items) {
    				items = itemOpts.items[index];
    			} else {
    				items = jqEl;
    				if(itemOpts.delegate) {
    					items = items.find(itemOpts.delegate);
    				}
    				items = items.eq( index );
    			}
    			itemOpts.index = index;  // Added line per https://stackoverflow.com/questions/49131727/open-all-images-on-page-with-magnific-popup
    			mfp._openClick({mfpEl:items}, jqEl, itemOpts);
    		} else {
    			if(mfp.isOpen)
    				mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
    		}
    
    	} else {
    		// clone options obj
    		options = $.extend(true, {}, options);
    
    		/*
    		 * As Zepto doesn't support .data() method for objects
    		 * and it works only in normal browsers
    		 * we assign "options" object directly to the DOM element. FTW!
    		 */
    		if(_isJQ) {
    			jqEl.data('magnificPopup', options);
    		} else {
    			jqEl[0].magnificPopup = options;
    		}
    
    		mfp.addGroup(jqEl, options);
    
    	}
    	return jqEl;
    };

    The problem is that that bug fix never even gets to run because it’s encapsulated within the IF condition of typeof options === “string”, as you can see above. So if you look at BOTH:

    (1) us Enfold users:

    links.not(options.exclude).addClass('lightbox-added')
    .magnificPopup($.avia_utilities.av_popup);

    where $.avia_utilities.av_popup === {type: ‘image’, mainClass: ‘avia-popup mfp-zoom-in’, tLoading: ”, tClose: ”, removalDelay: 300, …}

    (2) and the Original Poster to that stackoverflow thread:

    $('#content').magnificPopup({
      items: $imgs,
      type: 'image',
      gallery: {
        enabled: true
      },
    });

    you can see that typeof options === “object”! So it wouldn’t work for either of us (the OP coincidentally was wanting to do the exact same thing as me, to “enable magnific popup on all images on my page”). Unfortunately, the OP never responded to the reply person’s bug fix suggestion, so the thread never went further in order to highlight the failure of the suggestion for the OP.

    After ruling out magnific’s code as the culprit of my problem, I focused on avia-snippet-lightbox.js and its code at the end of its function, $.fn.avia_activate_lightbox = function(variables):

    return this.each(function()
    {
        var container	= $(this),
            videos		= $(options.videoElements, this).not(options.exclude).addClass('mfp-iframe'), /*necessary class for the correct lightbox markup*/
            ajaxed		= ! container.is('body') && ! container.is('.ajax_slide');
            for( var i = 0; i < options.groups.length; i++ )
            {
                container.find(options.groups[i]).each(function()
                {
                    var links = $(options.autolinkElements, this);
    
                    if( ajaxed )
                    {
                        links.removeClass('lightbox-added');
                    }
    
                    links.not(options.exclude).addClass('lightbox-added').magnificPopup($.avia_utilities.av_popup);
                });
            }
    
    });

    Sure enough, this is the culprit. What’s happening in this code above is that:

    (1) the outer loop, controlled by the FOR loop, searches the <body> DOM for each class in the options object (.avia-slideshow, .avia-gallery, .av-horizontal-gallery, .av-instagram-pics, .portfolio-preview-page, .portfolio-preview-content, .isotope, .post-entry, .sidebar, #main, .main-menu, & .woocommerce-product-gallery); and if it finds the current options[i] in the <body> DOM, then:

    (2) the inner loop, controlled by “.each(function()”, looks for every instance of that options[i] in body and adds the images within that sub-DOM instance to the links object “array”. In other words, it creates multiple lightboxes per page–and, in fact, NOT JUST a separate one for each options[i] image set (from the outer loop), BUT ALSO a separate lightbox for each instance of options[i] as well.

    But I want a single lightbox for all linked images on a page, i.e. a single image set that is sent to magnific. Specifically, for me, options[7]===’.post-entry’ is not only found in outer 1/1, 1/2, etc. layout sections, in which I may put images, but also in Color Sections, in which I will definitely put images, perhaps in inner 1/1, 1/2, etc. layout sections within the Color Sections. It’s the Color Section that ends up separating out ‘.post-entry’ images from each other, creating multiple image sets sent to magnific for separate lightboxes (notice the <div class=’post-entry post-entry-type-page post-entry-31′> line):

    <div class='avia-section av-lib3uyi7-57ce06e0452ac92eb7d4393a8384e180 main_color avia-section-default avia-no-border-styling  avia-builder-el-62  el_after_av_section  el_before_av_section  mainPageBodyThreeCols avia-bg-style-scroll container_wrap fullsize'  >
        <div class='container av-section-cont-open' >
            <div class='template-page content  av-content-full alpha units'>
                <div class='post-entry post-entry-type-page post-entry-31'>
                    <div class='entry-content-wrapper clearfix'>
                        <div  class='flex_column av-i3z0f-243165cc077a80e50bbee8f020d21535 av_one_third  avia-builder-el-63  el_before_av_one_third  avia-builder-el-first  first flex_column_div  '     >
                            <div  class='avia-image-container av-lib47uf4-9660e94fab46a96b36ab619c8b679a09 av-styling- avia-align-center  avia-builder-el-64  el_before_av_textblock  avia-builder-el-first  av-group-lightbox'   itemprop="image" itemscope="itemscope" itemtype="https://schema.org/ImageObject" >
                                <div class="avia-image-container-inner">
                                    <div class="avia-image-overlay-wrap">
                                        <a href="...dentures.jpg" class='avia_image' >
                                            <img decoding="async" class='wp-image-699 avia-img-lazy-loading-not-699 avia_image ' src="...dentures-300x264.jpg" alt='...'  height="264" width="300"  itemprop="thumbnailUrl" srcset="..." sizes="(max-width: 300px) 100vw, 300px" />
                                        </a>
                                    </div>
                                </div>
                            </div>...

    In other words, each .avia-section (Color Section) has its own class=’post-entry post-entry-type-page post-entry-31′, so the images under that DOM are collected as a separate image set for a lightbox.

    So I ended up just bypassing all of it, and replaced the code in avia-snippet-lightbox.js with my own child_avia-snippet-lightbox.js:

    return this.each(function()
    {
        //Find all linked images
        var myLinks = $(options.autolinkElements, this);
        
        //Note: ".not(options.exclude)" is left out of this "myLinks.not(options.exclude).addClass(..." on purpose to impose the policy: if you want to exclude an image from the all-images set in the lightbox, just don't make it a link. Linked images excluded from the lightbox means if the user clicks on that linked image, it will follow that link, which is to open it's full size image, but without the lightbox's closing mechanism. Then the only way for the user to go back to the page is to click the Back button--which is bad UX.
    
    	myLinks.addClass('lightbox-added').magnificPopup($.avia_utilities.av_popup);
    });

    And adding this to my child functions.php file:

    add_action('wp_enqueue_scripts', 'magnific_script_fix', 100);
    function magnific_script_fix()
    {
        wp_dequeue_script('avia-lightbox-activation');
        wp_enqueue_script('child_avia-lightbox-activation', get_stylesheet_directory_uri().'/child_avia-snippet-lightbox.js', array('jquery'));
    }

    Also, as you can see, I’ve left out “.not(options.exclude)” from myLinks.not(options.exclude).addClass(‘lightbox-added’).magnificPopup($.avia_utilities.av_popup) for the following reason: If I put it in, then, yes, the images with those exclusion classes will be excluded from the lightbox. But they are still linked images: so if a user clicks on one of them, it will follow that link, which is to open it’s full size image, but without the lightbox’s closing mechanism. So the only way for the user to go back to the page is to click the Back button–which is bad UX.

    FYI: I attempted to figure out a way to add each of those excluded images in its own individual one-image lightbox, but I just couldn’t even figure out how Enfold does the not(options.exclude), as a starting point (going step by step in the debugger to see how it’s doing it was a bewildering experience), so I just gave up. So I just gave myself the policy: if you want to exclude an image from the all-images set in the lightbox, just don’t make it a link. Lol. Yes, I could have left the .not(options.exclude) in there and just not used it per my policy, but I wanted to make sure the UX stays correct by preventing me (or anyone else maintaining the site) from having any effect to forgetting the policy and adding e.g. “noLightbox” to an image’s Custom CSS Class field, expecting it to be excluded from the lightbox, but still keeping the image’s link active. No: if I (or they) go into the code, they’ll see there is no .not(options.exclude) at all, and read the comment in the code, to see why their image is not getting excluded from the lightbox.

    So, anyway, that’s my solution to my particular problem. I appreciate your help, Mike. Unless you have some solution code for me to include those excluded images in their own individual one-image lightboxes (which would be helpful to just round up this solution, in case others want to use it), you may close this thread.

    Thanks very much,
    Gary

    • This reply was modified 2 years, 9 months ago by garysch37.
    #1411283
    riba86
    Participant

    Hi,
    I have a new client from whom I took over a website and transferred it to my server. The previous agency had the API key for the Enfold theme and other plugins. The website used to run on PHP 7.4, but my server has PHP 8.1. I purchased a new Enfold theme and updated the other plugins, but now the footer is not displaying, and the subpages in other languages are not functioning properly. Can you take a look?

    best regards, riba

    BeeCee
    Participant

    Hi,

    this is mentioned in the documentation:

    It is a browser feature but it is possible to hide them by adding following code to Functions.php file of your child theme in Appearance > Editor

    function remove_title_attr(){
    ?>
     <script>
    jQuery(window).on('load', function(){
    jQuery('#wrap_all a').removeAttr('title');
    jQuery('#wrap_all img').removeAttr('title');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_title_attr');

    so far so good, but:
    with this active, the lightbox of Masonry Gallery for example show no image title. When disabling this function, then the title of the images are shown in the lightbox.

    Is there a workaround so that this feature can be ACTIVE and STILL display the image titles in the lightbox?
    Thanks.

    #1411253
    flanke7
    Participant

    Hey Team,

    we get the following error on our page:

    Deprecated: Die Funktion Class avia_style_generator wurde mit einem Argument aufgerufen, das seit Version 5.3 veraltet ist! Trying to set protected/private property: avia_style_generator::print_extra_output – will become unavailable in a future release. Check for a set method or a filter. in /var/www/vhosts/www_remstalwerk_de/wp-includes/functions.php on line 5697

    Can you tell us, how we can fix it?

    Best

    #1411180
    Rustum
    Participant

    Hi there,

    On my website, I have a popup. Because of this, some css and js files are being duplicated. This can be seen in GTMetrix (Avoid enormous network payloads): https://gtmetrix.com/reports/welding-alloys.zerobox.co.za/y3XRcP6O/

    I would simply like to add some code in my functions.php file to dequeue these styles or scripts if a duplicate occurs (if in an iframe).
    However, I am unable to get the correct handle for the js and css files I wish to dequeue.

    See example of files that appear twice due to the iframe as explained above:
    1. https://welding-alloys.zerobox.co.za/wp-content/uploads/dynamic_avia/avia-merged-styles-7fe77e298b503a9a07f5ff4ad5c43d89—649173dc020ff.css
    2. https://welding-alloys.zerobox.co.za/wp-content/uploads/dynamic_avia/avia-footer-scripts-ad02dcb999be2087336cb42c0931e3ed—649173e2c4054.js

    I have tried to print_r the results of global $wp_styles; and global $wp_scripts; , but I don’t seem to find any of the above in the array, I would like to know the handle of the above files, so I can dequeue them. Here is what I tried (using the ids) but it did not work:

    if (window!=window.top) {

    /* I’m in an iframe! – Dequeue styles and scripts*/
    wp_dequeue_style( ‘avia-merged-styles’ );
    wp_dequeue_script(‘avia-head-scripts’);
    wp_dequeue_script(‘avia-footer-scripts’);
    }
    *It seems like the handles I have used on wp_dequeue_style and wp_dequeue_script are incorrect? Please advise on how I can find the handles/ dequeue specific css and js as mentioned above.

    Thanks.

Viewing 30 results - 1,231 through 1,260 (of 16,891 total)