WordPress issueshttps://lab.civicrm.org/dev/wordpress/-/issues2021-07-30T16:20:09Zhttps://lab.civicrm.org/dev/wordpress/-/issues/49CiviCRM front end pages broken on WP Latest (master)2021-07-30T16:20:09ZkcristianoCiviCRM front end pages broken on WP Latest (master)WordPress just committed bug fixes `redirect_canonical()` in their master branch. The history is as follows:
Original redirect_canonical issues and patches :
[ticket 11694](https://core.trac.wordpress.org/ticket/11694)
[svn 34492](...WordPress just committed bug fixes `redirect_canonical()` in their master branch. The history is as follows:
Original redirect_canonical issues and patches :
[ticket 11694](https://core.trac.wordpress.org/ticket/11694)
[svn 34492](https://core.trac.wordpress.org/changeset/34492)
2020 redirect_canonical issues :
[ticket 45337](https://core.trac.wordpress.org/ticket/45337)
[ticket 40773](https://core.trac.wordpress.org/ticket/40773)
[ticket 28081](https://core.trac.wordpress.org/ticket/28081)
2020 redirect_canonical svn patches:
[svn 47727](https://core.trac.wordpress.org/changeset/47727)
[svn 47760](https://core.trac.wordpress.org/changeset/47760)
[svn 47761](https://core.trac.wordpress.org/changeset/47761)
[svn 47759](https://core.trac.wordpress.org/changeset/47759)
2020 redirect_canonical Git patches:
[47727](https://github.com/WordPress/wordpress-develop/commit/af596bcc5b37b259982b3e7af4a8c5ab41b8e27e)
[47760](https://github.com/WordPress/wordpress-develop/commit/de14ea86bfe7b34cf99276ae356da43cec088c5c)
[47761](https://github.com/WordPress/wordpress-develop/commit/0206900cfff1b44af94f33f95510b18a77f5dd60)
[47759](https://github.com/WordPress/wordpress-develop/commit/54c8470bd625c843a00f1ecca328c22d279b9632)
[changelog for canonical.php](https://github.com/WordPress/WordPress/commits/master/wp-includes/canonical.php)
These WP changes are correct, the root of the issue is that CiviCRM used `page=CiviCRM` was used on the front end. It should only have been used on the back end. We've gotten away with this for 8 years, it's now time to fix.
The issue is that `canonical_redirect()` now properly strips `page=CiviCRM` from front end pages.
https://wplatest.tadpole.cc is an example site running master of both WP and CiviCRM. CiviCRM pages built with shortcode pages load, but if you take action - try and contribute, submit a profile, click on a link to register on an event info page - 404.
Pages that are linbked to directly - cleanurls or ugly urls, 404.
We need to remove `page=CiviCRM` from the front end pages.
We need to do this before WP updates and we need to backport to ESR as this will break all WP CiviCRM sites.
There is no way understate that if we do dont fix ALL WP Sites will break on update. And if WP does this as aminor release that gets pushed out via auto-update :boom: :bomb:5.26.0https://lab.civicrm.org/dev/wordpress/-/issues/16Fatal error with some versions of PHP2020-06-17T09:07:23ZhaystackFatal error with some versions of PHPThere's [a Stack Exchange report](https://civicrm.stackexchange.com/questions/27723/cant-use-function-return-value-in-write-context-in-civicrm-php-on-line-342) of the CiviCRM plugin throwing a fatal error on PHP 7.2.12.
This seems to be...There's [a Stack Exchange report](https://civicrm.stackexchange.com/questions/27723/cant-use-function-return-value-in-write-context-in-civicrm-php-on-line-342) of the CiviCRM plugin throwing a fatal error on PHP 7.2.12.
This seems to be because of `empty( session_id() )` when running `CiviCRM_For_WordPress::setup_instance()`.
PR to follow.haystackhaystack