10up / distributor

Share content between your websites.
https://distributorplugin.com
GNU General Public License v2.0
628 stars 155 forks source link

upgrading from 1.91 to 2.01 is causing issues with Elementor #1161

Open espechtcfe opened 9 months ago

espechtcfe commented 9 months ago

Describe the bug

Our site uses Elementor for most of the content. We've updated our code to be compatible with Distributor 2 +, and when we update the code on our site (before updating Distributor) everything is fine. But when we update Distributor to 2.01, we get strange results where some categories of content show, while others don't.

The migration actions for the canonical urls cause the edit forms for elementor to break. Distributor 2.0.1 is also affecting the way elementor queries based on taxonomy when displaying lists of posts both on the home page and archive pages. The taxonomy being affected is wordpress's default category taxonomy.

Please let me know if you have any ideas.

Steps to Reproduce

Here are the changes we've made to our code for the 2+ upgrade:

CODE EXAMPLE: function disable_canonical_filters_and_actions_from_dt_and_yoast() { // dt canonical functionality remove_filter( 'get_canonical_url', '\Distributor\Hooks\get_canonical_url', 10, 2 ); // yoast canonical functionality remove_filter( 'wpseo_canonical', '\Distributor\Hooks\wpseo_canonical', 10, 2 ); } add_action( 'plugins_loaded', NAMESPACE . '\disable_canonical_filters_and_actions_from_dt_and_yoast', 10 );

The 'template redirect' actions and affects the way users, who are the author of posts, are being carried over and displayed when using elementor template to display that information. This affects both the single-post page as well as postcards on archive pages

CODE EXAMPLE: function remove_distributor_canonicalization() { remove_action( 'template_redirect', array( '\Distributor\ExternalConnections\WordPressExternalConnection', 'canonicalize_front_end' ), 10 ); remove_action( 'template_redirect', array( '\Distributor\InternalConnections\NetworkSiteConnection', 'canonicalize_front_end' ), 10 ); } add_action( 'init', NAMESPACE . '\remove_distributor_canonicalization', 10 );

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

6.4.1

Code of Conduct