Support

Home Forums Event Espresso Premium Events Table pagination works fine on one page but not on the others

Events Table pagination works fine on one page but not on the others

Posted: January 16, 2018 at 4:04 am


georgeswansek

January 16, 2018 at 4:04 am

I have set up the shortcode with table_pages=10 but it only works on one page and not the others.
Here is the page that displays properly : https://apihop-formation.com/formations-lean/

Here is the page that does not : https://apihop-formation.com/formations-lean-6-sigma/

I have to fix this for the client. Any suggestions ?

Thank you,
Georges


Tony

  • Support Staff

January 16, 2018 at 4:55 am

Hi there,

Can you post the full shortcode you are using on each page, please?


georgeswansek

January 16, 2018 at 7:12 am

Hello,

On the first page, [ESPRESSO_EVENTS_TABLE_TEMPLATE category_slug=les-formations-lean show_all_datetimes=true category_filter=false]

On the second page, [ESPRESSO_EVENTS_TABLE_TEMPLATE category_slug=les-formations-lean-6-sigma show_all_datetimes=true category_filter=false table_pages=10]

I was using the short code on both pages without the table_pages=10 and the second page wasn’t displaying properly, so I added table_pages=10.

Right now if I try to modify the short code on the first page and add table_pages=10 to it, it takes away the pagination.

Thank you for your help,
Georges


georgeswansek

January 18, 2018 at 5:21 am

Hi Tony, do you have a way to fix this?

Thank you.
Georges


Tony

  • Support Staff

January 18, 2018 at 4:33 pm

I was using the short code on both pages without the table_pages=10 and the second page wasn’t displaying properly, so I added table_pages=10.

What wasn’t displaying correctly before adding the table_pages attribute? If it wasn’t displaying correctly before adding that attribute it may be nothing to do with table_pages at all.

How are you adding the above shortcodes to the content of the page?

Are you using a page builder?


georgeswansek

January 18, 2018 at 4:54 pm

You are probably right, it might have nothing to do with table_pages, I just don’t know what the problem is.

Yes, I’m using Beaver Builder, however I’ve tried to test the short code by creating a page and inserting the code in the wordpress editor, without using the site builder, and I got the same result, it was not displaying correctly. I’ve also disabled all the plugins while doing that to see, and it was the same.

I’m at a loss.


Tony

  • Support Staff

January 19, 2018 at 7:00 am

Ok, the problem is that the EE assets are not loading on the page so the JavaScript used to build the table pages isn’t available.

Are you using a plugin to force your JS files to load in the footer?


georgeswansek

January 23, 2018 at 3:32 am

Understand about the problem, I’m not using a specific plugin to force JS files to load in the footer. Should I? and if so which one?

What’s weird though is that it works well on one page.

The client has decided to remove the pagination, however on the first page there is a way to sort each column on top of the table, but it doesn’t appear on the other page; again, I’m assuming it is all coming from the same issue with the JS. I appreciate your help with this.


Tony

  • Support Staff

January 23, 2018 at 9:46 am

Should I? and if so which one?

No, you shouldn’t an I just wanted to confirm you weren’t already.

I did some further checking and I actually doubt this is the shortcode tracking, reason being is the table view template files are loading as expected, those are in the same call as the JS file so the tracking must be working.

The only dependency the espresso_events_table_template.js file has is on jQuery, so as long as jQuery is properly enqueued on the site the file should load, however on looking through your sites page source I found this:

<script type="text/javascript">
if(typeof jQuery == 'undefined' || typeof jQuery.fn.on == 'undefined') {
	document.write('<script src="https://apihop-formation.com/wp-includes/js/jquery/jquery.js"><\/script>');
	document.write('<script src="https://apihop-formation.com/wp-includes/js/jquery/jquery-migrate.min.js"><\/script>');
}
</script>

Which leads me to suspect there has been an issue with jQuery not being loaded correctly on this site previously? The above adds the jQuery file to the page if jQuery is undefined but that also means that any files that rely on jQuery being enqueued correctly also will not load (such as espresso_events_table_template.js).

If you preview the site using a default theme such as twentyseventeen does the table load correctly with that? You can do that without actually switching themes for your users using the Theme Test Drive plugin.

The support post ‘Events Table pagination works fine on one page but not on the others’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso