cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

Error happens when ver 5.2.0 active #266

Closed taketake2145 closed 4 years ago

taketake2145 commented 4 years ago

Describe the bug error happens when ver 5.2.0 active

To Reproduce

<br />
<b>Fatal error</b>:  Uncaught Error: Call to a member function replaceChild() on null in {path}/wp-content/plugins/wordpress-popular-posts/src/Front/Front.php:141
Stack trace:
#0 {path}/wp-includes/class-wp-hook.php(287): WordPressPopularPosts\Front\Front-&gt;convert_inline_js_into_json('&lt;script type='t...', 'wpp-js', 'https://www.sim...')
#1 {path}/wp-includes/plugin.php(206): WP_Hook-&gt;apply_filters('&lt;script type='t...', Array)
#2 {path}/wp-includes/class.wp-scripts.php(400): apply_filters('script_loader_t...', '&lt;script type='t...', 'wpp-js', 'https://www.sim...')
#3 {path}/wp-includes/class.wp-dependencies.php(116): WP_Scripts-&gt;do_item('wpp-js', 0)
#4 {path}/wp-includes/class.wp-scripts.php(643): WP_Dependencies-&gt;do_items(Array, 0 in <b>{path}/wp-content/plugins/wordpress-popular-posts/src/Front/Front.php</b> on line <b>141</b><br />

Expected behavior No error

Screenshots

Environment:

Additional context I like this plugin wordpress-popular-posts. Sorry i have no idea to fix it up. But I hope i can update it.

Regards

cabrerahector commented 4 years ago

Hi @taketake2145,

Could you please disable all of your plugins (except for WordPress Popular Posts) and check whether the issue still remains or not?

taketake2145 commented 4 years ago

Thank you to reply quickly,

I disabled all of my plugins except wpp. But the issue still remains. And I tried to change a few themes. but the issue is same. i mean still remains.

cabrerahector commented 4 years ago

Alright, thanks for the update.

For the time being, please downgrade to version 5.1.0 while I work on a fix.

taketake2145 commented 4 years ago

Okey, i use 5.1.0 till then. Regards

cabrerahector commented 4 years ago

Hey @taketake2145,

Please try this and report back your results.

Thanks in advance!

taketake2145 commented 4 years ago

Hey @cabrerahector,

I tried. Amazing! No error!! Now is no data of wpp. but soon it will show up again.

Thank you so much!