stefanbohacek / fediverse-embeds-wordpress-plugin

Embed fediverse posts on your WordPress site.
https://wordpress.org/plugins/fediverse-embeds/
MIT License
39 stars 1 forks source link

Viewing settings page causes an error #9

Closed edent closed 1 year ago

edent commented 1 year ago

Screenshot 2023-06-19 at 20-02-28 Settings for the Fediverse Embeds plugin ‹ Terence Eden’s Blog — WordPress

An error of type E_ERROR was caused in line 46 of the file /home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/Helpers.php. Error message: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(/home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/../media): Failed to open directory: No such file or directory in /home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/Helpers.php:46
Stack trace:
#0 /home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/Helpers.php(46): RecursiveDirectoryIterator->__construct()
#1 /home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/Settings.php(184): FTF_Fediverse_Embeds\Helpers::get_directory_size()
#2 /home/shkspr.mobi/blog/wp-admin/includes/template.php(1773): FTF_Fediverse_Embeds\Settings->render_settings_form()
#3 /home/shkspr.mobi/blog/wp-content/plugins/fediverse-embeds-wordpress-plugin-main/includes/Settings.php(50): do_settings_sections()
#4 /home/shkspr.mobi/blog/wp-includes/class-wp-hook.php(308): FTF_Fediverse_Embeds\Settings->render_settings_page()
#5 /home/shkspr.mobi/blog/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
#6 /home/shkspr.mobi/blog/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /home/shkspr.mobi/blog/wp-admin/admin.php(259): do_action()
#8 /home/shkspr.mobi/blog/wp-admin/options-general.php(10): require_once('/home/...')
#9 {main}
  thrown
stefanbohacek commented 1 year ago

@edent Thank you for catching this! Fixed with https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/commit/3b371d9c888cfed8e6ef3890c3471c94a4d2eea1.

edent commented 1 year ago

Seems to work. Although it now says:

Number of saved posts: 7 Size of downloaded media files: NAN

stefanbohacek commented 1 year ago

Right, this is now fixed. https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/commit/bfd66e73f19a3afff0781f201e470d6b145f72a1

edent commented 1 year ago

That seems to be a regression. It's now throwing an error again.

stefanbohacek commented 1 year ago

Ah, sorry, I was rushing too much.

https://github.com/stefanbohacek/fediverse-embeds-wordpress-plugin/commit/44462c046ecbd4930c2f61eb51101b4efebcedd0