Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error (cannot create a new chart) with PHP 8 and Neve theme activated #795

Closed
vytisbulkevicius opened this issue Apr 12, 2021 · 1 comment · Fixed by #796 or #803
Closed
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. released Indicate that an issue has been resolved and released in a particular version of the product.

Comments

@vytisbulkevicius
Copy link
Contributor

Description:

Visualizer runs fine on PHP 8+, however, if you also have the Neve theme activated - a fatal error occurs when creating a new chart.

Error

[12-Apr-2021 08:36:33 UTC] PHP Warning:  Private methods cannot be final as they are never overridden by other classes in /patbrush/wordpress/wp-content/plugins/visualizer/classes/Visualizer/Source.php on line 338
[12-Apr-2021 08:36:33 UTC] PHP Stack trace:
[12-Apr-2021 08:36:33 UTC] PHP   1. {main}() /patbrush/wordpress/wp-admin/admin-ajax.php:0
[12-Apr-2021 08:36:33 UTC] PHP   2. do_action($tag = 'wp_ajax_visualizer-create-chart') /patbrush/wordpress/wp-admin/admin-ajax.php:187
[12-Apr-2021 08:36:33 UTC] PHP   3. WP_Hook->do_action($args = [0 => '']) /patbrush/wordpress/wp-includes/plugin.php:484
[12-Apr-2021 08:36:33 UTC] PHP   4. WP_Hook->apply_filters($value = '', $args = [0 => '']) /patbrush/wordpress/wp-includes/class-wp-hook.php:316
[12-Apr-2021 08:36:33 UTC] PHP   5. Visualizer_Module_Chart->renderChartPages('') /patbrush/wordpress/wp-includes/class-wp-hook.php:292
[12-Apr-2021 08:36:33 UTC] PHP   6. visualizer_autoloader($class = 'Visualizer_Source_Csv') /patbrush/wordpress/wp-content/plugins/visualizer/classes/Visualizer/Module/Chart.php:494
[12-Apr-2021 08:36:33 UTC] PHP   7. require() /patbrush/wordpress/wp-content/plugins/visualizer/index.php:52
[12-Apr-2021 08:36:33 UTC] PHP   8. visualizer_autoloader($class = 'Visualizer_Source') /patbrush/wordpress/wp-content/plugins/visualizer/classes/Visualizer/Source/Csv.php:30
[12-Apr-2021 08:36:33 UTC] PHP Fatal error:  Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /patbrush/wordpress/wp-content/themes/neve/inc/admin/metabox/manager.php:166
Stack trace:
#0 /patbrush/wordpress/wp-content/themes/neve/inc/admin/metabox/manager.php(166): method_exists()
#1 /patbrush/wordpress/wp-content/themes/neve/inc/admin/metabox/manager.php(226): Neve\Admin\Metabox\Manager->is_gutenberg_active()
#2 /patbrush/wordpress/wp-includes/class-wp-hook.php(292): Neve\Admin\Metabox\Manager->enqueue()
#3 /patbrush/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
#4 /patbrush/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action()
#5 /patbrush/wordpress/wp-admin/includes/media.php(542): do_action()
#6 /patbrush/wordpress/wp-content/plugins/visualizer/classes/Visualizer/Module/Chart.php(875): wp_iframe()
#7 /patbrush/wordpress/wp-content/plugins/visualizer/classes/Visualizer/Module/Chart.php(593): Visualizer_Module_Chart->_handleTypesPage()
#8 /patbrush/wordpress/wp-includes/class-wp-hook.php(292): Visualizer_Module_Chart->renderChartPages()
#9 /patbrush/wordpress/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
#10 /patbrush/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action()
#11 /patbrush/wordpress/wp-admin/admin-ajax.php(187): do_action()
#12 {main}
  thrown in /patbrush/wordpress/wp-content/themes/neve/inc/admin/metabox/manager.php on line 166

How to reproduce:

  1. Install and activate Visualizer on a server running PHP 8+
  2. Install and activated Neve theme
  3. Try to create a new chart - a fatal error occurs

Expected behaviour:

Visualizer to be compatible with Neve theme.

Current behaviour:

Visualizer is not compatible with Neve theme on PHP 8+.

Reference:

image

Technical info

  • WordPress version: 5.7
  • Visualizer version: 3.4.11
  • Neve theme version: 2.10.4
  • PHP Version: 8.0.3

Reported here - https://secure.helpscout.net/conversation/1470106600/273167/

@vytisbulkevicius vytisbulkevicius added the bug This label could be used to identify issues that are caused by a defect in the product. label Apr 12, 2021
girishpanchal30 added a commit that referenced this issue Apr 26, 2021
@girishpanchal30 girishpanchal30 linked a pull request Apr 26, 2021 that will close this issue
@selul selul linked a pull request May 25, 2021 that will close this issue
@selul selul mentioned this issue May 25, 2021
selul added a commit that referenced this issue May 25, 2021
#### Fixes: 
- Fix compatibility with 3rd party plugins which use the same js library as Visualizer #801 
- Fix fatal error when a new chart is created on PHP 8 #795 
- Chart doesn't get refreshed automatically when the JSON endpoint is used as the data source
 
#### Features: 
- Adds option to add schema.org Dataset for license and creator #794
pirate-bot pushed a commit that referenced this issue May 25, 2021
##### [Version 3.5.1](v3.5.0...v3.5.1) (2021-05-25)

- Fix compatibility with 3rd party plugins which use the same js library as Visualizer [#801](#801)
- Fix fatal error when a new chart is created on PHP 8 [#795](#795)
- Chart doesn't get refreshed automatically when the JSON endpoint is used as the data source

#### Features:
- Adds option to add schema.org Dataset for license and creator [#794](#794)
@pirate-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.5.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants