Table pagination not shown

Hi Max,

I've been using Chronoforms for quite some time now and pagination in tables always worked fine, until this one. It's a table where I show a list of people that have subscribed for an event.

I have a read data element that gets all subscribers. Because it uses a custom SQL query, I've defined the count myself with some PHP code. The correct count is stored in the variable according to the debug data.

The query gets 30 results, so I would expect a page with 25 results (set as limit in read data) and a second page with 5 results. But the paginator is not shown and the table only shows 25 results. I checked with DevTools and the div with the paginator is not present on this page.

For other tables, which have the same setup, it works fine. The only difference I can see is that I've added further logic for every table row (read data based on the table row and loop through it to show content in the table cell).

Please find attached all relevant screenshots. Could you help me out with this please? Let me know if you need further information.

Thanks,

Bart

Max_admin 19d ago

Hi Bart

Please check the generated SQL statement in the debug, does it include the correct limit and offset variables when you view the results ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 19d ago

And the count is set BEFORE the table ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 19d ago

Try also to change the Read Type setting to "All matching records" (without count)

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.

Hi Max,

Yes, the count is set before the table.

And the strange thing is that other forms with exactly the same configuration do work correctly.

For instance:

The only difference is that I'm not having the additional read data and loop inside the table rows.

Best regards,

Bart

Hi Max,

Changing the read data to "All matching records" did not resolve the issue.

Max_admin 19d ago

Ok, please try to "disable" the Read Data inside the table columns, does this bring the paginator ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.

Hi Max, That doesn't solve the issue neither unfortunately.

Max_admin 19d ago

try to create a copy of this form and drop features one by one, check if the Paginator is displayed after any change ?

Also double check the spelling of actions names ?

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
bart99.hermans266 19d ago
Answer
1 Likes

Hi Max,

I've continued testing by stripping the form gradually. Nothing on the page itself (read data, table, etc.) solved the issue, but when I removed one of the other pages suddenly the paginator was shown.

I've tested multiple times and only removing this page makes the paginator appear.

So I started over and began stripping that other page ("pdf_page"), which contains

  • a read data with the same name as on the first page (called "readdata_inschrijvingen"). Didn't see it as an issue because it was on a different page. In this new read data element I didn't set pagination because the table is inside a PDF.
  • an output buffer containing a table based on this new "readdata_inschrijvingen" element
  • a TCPDF element (PDF generation) using the output buffer

When I renamed the read data element on this "pdf_page" to "readdata_inschrijvingen2", the paginator popped up on the "overview_page". 

I've never had any issues with using 2 variables or elements with the same name, because the values of the underlying variables are overwritten. But this time it led to a very strange issue.

But okay, it is solved now!

Best regards,

Bart

Max_admin 19d ago
1 Likes

Hi Bart

I'm glad you found it.

This is correct, this is because the Limit value is retrieved based on the Read Data name used in the Table view settings, so when you have another action with the same name, the Limit value was not found leading to no paginator.

Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.