Pagination for listing items

Started by: Daniel December 08, 2016 - 22:26

Hello,

On my motors site I am seeing an error where the last page of any pagination will return a 404 error. I have a feeling that the theme generates one page more than necessary when doing the pagination. Is this a known issue and is there anything I can to make sure the website paginates the correct number of pages?



Replies:

  • Author Team
    #2758 Reply

    Baxter
    Hi,

    Please check and update your theme to the last version and it should solve the problem -https://stylemixthemes.com/manuals/consulting/#update.

    Regards

    #2761 Reply

    Daniel
    I updated the theme and am now experiencing the following error:

    Fatal error: Uncaught Error: Call to undefined function stm_listings_load_template() in /wp-content/themes/motors/vc_templates/stm_classic_filter.php:10 Stack trace: #0 /wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(473): include() #1 /wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(453): WPBakeryShortCode->loadTemplate(Array, '') #2 /wp-content/plugins/js_composer/include/classes/shortcodes/shortcodes.php(565): WPBakeryShortCode->content(Array, '') #3 /wp/wp-content/plugins/js_composer/include/helpers/helpers.php(1400): WPBakeryShortCode->output('', '') #4 /wp-includes/shortcodes.php(326): vc_do_shortcode('', '', 'stm_classic_fil...') #5 [internal function]: do_shortcode_tag(Array) #6 /wp-includes/shortcodes.php(223): preg_replace_callback('/\\[(\\[?)(stm_cl...', 'do_shortcode_ta...', '[stm_cla in /wp-content/themes/motors/vc_templates/stm_classic_filter.php on line 10

    FWIW I searched my wordpress install with grep and cannot find a function definition for stm_listings_load_template(). Please advise.

    Author Team
    #2766 Reply

    Axel
    Hi,

    There are some conflicts with the child theme in the new version of the theme. Please add this code

     in the begining and 
    }
    in the end of file – motors/inc/customizer/controls/input_controller.php . It should solve the problem.

    Regards

    #2773 Reply

    Daniel
    The suggested code did not fix the problem. I think the error says a function named stm_listings_load_template is not defined. I did not find a function of that name in the files of version 3.0 or version 2.6.6.

    Is there anyway you can provide the code to that function and tell me which file to place it in?

    BTW I appreciate your relatively quick replies. If there is anything I can do on my end to help fix this problem on the theme let me know and I will do what I can.

    Author Team
    #2778 Reply

    Axel
    We have released a new version of the theme. Please update your theme. It should solve the problem.

    Regards

    #2793 Reply

    Daniel
    The undefined function error was fixed when I updated the theme *and* its associated plugins. Thank you for resolving that issue.

    However, now, when I attempt to visit the inventory page, the page does not display any of our inventory. Additionally, the container div with css class name "wpb_column vc_column_container vc_col-sm-12", which should only generate once on the page, generates an infinite number of times, with each new container appended to the bottom of the page. I assume there is an infinite loop somewhere that is causing this issue.

    Additionally, the search bar on the left hand side, with css class name "filter filter-sidebar ajax-filter" is empty. The page does not display any filter options or search button.

    Please let me know your suggestions to fix these issues.

    Author Team
    #2797 Reply

    Axel
    Please try to set Inventory page under Customize -> Listing -> Inventory Settings section. Please let us know if it wont help.

    Regards

    #2804 Reply

    Daniel
    Axel,

    Your suggested fix seems to work. I changed the Listing archive option from "--- Default ---" to the "Inventory" page and now the inventory page displays correctly.

    The pagination functionality also appears to work correctly in this update (3.0.2).

    Thank you for the guidance and your patience in helping resolve the problems I was having.

    Author Team
    #2810 Reply

    Axel
    You are welcome))
You must be logged in to reply to this topic.