Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1395990

    Hi there,

    I am using the avia_product_slider product grid layout for my search results page as per:
    https://kriesi.at/support/topic/search-results-page-grid-layout/ and https://kriesi.at/support/topic/incorrect-counting-in-search-results/

    I get the following error:

    Fatal error: Uncaught Error: Call to a member function get_style_tag() on null in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcode-helpers/class-avia-product-slider.php:269 Stack trace: #0 /home2/patiowarehouse3z/public_html/wp-content/themes/enfold-child/search.php(72): avia_product_slider->html() #1 /home2/patiowarehouse3z/public_html/wp-includes/template-loader.php(106): include(‘/home2/patiowar…’) #2 /home2/patiowarehouse3z/public_html/wp-blog-header.php(19): require_once(‘/home2/patiowar…’) #3 /home2/patiowarehouse3z/public_html/index.php(17): require(‘/home2/patiowar…’) #4 {main} thrown in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold/config-templatebuilder/avia-shortcode-helpers/class-avia-product-slider.php on line 269.

    I am using the latest version of enfold 5.4.

    Please advise how I can resolve the error.

    #1396327

    Hey!

    Thank you for the inquiry.

    In the modified search.php file, please look for this line.

    $blog = new avia_product_slider($atts);
    

    Below, add this code.

    $blog->get_element_styles(["element_id" => $blog['element_id'], "element_styling" => $blog['element_styling']]);
    

    Let us know if the modification helps.

    Best regards,
    Ismael

    #1396335

    Hi,

    I added the code, but now there is a new error:

    Fatal error: Uncaught Error: Cannot use object of type avia_product_slider as array in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold-child/search.php:73 Stack trace: #0 /home2/patiowarehouse3z/public_html/wp-includes/template-loader.php(106): include() #1 /home2/patiowarehouse3z/public_html/wp-blog-header.php(19): require_once(‘/home2/patiowar…’) #2 /home2/patiowarehouse3z/public_html/index.php(17): require(‘/home2/patiowar…’) #3 {main} thrown in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold-child/search.php on line 73

    #1396472

    Hi!

    This is working correctly on our end. Please try to replace the line with the following code.

    $blog->get_element_styles(["element_id" => $blog->element_id, "element_styling" => $blog->element_styling]);
    

    Please make sure to copy the code directly from the forum.

    Cheers!
    Ismael

    #1396501

    Hi,

    I copied the above code from the forum and it is still not working on my end. The below is the latest error:

    Fatal error: Uncaught Error: Cannot access protected property avia_product_slider::$element_id in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold-child/search.php:73 Stack trace: #0 /home2/patiowarehouse3z/public_html/wp-includes/template-loader.php(106): include() #1 /home2/patiowarehouse3z/public_html/wp-blog-header.php(19): require_once(‘/home2/patiowar…’) #2 /home2/patiowarehouse3z/public_html/index.php(17): require(‘/home2/patiowar…’) #3 {main} thrown in /home2/patiowarehouse3z/public_html/wp-content/themes/enfold-child/search.php on line 73

    Please advise if there is maybe something else I need to do?

    #1396948

    Hi,

    Do you have any update on the above issue?

    I have tried the code on 2 other sites and the issue is still the same: Fatal error: Uncaught Error: Cannot access protected property avia_product_slider::$element_id

    Kindly assist.

    #1397400

    Hi,

    Sorry for the delay. We managed to fix the issue with the search template but for some reason none of the products are displaying. The same modification works correctly on our end as shown in the screenshot below.

    Screenshot: https://1drv.ms/u/s!AjjTfXSRbKTvz2RkDmcEIw-atJYX?e=hXoklz

    Please try to deactivate the plugins temporarily and see if any of the extension is causing the issue.

    Best regards,
    Ismael

    #1397708

    Thanks Ismael,

    The issue seems to be coming from the following plugin: Relevanssi Premium. However, I understand Relevanssi is compatible with Enfold.
    When I remove or comment the following line, I get the results for products and everything works as needed:
    $blog->query_entries();
    Is this something you are able to check out on your side? Or should I send a support ticket to Relevanssi support about this?

    • This reply was modified 1 year, 2 months ago by Rustum.
    #1397710

    Hi there,
    I have also noticed that the pagination doesn’t work anymore. It always returns to Page 1.: https://www.patiowarehouse.co.za/?s=amalfi&avia-element-paging=2

    I am not sure if it is somehow related to one of my older posts on the same topic, but I know this was fixed on a later version of enfold: https://kriesi.at/support/topic/pagination-not-working-on-avia_product_slider-in-search-php/#post-1319492

    Please check and advise how this can be solved?

    • This reply was modified 1 year, 2 months ago by Rustum.
    • This reply was modified 1 year, 2 months ago by Rustum.
    #1398575

    Hi,

    The issue seems to be coming from the following plugin: Relevanssi Premium.

    You may need to contact the plugin developers for more info about this issue. For the meantime, you may need to revert back to the default search template without the modification.

    Best regards,
    Ismael

    #1399098

    Hi Ismael,

    I finally resolved the issue via some support from Relevanssi. You may want to add it to your documentation as well. *On the below filter, the following line just needed to be added: $query[‘relevanssi’] = true;

    add_filter(‘avia_product_slide_query’, ‘avia_product_slide_query_mod’, 10, 2);
    function avia_product_slide_query_mod($query, $params) {
    if(is_search()) {
    $query[‘s’] = $_GET[‘s’];
    $query[‘relevanssi’] = true;
    }

    return $query;
    }

    The query and pagination on the custom avia product slider/search grid now works as needed.

    Thanks.

    #1399140

    Hi,

    Thank you for sharing the solution.

    I added it to our compatibility class Avia_Relevanssi for next release 5.5

    In case you want to check it please replace enfold\config-relevanssi\class-avia-relevanssi.php with

    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_5_4_1/config-relevanssi/class-avia-relevanssi.php

    Best regards,
    Günter

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.