TypeRocket / core

TypeRocket core source files where all the magic lives.
https://typerocket.com
36 stars 21 forks source link

Polylang issue #57

Closed ozergul closed 2 years ago

ozergul commented 5 years ago

Hello When adding translate to existing post with Polylang, it gives error:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function TypeRocket\Http\Responders\Hook::taxonomies(), 1 passed in C:\xampp\htdocs\epos-guest\wp-includes\class-wp-hook.php on line 288 and exactly 3 expected in C:\xampp\htdocs\epos-guest\wp-content\themes\epos-guest-cms\typerocket\vendor\typerocket\core\src\Http\Responders\Hook.php:55 Stack trace: #0 C:\xampp\htdocs\epos-guest\wp-includes\class-wp-hook.php(288): TypeRocket\Http\Responders\Hook::taxonomies(2315) #1 C:\xampp\htdocs\epos-guest\wp-includes\class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #2 C:\xampp\htdocs\epos-guest\wp-includes\plugin.php(465): WP_Hook->do_action(Array) #3 C:\xampp\htdocs\epos-guest\wp-includes\taxonomy.php(2987): do_action('edit_term', 2315, 2315, 'post_translatio...') #4 C:\xampp\htdocs\epos-guest\wp-content\plugins\polylang-pro\modules\sync\sync-post.php(313): wp_update_term(2315, 'post_translatio...', Array) #5 C:\xampp\htdocs\epos-guest\wp-content\plugins\polylang-pro\modules\sync\sync-post.php(260): PLL_Sync_Pos in C:\xampp\htdocs\epos-guest\wp-content\themes\epos-guest-cms\typerocket\vendor\typerocket\core\src\Http\Responders\Hook.php on line 55

ozergul commented 5 years ago
   static public function taxonomies($term_id, $term_taxonomy_id, $taxonomy) {
        $responder = new TaxonomiesResponder();
        $responder->taxonomy = $taxonomy;
        $responder->hook = true;
        $responder->respond([ 'id' => $term_id ]);
    }
kevindees commented 5 years ago

@ozergul

Can you post a link to the plugin you are using? Is this it? https://wordpress.org/plugins/polylang/

ozergul commented 5 years ago

@kevindees Yes, it is Polylang Pro.

kevindees commented 2 years ago

Hey @ozergul

We have added several updates to help with localization under the hood over the last few years. I just wanted to follow up on this one and let you know we have been making progress.

Thanks, Kevin

ozergul commented 2 years ago

Hey thanks for update, I was able to achieve this problem with another way. Thanks for this perfect framework!