Intelartifice
Member
Hi,
I encouter an "issue" surely not but :
I have two list with :
the first :user info and a repeat group
the second with a request form
On the request form in the first group with pagination
A databasejoin element {request___user_lastname_raw}
And a calc element displaying all users's records in the first repeat group :
My code in the calc element :
$userId = '{request___user_lastname_raw}';
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('user_filename')->from('user_sheet_50_repeat')->where('parent_id = ' . $myDb->quote($userId));
$myDb->setQuery($myQuery);
$result = $myDb->loadObjectList();
foreach($result as $value){
foreach($value as $key => $data){
echo ($data) ."<br />";
}
echo "<br />";
}
And it's ok the records are displayed.
But when I click on the "next" button it's doing nothing. It's like the loop doesn't stop. I've tried with break but still the same.
I get "SyntaxError: Unexpected token C in JSON at position 0" in the console when i click on "next" button.
If I unpublish the clacl element all goes fine
What i forgot ???
Thanks for helping
I encouter an "issue" surely not but :
I have two list with :
the first :user info and a repeat group
the second with a request form
On the request form in the first group with pagination
A databasejoin element {request___user_lastname_raw}
And a calc element displaying all users's records in the first repeat group :
My code in the calc element :
$userId = '{request___user_lastname_raw}';
$myDb = JFactory::getDbo();
$myQuery = $myDb->getQuery(true);
$myQuery->select('user_filename')->from('user_sheet_50_repeat')->where('parent_id = ' . $myDb->quote($userId));
$myDb->setQuery($myQuery);
$result = $myDb->loadObjectList();
foreach($result as $value){
foreach($value as $key => $data){
echo ($data) ."<br />";
}
echo "<br />";
}
And it's ok the records are displayed.
But when I click on the "next" button it's doing nothing. It's like the loop doesn't stop. I've tried with break but still the same.
I get "SyntaxError: Unexpected token C in JSON at position 0" in the console when i click on "next" button.
If I unpublish the clacl element all goes fine
What i forgot ???
Thanks for helping
Last edited: