bobbingwide / oik-shortcodes

Shortcode, block and API server
https://www.oik-plugins.com/oik-plugins/oik-shortcode-server/
GNU General Public License v2.0
1 stars 0 forks source link

Cannot parse Jetpack 11.5.1 #90

Closed bobbingwide closed 6 days ago

bobbingwide commented 2 years ago

After updating Jetpack to 11.5.1 I tried to parse the code oikwp oik-shortcodes.php jetpack url=jetpack.wp-a2z.org

It failed with

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parse-status.php:122 Stack trace:

#0 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parse-status.php(133): oiksc_parse_status->populate_parse_status()
#1 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parse-status.php(274): oiksc_parse_status->update_status()
#2 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-batch/oik-list-previous-files.php(370): oiksc_parse_status->restart_processing()
#3 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/admin/oik-create-apis.php(196): oikb_list_changed_files('0', 'jetpack', 'plugin', Object(oiksc_parse_status))
#4 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/admin/oik-create-apis.php(76): _ca_doaplugin_local('jetpack', '0', 0)
#5 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/oik-shortcodes.php(1634): oiksc_lazy_run_oik_shortcodes()
#6 /home/customer/www/bobbingwide.org.uk/public_html/wp-includes/class-wp-hook.php(308): oiksc_run_oik_shortcodes('')
#7 /home/customer/www/bobbingwide.org.uk/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
#8 /home/customer/www/bobbingwide.org.uk/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-batch/libs/oik-cli.php(607): do_action('run_oik-shortco...')
#10 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-batch/libs/oik-cli.php(573): oik_batch_run_script('oik-shortcodes....')
#11 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-batch/oik-wp.php(117): oik_batch_run()
#12 /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-batch/oik-wp.php(156): oik_wp_loaded()
#13 {main}
  thrown in /home/customer/www/bobbingwide.org.uk/public_html/wp-content/plugins/oik-shortcodes/classes/class-oiksc-parse-status.php on line 122
bobbingwide commented 2 years ago

trying again with oikwp oik-shortcodes.php jetpack 0 url=jetpack.wp-a2z.org to reparse the whole of Jetpack after deleting everything.

bobbingwide commented 2 years ago

Parsing Jetpack took an absolute age. Given that hardly anyone looks at jetpack.wp-a2z.org to look at the source code, including me, I'm prepared to forget about the WP-a2z for Jetpack. I plan to redirect requests to Automattic's GitHub repository.

It would be nice if oik-shortcodes could somehow indicate to a real viewer that this is going to happen. For bots I dont really care, they'll get the message.

bobbingwide commented 2 years ago

I believe the simplest redirect code is:

RewriteCond %{HTTP_HOST} ^jetpack.wp-a2z.org$ 
RedirectMatch 301 /(oik_api|oik_class|oik_file|oik_hook)(.*) https://github.com/Automattic/jetpack/tree/trunk/projects/plugins/jetpack 
bobbingwide commented 1 year ago

Just noticed that redirects are occurring for other domains as well, which isn't what I want at all!

bobbingwide commented 6 days ago

Closing as WontFix since jetpack.wp-a2z.org is no more.