xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
406 stars 116 forks source link

Breaks translated permalinks for Polylang Pro #1498

Open tharsheblows opened 1 month ago

tharsheblows commented 1 month ago

Bug Report

Breaks translated permalinks for Polylang Pro

Expected Behavior

Stream does not break the translated permalinks in Polylang Pro.

Actual Behavior

The admin panel side translated page permalinks do not work in certain conditions.

Steps to Reproduce the Problem

from forum description:

Steps to reproduce:

  1. Install Polylang plugin
  2. Under wordpress Permalink Settings make sure to have Custom Structure /%category%/%postname%/
  3. Create translations for some category and verify permalinks for translated posts with this category works.
  4. Install Stream plugin.
  5. Update permalinks from Admin Panel side (for example, change translations of category) and see that translated pages permalinks does not work.

(Permalink regeneration from client side works, so this made this problem hard to catch)

As far as I understood from debug backtrace, WP_Stream\Connector_Blogs steals Polylang Pro action ‘do_prepare_rewrite_rules’ from ‘wp_loaded’. Probably because of this, did_action( ‘wp_loaded’ ) returns true for polylang. ... setup must be Multisite with additional blogs.