PurpleTurtleCreative / completionist

Asana integration plugin for WordPress.
https://purpleturtlecreative.com/completionist/
GNU General Public License v3.0
1 stars 0 forks source link

ptc_asana_project shortcode and Request Tokens don't work in widgets #133

Closed MichelleBlanchette closed 1 year ago

MichelleBlanchette commented 1 year ago

I had a hunch this wouldn't work and proved it just now. Check it out:

[15-Apr-2023 12:54:50 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to PTC_Completionist\Request_Tokens::__construct() must be of the type integer, boolean given, called in /var/www/html/wp-content/plugins/completionist-pro/completionist/src/public/class-shortcodes.php on line 148 and defined in /var/www/html/wp-content/plugins/completionist-pro/completionist/src/public/class-request-tokens.php:81
Stack trace:
#0 /var/www/html/wp-content/plugins/completionist-pro/completionist/src/public/class-shortcodes.php(148): PTC_Completionist\Request_Tokens->__construct(false)
#1 /var/www/html/wp-includes/shortcodes.php(355): PTC_Completionist\Shortcodes::get_ptc_asana_project(Array, '', 'ptc_asana_proje...')
#2 [internal function]: do_shortcode_tag(Array)
#3 /var/www/html/wp-includes/shortcodes.php(227): preg_replace_callback('/\\[(\\[?)(ptc_as...', 'do_shortcode_ta...', '<p>[ptc_asana_p...')
#4 /var/www/html/wp-includes/class-wp-hook.php(310): do_shortcode('<p>[ptc_asana_p...')
#5 /var/www/html/wp-includes/plugin.php(205): WP_Hook->apply_filters(' in /var/www/html/wp-content/plugins/completionist-pro/completionist/src/public/class-request-tokens.php on line 81

This happens when trying to edit widgets and putting a Shortcode block with the [ptc_asana_project ...] shortcode in it. Once I try to save the widgets, it says the response is invalid JSON and thus refuses to save.

MichelleBlanchette commented 1 year ago

This is fixed via https://github.com/PurpleTurtleCreative/completionist/pull/137