Skip Navigation

[Resolved] Toolset needs to update the database.

This support ticket is created 4 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 6 replies, has 3 voices.

Last updated by Jamal 4 years, 11 months ago.

Assisted by: Jamal.

Author
Posts
#1872383
error.png

Tell us what you are trying to do?

I moved my production to the demo install to run the toolset database update here hidden link

After the database update, the table made with the toolset is not showing up on this page hidden link

There is an error on the website. See attached.

What is the link to your site?
hidden link

All toolset plugins are updated. Current WordPress version 5.6

Please let me know if you need access to the demo install.

Thank you,
Olga

#1872855

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Olga

The error refers to code in your child theme (functions.php line 301).

You presumably have some custom code on your site that references the Toolset APIs or similar, can you share the code where the error occurs and we can look to see if we can spot the issue. If you are not comfortable opening and editing that file, you can copy the whole file to somewhere like dropbox and share a link here.

I should point out that support doesn't cover custom code, but we'll be happy to at least take a look to see if we can spot the problem.

#1873203
code.png

Hi Nigel,

Here is the code where the error occurs. Please see attached, more code.
Let me know if you need access to the ftp. We appreciate your help.

// Output-loop
global $wpdb;
$sqloutput = $wpdb->get_results($querystr, Object);

if ($sqloutput)
{
$html_output = $html_output."<div class='product-range-header'><h3>".$a['productrange_name']."</h3></div>";

foreach ( $sqloutput as $sqloutp )
{
$productsize = $sqloutp->meta_value;

$args = array(
'name' => 'view-all-inst-drawings',
'productrange' => $a['productrange_id'],
'productsize' => $productsize//,
//'orderby' => "load-class"
);
//echo "Range: ".$a['productrange_id']." | Size: ".$productsize." <br> " ;
//$html_output = $html_output.$productsize ." <br> ";
$html_output = $html_output.render_view( $args );
}
}
else
{
//$html_output = $html_output."No product downloads found for ". $a['productrange_id'];
}

#1873873

Hello Olga,

I believe that you need to use "OBJECT" in capital letters instead of "Object" in line 301. Check the documentation for the get_results function here https://developer.wordpress.org/reference/classes/wpdb/get_results/

I hope this helps. Let me know if you have any questions.

#1874007
line 328.png
line 262.png

Hello Jamal,

I correct it to the capital letters "OBJECT" in the lone 301.
I think it is fixed now.

But I have other errors now:

- Notice: Undefined variable: html_output in /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-content/themes/totalbusiness-child/functions.php on line 262
See attached the code for line 262.

- Notice: Undefined variable: html_output in /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-content/themes/totalbusiness-child/functions.php on line 328
See attached the code for line 328.

Can you please take a look at these errors?

Thank you for your help,
Olga

#1874025
class-wp-hook.php on line 289.png
totalbusiness-childfunctions.php on line 358.png

sorry, here is another error:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function auto_process_sort_field(), 1 passed in /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/class-wp-hook.php on line 289 and exactly 2 expected in /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-content/themes/totalbusiness-child/functions.php:358 Stack trace: #0 /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/class-wp-hook.php(289): auto_process_sort_field(13603) #1 /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/post.php(4309): do_action('save_post', 13603, Object(WP_Post), false) #4 /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-includes/revision.php(334): wp_insert_po in /var/www/vhosts/hydrotrenchdrains.com/demo.hydrotrenchdrains.com/wp-content/themes/totalbusiness-child/functions.php on line 358

#1874065

For the first error, I guess that you can patch the file by adding the following line at respectively lines 227, 302.

$html_output = "";

Regarding the last error, I think that you will have to check with your theme authors. They are adding a function as a hook with an error. The function expects two arguments, but it only gets 1.

Please note that a child theme is considered custom code, and is therefore out of the scope of this support forum. Please reach to your theme's author for assistance or hire a developer. You may consider our partners here https://toolset.com/contractors/
https://toolset.com/toolset-support-policy/