• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

[SOLVED] 12 arguments are required, 2 given

Status
Not open for further replies.
With php8 you must update from GitHub.
But nobody reported ever such an error so I don't think it's coming from Fabrik.
Anyway
Where? Enable Joomla System Debug to get an error stack.
 
Did'nt help updateing from github.
Did'nt change anything change to joomla own template.
 
If you want to get help please read anwers to your questions, give necessary informations etc.
But nobody reported ever such an error so I don't think it's coming from Fabrik.
Anyway
Where? Enable Joomla System Debug to get an error stack.
 
It seems like it's the calculation field that I use...
When using php8 or above there is a problem.
upload_2023-2-22_7-58-0.png
 
Last edited:
Which exact Fabrik and Joomla version are you running?
Which Joomla template is showing such an error page?

The given code lines don't match the recent Fabrik 3 GitHub version.

So please update from GitHub.
- Fabrik3: WIKI: Update from GitHub (especially if you are using PHP8)

Additionally check your code in your calc element. It seems to create an error.
 
Someone knows more about code , that can help me, this is my calc element.
PHP:
// Get a db connection.
$db = JFactory::getDbo();

// Create a new query object.
$query = $db->getQuery(true);

//Select all records from the nemmanus_elementer table where elementer_manus_id same as nemmanus_manus___manus_id.
$query->select($db->quoteName(array('elementer_duration')));
$query->from($db->quoteName('nemmanus_elementer'));
$query->where($db->quoteName('elementer_manus_id') . ' = ' . $db->quote('{nemmanus_manus___manus_id}'));

// Reset the query using our newly populated query object.
$db->setQuery($query);

// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$durations = $db->loadObjectList();

$myDur = 0;
foreach ($durations as $duration)
{
    $myDur+= strtotime("1970-01-01" . $duration->elementer_duration . "Z");
}

if ($counts <> 0) {
$output = sprintf('%02d:%02d:%02d', ($myDur/ 3600),($myDur/ 60 % 60), $myDur% 60);
return $output;
} else {
$output = sprintf('%02d:%02d:%02d', ($myDur/ 3600),($myDur/ 60 % 60), $myDur% 60);
return $output;
}

Seems that my sprintf code are the problem, but why?
 
Last edited:
I have now hardcoded the $output, then the error looks like this:
upload_2023-2-23_17-6-57.png

Do you get anything usefull out of that?
 
Last edited:
As the error message tells you: "Undefined variable $counts" (which produces only a Notice in php7 but a warning in php8).
So fix your calc code.


But thanks to your example the issue about non-escaped-% in eror logging showed up;)
 
Now I got rid of the counts problem.
I get a implicit conversion error now:
upload_2023-2-24_8-27-22.png

How can I find thatconversion error?
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top