Conversation
supportI am trying to duplicate and it doesn’t complete, just ends up with a “There has been a critical error on this website.”. I’ve got a log file if required.
Hi. I got the same problem. Were you able to find a solution?
Same problem here, debugged this into the issue with PHP 8.2 + Polylang which causes an error “cannot call translate on null” on line if ( $mo->translate( $old_values ) === $values ) { in polylang. TLDR: if polylang related try adding // Disable some Polylang filters to avoid errors during the process global $wp_filter; foreach ($wp_filter as $hook_name => $hook) { if (isset($hook->callbacks)) { foreach ($hook->callbacks as $priority => $callbacks) { foreach ($callbacks as $callback) { if (is_array($callback[‘function’]) && isset($callback[‘function’][0]) && $callback[‘function’][0] instanceof PLL_Translate_Option) { $wp_filter[$hook_name][$priority][] = $callback[‘function’]; remove_filter($hook_name, $callback[‘function’], $priority); } } } } } After switch_to_blog(1); in file duplicate.php
I’m not sure what Polylang is? I haven’t tried it again recently but need to duplicate a site in the next few days.
Hi. I got the same problem. Were you able to find a solution?
Same problem here, debugged this into the issue with PHP 8.2 + Polylang which causes an error “cannot call translate on null” on line if ( $mo->translate( $old_values ) === $values ) { in polylang. TLDR: if polylang related try adding // Disable some Polylang filters to avoid errors during the process global $wp_filter; foreach ($wp_filter as $hook_name => $hook) { if (isset($hook->callbacks)) { foreach ($hook->callbacks as $priority => $callbacks) { foreach ($callbacks as $callback) { if (is_array($callback[‘function’]) && isset($callback[‘function’][0]) && $callback[‘function’][0] instanceof PLL_Translate_Option) { $wp_filter[$hook_name][$priority][] = $callback[‘function’]; remove_filter($hook_name, $callback[‘function’], $priority); } } } } } After switch_to_blog(1); in file duplicate.php
I’m not sure what Polylang is? I haven’t tried it again recently but need to duplicate a site in the next few days.