Jump to content

NielsVee

New Members
  • Posts

    4
  • Joined

  • Last visited

NielsVee's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have found the a fix for my problem. I had to change a line in the Wordpress Base code to make my theme compatible again. https://wordpress.stackexchange.com/questions/406260/wordpress-6-0-class-wp-widget-php-fatal-errors-in-php-8-1-6 This is the fix I applied and all of the sudden the theme worked again.
  2. The previous webdesigner didn't change themes recently. She basically converted her Joomla theme to a Wordpress theme and set them to me. I already transitioned one of the websites without any trouble. But this one seems to be a bit different. She used the same template for all of the sites and changed the styling.
  3. Thanks for your quick response. I tried to fix it, but it seems like it didn't work. I now found out about the debugging mode of Wordpress and it gave some guidance on where to look. I fixed the theme issues, but now I get a different error that makes me think my Wordpress install isn't good anymore. This is the current error: [25-Mar-2023 21:28:36 UTC] PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function "theme_widget_process_control" not found or invalid function name in /wp-includes/class-wp-hook.php:308 Stack trace: #0 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #1 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #2 wp-includes/class-wp-customize-widgets.php(342): do_action('sidebar_admin_s...') #3 wp-includes/class-wp-hook.php(308): WP_Customize_Widgets->customize_controls_init('') #4 wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) #5 wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 wp-admin/customize.php(112): do_action('customize_contr...') #7 {main} thrown in wp-includes/class-wp-hook.php on line 308 Which refers to this function: public function apply_filters( $value, $args ) { if ( ! $this->callbacks ) { return $value; } $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = array_keys( $this->callbacks ); $num_args = count( $args ); do { $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] ); $priority = $this->current_priority[ $nesting_level ]; foreach ( $this->callbacks[ $priority ] as $the_ ) { if ( ! $this->doing_action ) { $args[0] = $value; } // Avoid the array_slice() if possible. if ( 0 == $the_['accepted_args'] ) { $value = call_user_func( $the_['function'] ); } elseif ( $the_['accepted_args'] >= $num_args ) { $value = call_user_func_array( $the_['function'], $args ); } else { $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) ); } } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); unset( $this->iterations[ $nesting_level ] ); unset( $this->current_priority[ $nesting_level ] ); $this->nesting_level--; return $value; } The highlighted part is line 308. It seems fine to me, but I am in no way a PHP expert.
  4. I took over a couple of website from a former webdesigner who wanted to quit and now I am transitioning the websites from Joomla to Wordpress. She sent me all the templates that I should be able to import in WP. When I do import a theme, I break all of WP. I checked everything and it is indeed the theme. With WP recovery mode I was able to determine the specific file and lines that are causing the trouble. The file is functions.php and the problem is this piece of code: function theme_get_option($name) { global $theme_default_options; $result = get_option($name); if ($result === false) { $result = theme_get_array_value($theme_default_options, $name); } return $result; } The bolded function is undefined and causes trouble. I tried to change it into array_values which WP should be able to read, but it didn't work. I am hoping that one of you cool people could help me.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.