Table view problem with query JOIN fields

Fr Fredolino 12 Oct, 2025

Hi,

the table doesn't work correctly in CF 8 when using read data joins?

The table is empty, even though the debugger info shows the correct SQL statement with the correct result. I can also copy the SQL from the debugger and test it directly in PHPMyAdmin.

What is the problem now?

F.

Max_admin Max_admin 12 Oct, 2025

Hi Fred

if the results are shown in the Debug then you need to add the correct data path in the table columns, or the columns contents, can you show a part of the debug results and your table configuration ?

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

The debugger displays everything correctly. There are no errors. Both column contents should be displayed, but the columns are still empty.

Array
(
    [read_beob_art] => Array
        (
            [sql] => SELECT `Nachweis`.`nachweismethode` AS 'Nachweis.nachweismethode', Count(Main.beof_id) AS 'Main.total' FROM `mtb_beobachtung_art` AS `Main` LEFT JOIN mtb_beobachtung AS `BEOB` ON Main.beof_id=BEOB.beof_id LEFT JOIN mtb_nachweismethode AS `Nachweis` ON Main.nachweis_id=Nachweis.id_nw WHERE BEOB.user_id=909 GROUP BY nachweis_id ORDER BY nachweismethode ASC
            [returned] => Array
                (
                    [0] => Array
                        (
                            [Nachweis.nachweismethode] => Bäume absuchen
                            [Main.total] => 4
                        )

                    [1] => Array
                        (
                            [Nachweis.nachweismethode] => Eisuche
                            [Main.total] => 1
                        )
Max_admin Max_admin 21 Oct, 2025

Ok, now I need to check your Table view configuration, can you share a screenshot of that ?

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

Correct, I think there is a bug

Please find this file:

/joomla/administrator/components/com_chronoforms8/pages/chronoforms/views/table/output.php

And at line 99:

return Chrono::getVal($row, $column["path"], "");

Change it to:

return isset($row[$column["path"]]) ? $row[$column["path"]] : "";

Does this fix the issue for you ?

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

Hello,

Thank you for your help.My test has shown:When I preview the form in the backend using the "Preview" button, the table is displayed correctly.When I open the form in the backend in the Forms list using the "Front" button, the table is not yet displayed, and the debugger only shows the SQL query in the info field without the array result.

Array
(
    [read_beob_art] => Array
        (
            [sql] => SELECT `Nachweis`.`nachweismethode` AS 'Nachweis.nachweismethode', Count(Main.beof_id) AS 'Main.total' FROM `mtb_beobachtung_art` AS `Main` LEFT JOIN mtb_beobachtung AS `BEOB` ON Main.beof_id=BEOB.beof_id LEFT JOIN mtb_nachweismethode AS `Nachweis` ON Main.nachweis_id=Nachweis.id_nw WHERE BEOB.user_id=0 GROUP BY nachweis_id ORDER BY nachweismethode ASC
            [returned] => Array
                (
                )

        )

)
Max_admin Max_admin 22 Oct, 2025
1 Likes

Hi Fred

Great, so the fix is working.

If no results are returned on the frontend then you need to check your database query conditions, your WHERE has user_id=0 now

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

And why shouldn't it work in "Where" anymore? It used to work in "Front" too, and I didn't change anything.

BEOB.user_id={user:id}

Max_admin Max_admin 23 Oct, 2025

if the query returns 0 rows then the table is empty or the conditions inside WHERE are not returning any results

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

But it is very strange why the table is displayed in the "Preview" and in the preview with the "Front" button the table is empty.

screen1.jpg
screen2.jpg
Max_admin Max_admin 24 Oct, 2025

Hi Fred

But the "Front" link is testing the form on the frontend, where you should be logged in separately from the backend, however, the "Preview" is testing on the backend, using your admin session.

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

I think we're talking at cross purposes :-)

In both cases, I'm logged in to both the backend and the frontend.

And I want to emphasize again that the debugger previously displayed the correct SQL code in both cases. And the user_id was also not empty! Only after I modified your code is the user_id displayed as empty in the frontend when I click the "Front-Button".

This is still a bug.

Max_admin Max_admin 24 Oct, 2025

But your WHERE statement is showing user_id=0, this would not happen if you were logged in on the frontend.

Please double check your are logged in on the frontend, my code fix should not affect the WHERE statement

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

Damn...I take it all back...I ended up on the wrong login form...grrr...sorry

Max_admin Max_admin 24 Oct, 2025

No problem!

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