Skip Navigation

[Resolved] slider not working

This thread is resolved. Here is a description of the problem and solution.

Problem: A Slider created in Views is not functioning correctly, and I see an error in the browser console:
Cannot read property 'max_pages' of undefined

Solution: Make sure that more than 1 slider "page" exists so that the Slider has content to display on multiple pages. You may have to add posts.

Relevant Documentation: https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

This support ticket is created 7 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 13 replies, has 2 voices.

Last updated by nelsonT-2 7 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#490134

Hi,

I know from previous experience Toolset and Ultimatum theme have some compatibility issues... Hope you can help with this one:

I'm trying to build a slider in Views for a Types category. Most Views work, but in this case I'm trying to do an automatic slider for testimonials...

The slider doesn't load at all, and I have a error "Cannot read property 'max_pages' of undefined" in the JS Console (I know I've tried to fix this, only to have another error message)... so I know it has to do with JS...

You can view an example here: hidden link

I was able to make it work using another plugin in the home page, but the problem is that it just support title and body... but I need more fields than that, so I hope we can make Toolset and Ultimatum work together...

Nelson

#490138

P.S. it does work if I use manual transition, but not with automatic transition (which is better for a testimonial slider)...

#490139

Hi Nelson,

I would like to try to reproduce your issue. Can you provide me with a link to download the Ultimatum theme files? I don't currently have access to that. You can upload a zip file to Dropbox or Google Drive and provide a link in the private reply fields I have enabled for you.

#490235

Thank you. Can you provide me with your debug information as described here:

https://toolset.com/faq/provide-debug-information-faster-support/

NOTE: Please be sure to check the box to indicate you can provide debug info and paste your debug info in the debug field provided, and NOT in the general response field.

Also, as a test, could you add 2 additional slides to your 2nd slider (the one that shows "Aucun témoignage pour l'instant" now) and let me know the results?

#490246

Here's the debug information.

Thank you.

#490620

Hi that's odd, the debug information normally lists the Toolset plugins you have installed but I don't see those. Can you please tell me which Toolset plugins you have active, including the version numbers?

#490657

Types 2.2.8
Views 2.2.2

Also, I'm in a WP Multi-site environment...

#490666
ult-2-sliders.png

Ok thanks, that makes sense then. I downloaded the theme and installed locally using the Toolset plugins you mentioned. There are a lot of PHP notices coming from the theme, but I'm disregarding them for now.

Unfortunately I'm not seeing any max_pages errors like you are seeing on your site. I haven't done any modifications or customizations, and I only have the two Toolset plugins active. Screenshot attached - there are two very basic sliders behaving properly on this page.

So I'm going to need to try to clone your site and test it locally to isolate the problem. With your permission, I would like to install Duplicator on your site, create a clone, and install it on my local environment to continue debugging. In order to do that, I need access to your wp-admin area. Please provide the login credentials and admin URL in the private reply fields provided in your next reply. Only you and I will have access to the private reply, so your credentials will not be public.

If you would prefer not to give me access to your admin area, you can install the plugin yourself, create a clone, and upload it like you did with the theme. I would need the URL, as well as login credentials of an admin user created before the clone was created.

Please let me know how you would like to proceed.

#491948

Hi Nelson, I need a password to access the backup file. Can you include that in your next private reply?

#492097
Screen Shot 2017-02-21 at 12.21.21 PM.png

Hi, I was able to install a clone of your site locally. I'm able to see the issue you have described. On my copy, if I go to depart/wp-admin/post.php?post=543&action=edit and change the Page Layout to be "Index" instead of "The Default", the automatic slider seems to work as expected. Can you confirm that temporarily changing the layout on your side does the same?

#492135

You're right, it does work when using the other template...

So, went further to see the difference, and the only difference is that the default one uses a second row with two cols... One being just a text, and the second one begin ANOTHER Views slider to show some logos...

In the case of the index template, I DO use that second slider as well, but "inside" the page, using Visual Composer, instead of directly inside Ultimatum... So, I temporarely deleted the slider in the head section and switched back to the default template and it worked...

SO, it looks like having TWO sliders, one being in the Ultimatum theme and the other via Visual Composer creates a problem, but having the two sliders called from Visual Composer doesn't... Having JUST the slider in the header (i.e. in Ultimatum) doesn't seem to cause any issue as well... So, it's really when the shortcode is added in Ultimatum AND Visual Composer.

Don't know if you can find what's causing the issue... but we are progressing!

Nelson

P.S. On the page where I have both the slider from Ultimatum AND VC, none of them work... hidden link

#492383

Hi, just a quick update to let you know I'm still working on this. I made some changes locally that fixed the issue for me, but the same changes on your test environment did not resolve the problem. So I need to spend some more time today to isolate the changes on my side that resolved the problem. Thanks for your patience.

#492596

Okay I think I see the problem. There was only one item in your top logo slider, which seems to have caused a JavaScript error. To fix it, I added this item in your test environment:
/depart/wp-admin/post.php?post=1719&action=edit

This is a post of type "Partenaire et Commanditaire" and it is assigned to the "Partenaire Pilier" category. This creates more than one item in the top logo area in your header. Now things seem to be working correctly. No more max_pages errors, and transitions are happening automatically.

I did modify the transition animation for the Temoignages slider View to use a "Slide Left" transition instead of "Fade" - feel free to change that back. It was confusing for me with your duplicate content (PARTICIPANTS COUP DE COEUR 2017), it appeared that the transition was not happening.

Please let me know how this works for you, and if I can be of further assistance.

#492894

Thank you for your help and time!

I don't know if it's possible that the client has just a couple of icons there, but we'll deal with it...

Nelson

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.