BeAPI / bea-media-analytics

Find where and how media are used across your site.
https://wordpress.org/plugins/bea-media-analytics/
Other
15 stars 2 forks source link

WP 6.0 #88

Open Rahe opened 2 years ago

Rahe commented 2 years ago

Test and release new version compatible with WP 6.0 if needed

porg commented 1 year ago
  1. Not having been aware of your plugin, I had submitted a user story + UX design for a minimal MVP to WP-Core: As a website editor I want to find out which media asset (image, video, etc) is used on which pages / posts
  2. I was made aware of your plugin and realized it fulfills most aspects of my MVP.
    • So yes, for starters I'd love to just use your plugin as-is in WP 6.x!
    • šŸ™ But sadly your plugin fails fatally, see php_error.log below.
    • Maybe you also want look at some ideas in the proposal and also some of the ongoing discussion there.

In WP 6.1.1 the plugin fails like this

[03-Feb-2023 19:50:28 UTC] PHP Warning:  Undefined array key "file" in /my-document-root/wp-content/plugins/media-file-renamer/classes/rest.php on line 349
[03-Feb-2023 21:52:33 UTC] PHP Warning:  The magic method BEA\Media_Analytics\Singleton::__wakeup() must have public visibility in /my-document-root/wp-content/plugins/bea-media-analytics/classes/singleton.php on line 59
[03-Feb-2023 21:53:49 UTC] PHP Fatal error:  Uncaught Error: Non-static method BEA\Media_Analytics\Main::force_indexation() cannot be called statically in /my-document-root/wp-content/plugins/bea-media-analytics/classes/crons.php:44
Stack trace:
#0 /my-document-root/wp-includes/class-wp-hook.php(308): BEA\Media_Analytics\Crons->cron_force_indexation()
#1 /my-document-root/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#2 /my-document-root/wp-includes/plugin.php(565): WP_Hook->do_action()
#3 /my-document-root/wp-cron.php(188): do_action_ref_array()
#4 {main}
  thrown in /my-document-root/wp-content/plugins/bea-media-analytics/classes/crons.php on line 44
porg commented 1 year ago

How are the chances that this plugin gets updated for WP 6.x?

petitphp commented 1 year ago

Hi @porg

Thanks for commenting on the issue with your findings.

We are in the process of testing the plugin on the latest version of PHP and WordPress. In addition to the PHP8 compatibility issue you mentioned, there might be another issue with the parsing of images for posts saved via Gutenberg.

We are working on a new release to address all the issues.

porg commented 1 year ago

Hi @petitphp,

  1. glad to read that an update is in the works!

  2. ā€¦ might be another issue with the parsing of images for posts saved via Gutenberg.

    • Yes media handling is a bit inconsistent in Wordpressā€¦ I had different outcomes regarding media when inserting via classical editor vs. block editor (Gutenberg) vs. media library upload dialog, and also classical media detail page vs. newer media detail modal popup behave differently regarding editing metadata.
    • Among other media bugs I had reported WordPress/gutenberg/issues/34149
    • Adam Silverstein wrote that Gutenberg deals with media through the REST API which differs to the regular media uploader. He wrote this fix. Maybe this co-incidentially also helps your caseā€¦? At least I wanted to mention it to you.