Project

General

Profile

Bug #10564

PHP 7.2 Incompatibility Problems

Added by Raymond Hoh 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
Start date:
2018-10-19
Due date:
% Done:

0%

Estimated time:

Description

Saw this in the error logs.

Sociable is one of the plugins we hide from sites that do not have it already activated. It uses split(), which has been removed in PHP 7.0.

Not sure why our linter did not pick this up. Going to apply a hotfix in a bit.


Related issues

Related to CUNY Academic Commons - Bug #10570: CUNY DHI landing page broken after menu barResolved2018-10-22

Related to CUNY Academic Commons - Bug #10563: cllicking on links from site menu leads to 500 errorResolved2018-10-19

Related to CUNY Academic Commons - Bug #10562: Commons is downRejected2018-10-19

Related to CUNY Academic Commons - Bug #10588: Missing social icons in Lucid ThemeResolved2018-10-242018-10-30

Related to CUNY Academic Commons - Bug #10689: Featured Image ErrorResolved2018-11-09

Related to CUNY Academic Commons - Bug #10560: PressForward Feed Reader hung up on TLC feed; won't retrieve other feed itemsResolved2018-10-18

Related to CUNY Academic Commons - Bug #9068: PHP 7.2 compatibilityResolved2018-01-09

Related to CUNY Academic Commons - Feature #10380: Remove blacklisted pluginsIn Progress2018-09-25

History

#1 Updated by Boone Gorges 5 months ago

Thanks for catching this - I have already found some other bugs in a theme and put hotfixes in place. I will open a separate ticket for this.

#2 Updated by Raymond Hoh 5 months ago

  • Status changed from New to Resolved

#3 Updated by Raymond Hoh 5 months ago

  • Subject changed from Sociable plugin uses removed split() function to PHP 7.2 Incompatibility Problems
  • Status changed from Resolved to In Progress

Renamed the issue so we can track other problems with plugins and themes since the PHP 7.2 deployment.

Plugins:
- openbook-book-data - Uses ereg(), which was removed in PHP 7.0. Fixed in https://github.com/cuny-academic-commons/cac/commit/9dd369e5e17b2d6ea212f9ae30d4d5ce5801cb4f and deployed as a hotfix.
- tylr-slidr - Uses split(), which was removed in PHP 7.0. Fixed in https://github.com/cuny-academic-commons/cac/commit/db04371e3632eb1fdc314509d23ac91bb65e67e4 and deployed as a hotfix.
- easy-visualization-tools - Uses invalid array syntax. Fixed in https://github.com/cuny-academic-commons/cac/commit/827481fd0e7689bebc9ca1a610a3efaa656ffba0 and deployed as a hotfix.
- layerslider - Uses invalid array syntax. Fixed in https://github.com/cuny-academic-commons/cac/commit/913bddde9ccf6ef3bf7ed64cc0d0f4fc47013d3e and deployed as a hotfix.

Themes:
- thematic - Uses ereg() and ereg_replace(), which was removed in PHP 7.0. Fixed in https://github.com/cuny-academic-commons/cac/commit/306bdcb6cee041a9a6d3ca56f66508ceea69b19f and deployed as a hotfix.

#4 Updated by Raymond Hoh 5 months ago

I fixed a few other fatal errors unrelated to the PHP 7.2 upgrade that showed up in the logs:
https://github.com/cuny-academic-commons/cac/compare/9dd369e5e1...ac4df58

These haven't been deployed as hotfixes, but are staged for 1.13.12.

#5 Updated by Boone Gorges 5 months ago

Thanks, Ray.

https://github.com/cuny-academic-commons/cac/commit/66fcd9aed135fc097cde087f0c4cc1f9ee1310c6 contains fixes for the Atahualpa theme.

These didn't get caught because they're not detected by PHP's linter. I guess you need static analysis tool for deprecated/removed functions. I'll look into setting this up.

#6 Updated by Boone Gorges 5 months ago

backtype-connect caused some fatals due to incorrect use of wpdb::prepare(). Fixed in https://github.com/cuny-academic-commons/cac/commit/1bd2dd37a88ae07d5748ae7c9ec2c24d02034595

#7 Updated by Boone Gorges 5 months ago

  • Related to Bug #10570: CUNY DHI landing page broken after menu bar added

#8 Updated by Boone Gorges 5 months ago

  • Related to Bug #10563: cllicking on links from site menu leads to 500 error added

#9 Updated by Boone Gorges 5 months ago

#10 Updated by Boone Gorges 5 months ago

  • Target version changed from 1.13.12 to 1.13.13

Let's keep this open as they trickle in over the next week or two.

#11 Updated by Boone Gorges 5 months ago

  • Related to Bug #10588: Missing social icons in Lucid Theme added

#14 Updated by Boone Gorges 4 months ago

  • Related to Bug #10689: Featured Image Error added

#15 Updated by Boone Gorges 4 months ago

In https://github.com/cuny-academic-commons/cac/commit/77ddf400f6dc9e81a8b85faef48970f59de9e7fc I added a composer setup so that you can use the PHPCompatibility-WP tool. Run `composer install`, then:

./vendor/bin/phpcs -p wp-content/plugins/gallerypress/ --standard=PHPCompatibilityWP --runtime-set testVersion 7.2-

Change the path to match what you're scanning. Running on the whole codebase takes a very long time, so I'll see what can be done about targeting it more, and integrating into CI.

#16 Updated by Boone Gorges 4 months ago

  • Related to Bug #10560: PressForward Feed Reader hung up on TLC feed; won't retrieve other feed items added

#17 Updated by Boone Gorges 4 months ago

  • Target version changed from 1.13.13 to 1.14.1

#18 Updated by Boone Gorges 4 months ago

  • Related to Bug #9068: PHP 7.2 compatibility added

#19 Updated by Boone Gorges 4 months ago

A bunch more updates. Some are hotfixes (as in the case of abandoned plugins). Some are cases where I've determined that the linter can safely skip the file/folder, generally because the code is never loaded on the Commons.

- powerpress https://github.com/cuny-academic-commons/cac/commit/fc97a38aacdfde9b3208d0025840ce0babc5b134
- bp-reply-by-email https://github.com/cuny-academic-commons/cac/commit/aa007440e7e6126bce601062b850dfeada2dff89
- layerslider https://github.com/cuny-academic-commons/cac/commit/ff9fb8d7324bf826364937ecf650a63ae0603bf9
- wp-document-revisions https://github.com/cuny-academic-commons/cac/commit/a182d653dfeea69f85c6a19ff36b213f29cefe19
- widgetize-google-gadgets https://github.com/cuny-academic-commons/cac/commit/515aba86a59af49a9487bc6d0f23f1fb1fcedf9e Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/4ae099bb5aa1c338dd14d08662673b755990456d
- backtype-connect https://github.com/cuny-academic-commons/cac/commit/2b84f0828c33645eec4e0305412974ba0644180d
- wp-ui https://github.com/cuny-academic-commons/cac/commit/3a04dfe5b7fc6241a79073ab0ae549da6b22bbcb
- newsletters-lite https://github.com/cuny-academic-commons/cac/commit/557f03a42b1c18d5eec0a34a7e248228918234c9
- wordpress-mobile-edition https://github.com/cuny-academic-commons/cac/commit/edf56f7be2e82c753feb1b2d318a7c8df78bdb21 Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/1436add0ee50e310b3007c2e874fd6f8f4fed01b
- wp-security-scan https://github.com/cuny-academic-commons/cac/commit/0b9a36c642761953c31e5a8b93e4e0421f95ce74 Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/f13f41bb074ccd60ab6f68eae9b00ed940033e43
- event-organiser https://github.com/cuny-academic-commons/cac/commit/1774591197bb072751c2479dca522898c79aefbc
- query-monitor https://github.com/cuny-academic-commons/cac/commit/ef22a75815e243bc82ab6fc4c625e9974cca6022 https://github.com/cuny-academic-commons/cac/commit/71b365b18dde33bfd6dd1ec2b5ad251e88dbb456
- wp-rss-multi-importer https://github.com/cuny-academic-commons/cac/commit/489ba483c6894d6a7824ac6c50e45b513e4768fa
- threewp-broadcast https://github.com/cuny-academic-commons/cac/commit/e229c6a8f3a8638df03a5ab0b09418cac605691b
- oauth2-provider https://github.com/cuny-academic-commons/cac/commit/b6b7359f44a53e5ca1f4d3d9848273696516ca95
- now-reading https://github.com/cuny-academic-commons/cac/commit/94385a7630d2f6cbb84179bc12801bdabf39b9ed Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/0f2e6065623bbce524275b0db886e6ab5bd35766
- buddypress https://github.com/cuny-academic-commons/cac/commit/191879405b48be3b898c8e9d5ce41f93b940c751
- tablepress https://github.com/cuny-academic-commons/cac/commit/d70e7cf43af65d3513e57d34c4298ddc55b0a26b
- bp-rbe-inbound-forum-attachments https://github.com/cuny-academic-commons/cac/commit/833092fb5a4db6a6408da41ccb24f379033b5405
- statpress-visitors https://github.com/cuny-academic-commons/cac/commit/f63441481a5b9c5b325549f59bf7d75d4c366bc9 Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/262d0c6447ab9cf5260f5d8168d13fec738bb0af
- archiveorg-wp https://github.com/cuny-academic-commons/cac/commit/6f4cf2f6655e133f888dd20ba2f3c89ea5b4ea1a
- easy-visualization-tools https://github.com/cuny-academic-commons/cac/commit/0261d7e811550acef7adafd94fb219a83926d66e
- sign-up-sheets https://github.com/cuny-academic-commons/cac/commit/964618bf2c14162b715154ac9d4697088e309a82, https://github.com/cuny-academic-commons/cac/commit/2c35ee0b049f733a7660d80b1a95d0264a934d17
- tantan-flickr https://github.com/cuny-academic-commons/cac/commit/49de7af44dd0f1048a2cbc83f355866511d559d6 Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/e75230cb507b79c809fdb894efbce86616820b05
- dd-formmailer https://github.com/cuny-academic-commons/cac/commit/57adc92d6c6d00eeed18cc03537d70baa8a65930
- btcnew https://github.com/cuny-academic-commons/cac/commit/fd26a7ef6a36ad19afd9865aab2eaf8fbb4fca4c
- rss-importer https://github.com/cuny-academic-commons/cac/commit/ca4229fe5bf4fcaf4f1793132999edda21a42131 Also added to activation blacklist https://github.com/cuny-academic-commons/cac/commit/b18308ddbdc0f3a0600ed55def60ea6b840b2aab
- pressword/digitalgrants (themes) https://github.com/cuny-academic-commons/cac/commit/d1ccede7dd75dc7154a4cf33ae09bf36430d6b67
- crisp (theme) https://github.com/cuny-academic-commons/cac/commit/7e17764465355eda0f46f639e905e2751c7b507c

In cases where I've added a plugin to the activation blacklist, I'll review it for removal as part of #10380

#20 Updated by Boone Gorges 4 months ago

#21 Updated by Matt Gold 4 months ago

Thank you, Boone!

#22 Updated by Boone Gorges 4 months ago

I've completed the process for themes:

- arras-theme https://github.com/cuny-academic-commons/cac/commit/623b5f78d15aaf3c033ff0ea50c8a176e82f9136
- primepress https://github.com/cuny-academic-commons/cac/commit/ed536bf66ff6b832f603158f4eabaabe8cae6685
- project-ar2 https://github.com/cuny-academic-commons/cac/commit/6127d6454f8eb4ac4482c43ef8a87389ede63d68
- antisnews https://github.com/cuny-academic-commons/cac/commit/e3c7c7298e851aef094c85d20e6379a0fa21303a
- clean https://github.com/cuny-academic-commons/cac/commit/f17e42d2539c731e6acf13ea601a8bcf7bd4ffe2
- MistyLook3 https://github.com/cuny-academic-commons/cac/commit/dbb32cbf7dc6b1ac4dfd737dd010d39092ffbce5
- MistyLook2 https://github.com/cuny-academic-commons/cac/commit/ae9cadc87c7844b8c8009cc6c14f068b71989dfc
- classipress https://github.com/cuny-academic-commons/cac/commit/c7224175078b04ca9684f4be1299720d838196d4
- MistyLook https://github.com/cuny-academic-commons/cac/commit/c9deb7e3f0d5ba8640d254f9927e6f590603319c
- simplicity https://github.com/cuny-academic-commons/cac/commit/2c093358b0fb63b97d7263da04b0ace56d65bcf1
- basic https://github.com/cuny-academic-commons/cac/commit/c95e4daa76f795636c51dc28e0fcfa613bf81428
- aperture https://github.com/cuny-academic-commons/cac/commit/c882a38bca2f21bb84433168fb307ceab66d24c8
- themorningafter https://github.com/cuny-academic-commons/cac/commit/7fddcd8f337e118784c60e920479102fe34e7976
- bigeasy https://github.com/cuny-academic-commons/cac/commit/bdfaf6129eb496d77b37af6545da7ac745d6fba2
- nelo-for-tags https://github.com/cuny-academic-commons/cac/commit/188d9fb8a002e05ab471f6a4ca9ea29264e9530a
- spectrum https://github.com/cuny-academic-commons/cac/commit/68d82d8da9a50d9eed45ab61677594f7d9730332
- elemental https://github.com/cuny-academic-commons/cac/commit/74a274335ff1bc56bcbc1b9b08bf7fcc3f959b05
- digitalgc https://github.com/cuny-academic-commons/cac/commit/b8217c09aec1b4a93610291c49e4f73d4031f448
- beachland https://github.com/cuny-academic-commons/cac/commit/d5b8bf7c7f2297db73c6e62989b2a21bbede1ebf
- object https://github.com/cuny-academic-commons/cac/commit/568005b5c3c09470d7606e3e9b023b21793e5d17
- backstage https://github.com/cuny-academic-commons/cac/commit/9d8f0052b98e1d7740a84de5f61c59479f31d6a6
- bluesky https://github.com/cuny-academic-commons/cac/commit/218d0d3191f45b4314e2bbaaab03740cd655ed83
- velvet https://github.com/cuny-academic-commons/cac/commit/f18a69af65929b76a0021c0cea7f7379f4ea8ca0
- atahualpa https://github.com/cuny-academic-commons/cac/commit/d64c79ea39eebab7813b263cbbbb505b636b9231
- Blix https://github.com/cuny-academic-commons/cac/commit/88e0fe99ed6022cd109e757550ccf3d0dd195619
- abstract https://github.com/cuny-academic-commons/cac/commit/5b9a4feb66f68c0f1b22684834b3be02a85b05c1
- crisp https://github.com/cuny-academic-commons/cac/commit/d571150b599e2b128eebb41719084661dee1bc24
- papercut https://github.com/cuny-academic-commons/cac/commit/9405caa5ce283babb1c6ee46cc8a8fb8f15a9a16
- continuum https://github.com/cuny-academic-commons/cac/commit/07df2109ac52249c8fbb1233cf1e70bff93dfa97
- carrington-blog https://github.com/cuny-academic-commons/cac/commit/679cccdedf235556f74799a1a54b1d127667dd1b
- Simplr https://github.com/cuny-academic-commons/cac/commit/c352d5d15d9478260830f26e57d45d0a8c30995c
- freshnews https://github.com/cuny-academic-commons/cac/commit/cf34ea9a95dc75decad8cd8c5956ad4039b64649
- arthemia https://github.com/cuny-academic-commons/cac/commit/6eda34b3d81e6e6f3696c30c94b7a1c6ee6007b5
- canvas-3.0.6 https://github.com/cuny-academic-commons/cac/commit/a656b9d845659dd1c45e29e5d10de8255b0091d7
- iLoveMusic https://github.com/cuny-academic-commons/cac/commit/3707007ce861028669970785c5440d8683aedb9a
- coda https://github.com/cuny-academic-commons/cac/commit/a12143b8e4d7a2412411a7db6699009acf705999
- sensitive https://github.com/cuny-academic-commons/cac/commit/6112c2682e34d836004e60410c406c3635edd368

#23 Updated by Boone Gorges 4 months ago

A number of themes have been completely removed as part of this initiative in conjunction with #10034. See https://redmine.gc.cuny.edu/issues/10034#note-9, https://redmine.gc.cuny.edu/issues/10034#note-11

Our CI build is now passing, but there's likely a few more things that need to be caught that manifest only in production (like when strings are manipulated as arrays). I'll do a review tomorrow of the fatal error log to catch these instances.

#24 Updated by Boone Gorges 4 months ago

  • Status changed from In Progress to Resolved

I have fixed many more instances. See https://github.com/cuny-academic-commons/cac/search?q=10564&type=Commits.

Looking over fatal errors from the last few days, I'm pretty sure I've got all (or nearly all) of those that are related to PHP incompatibility. I also tackled a fair number of warnings related to PHP compat.

There are a few more persistent warnings showing up in the logs. Some of them are associated with plugins that are actively maintained, so I don't want to hotfix them. (feedwordpress is one example.) Others come from Apache config ("hostname provided via sni...") and so are not things we can fix. Still others are due to what are, I'm sure, legit bugs, but the causes and fixes are not obvious. (For example, we're getting lots of "not countable" errors from update_metadata(), which implies that something's passing bad values into the function; I've set up a logger for this.)

Given the above, I'm going to close the ticket. Additional issues can reference this one.

#25 Updated by Boone Gorges 4 months ago

Quick follow-up related to the update_metadata() issue - I tracked it down to pressforward. More details https://github.com/PressForward/pressforward/pull/1025, hotfix in https://github.com/cuny-academic-commons/cac/commit/60e8ed5c869c91e536acee8daae2f504ddc50675

#26 Updated by Matt Gold 4 months ago

I feel like the Commons has just gotten a really good scrubbing with a hard-bristle brush. Thank you so much for cleaning out, pruning, and fixing so much of this junk!!!

#27 Updated by Raymond Hoh 4 months ago

Agreed. Thanks for putting in the work into our CircleCI integration, Boone!

And for all the subsequent manual fixes.

Also available in: Atom PDF