netmix / radio-station

Radio Station WordPress Plugin (Open Source)
https://netmix.com
GNU General Public License v3.0
19 stars 14 forks source link

Fatal error in schedule display after update to 2.5.1 (with Pro 2.6.0) #454

Closed montereyjeff closed 1 year ago

montereyjeff commented 1 year ago

Fatal error: Uncaught Error: Cannot use object of type WP_Post as array in /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/includes/schedules.php:162 Stack trace: #0 /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/includes/schedules.php(310): radio_station_get_all_overrides('2023-05-01', '2023-05-07', 'America/Los_Ang...') #1 /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/templates/master-schedule-table.php(54): radio_station_get_current_schedule('1683356400') #2 /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/includes/master-schedule.php(352): require('/home/customer/...') #3 /home/customer/www/kspb.org/public_html/wp-includes/shortcodes.php(355): radio_station_master_schedule(Array, '', 'master-schedule') #4 [internal function]: do_shortcode_tag(Array) #5 /home/customer/www/kspb.org/public_html/wp-includes/shortcodes.php(227): preg_replace_callback('/\[(\[?)(master...', 'do_shortcode_ta...', '

<a href="htt...') #6 /h in /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/includes/schedules.php on line 162

montereyjeff commented 1 year ago

The page in question is defined as: [master-schedule view="table"]

montereyjeff commented 1 year ago

In the site dashboard, clicking Appearance, Customize gives this error:

Edit widget: (Radio Station) Stream Player Add widget: (Radio Station) Stream Player Edit Add (Radio Station) Stream Player (Radio Station) Stream Player

Fatal error: Uncaught Error: Using $this when not in object context in /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station-pro-premium/includes/rsp-player.php:419 Stack trace: #0 /home/customer/www/kspb.org/public_html/wp-includes/class-wp-hook.php(308): radio_station_pro_player_widget_fields(Array, Object(Radio_Player_Widget), Array) #1 /home/customer/www/kspb.org/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #2 /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station/widgets/class-radio-player-widget.php(247): apply_filters('radio_station_p...', Array, Object(Radio_Player_Widget), Array) #3 /home/customer/www/kspb.org/public_html/wp-includes/class-wp-widget.php(535): Radio_Player_Widget->form(Array) #4 /home/customer/www/kspb.org/public_html/wp-admin/includes/widgets.php(274): WP_Widget->form_callback(Array) #5 /home/customer/www/kspb.org/public_html/wp-includes/class-wp-customize-widgets.php(1148): wp_widget_control(Array, Array) #6 /home/customer/www in /home/customer/www/kspb.org/public_html/wp-content/plugins/radio-station-pro-premium/includes/rsp-player.php on line 419

montereyjeff commented 1 year ago

Additionally, sidebar widgets for what's now on the air and what's coming up are not functioning. I'm going to restore the site from a backup to remove the upgrade.

montereyjeff commented 1 year ago

Additional info: the problem seems to have been triggered by upgrading Radio Station to 2.5.1 from 2.4.0.9.

Restored back to Radio Station 2.4.0.9. Radio Station Pro is 2.6.0.

majick777 commented 1 year ago

Hi @montereyjeff Thanks for the detailed reporting! I've tracked down and fixed both these bugs now and released hotfix versions for them: Free 2.5.2 and Pro 2.6.1 Free 2.5.2 is available on Github already and will be on the WP repo shortly, and Pro 2.6.1 is available via plugin updates or via the Freemius dashboard. Let us know if you have any further issues.