New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLP minimum WP requirement is currently 4.7, but documentation claims 4.2 #301

Closed
lkraav opened this Issue Mar 9, 2018 · 2 comments

Comments

2 participants
@lkraav
Copy link

lkraav commented Mar 9, 2018

Version Information

  • WordPress: 4.5
  • MultilingualPress: 2.11

Steps to Reproduce

  1. Try to activate MLP
  2. Witness 500 error crash

From a3ad597#r26384948

Hi @Dinamiko. I discovered that this line breaks 2.11.0 for WP 4.5, because get_network() is a function for WP 4.6 and up:

$this->nonce_validator = Mlp_Nonce_Validator_Factory::create( 'duplicate_site', (int) get_network()->site_id );

I'm not entirely sure why would a nonce validator thing be a part of a PHPCS commit?

Either way, README.md states 2.11.0 compatibility should be WP 4.2+. This seems to be a documentation bug, but also potentially breaks WP sites who lag behind on core version updates, but get offered the incompatible update.

@lkraav lkraav changed the title MLP minimum WP requirement is currently 4.6, but documentation claims 4.5 MLP minimum WP requirement is currently 4.7, but documentation claims 4.2 Mar 9, 2018

@lkraav

This comment has been minimized.

Copy link

lkraav commented Mar 9, 2018

I updated the subject site to 4.6.x now, and found that MLP's current implementation of wp_parse_url() is only compatible w/ 4.7.0+, or we generate a PHP warning on every request.

https://github.com/inpsyde/MultilingualPress/blob/v2.11.0/src/inc/Multilingual_Press.php#L184

vs

4.7.0 | The $component parameter was added for parity with PHP's parse_url().

https://developer.wordpress.org/reference/functions/wp_parse_url/

Dinamiko added a commit that referenced this issue Mar 13, 2018

@Dinamiko

This comment has been minimized.

Copy link
Contributor

Dinamiko commented Mar 13, 2018

Hi @lkraav,

Thanks for the info :) I have just upgraded minimum WP version to 4.7: 5aa9d47

@Dinamiko Dinamiko closed this Mar 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment