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

Tries to purge page cache when not enabled #72

Open
Nicscott01 opened this issue Dec 22, 2023 · 2 comments
Open

Tries to purge page cache when not enabled #72

Nicscott01 opened this issue Dec 22, 2023 · 2 comments

Comments

@Nicscott01
Copy link

Nicscott01 commented Dec 22, 2023

I believe this is a bug with SpinupWP and not Breakdance. My setup is as follows:

WP v6.4.2
Breakdance (page builder) v1.7.0
PHP 8.1 and 8.2

I typically build a site with Page Cache off, so this is when this issue happens. If I turn SpinupWP page cache on, this issue won't happen. If I have page cache off in SpinupWP and don't have the SpinupWP plugin activated, this problem won't happen.

I get a 500 server error from Breakdance editor when I try to save the page. The stack trace:

[22-Dec-2023 17:36:35 UTC] Breakdance\AJAX\BreakdanceAjaxHandlerException thrown with message "file_exists(): Passing null to parameter #1
 ($filename) of type string is deprecated"

Stacktrace:
#17 Breakdance\AJAX\BreakdanceAjaxHandlerException in /sites/example.com/files/web/app/plugins/breakdance/plugin/ajax/ap
i.php:113
#16 Breakdance\Lib\Vendor\Whoops\Exception\ErrorException in /sites/example.com/files/web/app/plugins/spinupwp/src/Cache
.php:326
#15 file_exists in /sites/example.com/files/web/app/plugins/spinupwp/src/Cache.php:326
#14 SpinupWp\Cache:delete in /sites/example.com/files/web/app/plugins/spinupwp/src/Cache.php:260
#13 SpinupWp\Cache:purge_page_cache in /sites/example.com/files/web/app/plugins/spinupwp/src/Cache.php:142
#12 SpinupWp\Cache:purge_post_on_update in /sites/example.com/files/web/wp/wp-includes/class-wp-hook.php:324
#11 WP_Hook:apply_filters in /sites/example.com/files/web/wp/wp-includes/class-wp-hook.php:348
#10 WP_Hook:do_action in /sites/example.com/files/web/wp/wp-includes/plugin.php:517
#9 do_action in /sites/example.com/files/web/wp/wp-includes/post.php:5390
#8 wp_transition_post_status in /sites/example.com/files/web/wp/wp-includes/post.php:4650
#7 wp_insert_post in /sites/example.com/files/web/wp/wp-includes/post.php:4862
#6 wp_update_post in /sites/example.com/files/web/app/plugins/breakdance/plugin/data/save.php:54
#5 Breakdance\Data\save_document in /sites/example.com/files/web/app/plugins/breakdance/plugin/ajax/api.php:111
#4 call_user_func_array in /sites/example.com/files/web/app/plugins/breakdance/plugin/ajax/api.php:111
#3 Breakdance\AJAX\{closure} in /sites/example.com/files/web/wp/wp-includes/class-wp-hook.php:324
#2 WP_Hook:apply_filters in /sites/example.com/files/web/wp/wp-includes/class-wp-hook.php:348
#1 WP_Hook:do_action in /sites/example.com/files/web/wp/wp-includes/plugin.php:517
#0 do_action in /sites/example.com/files/web/wp/wp-admin/admin-ajax.php:188

From what I can see, it looks like SpinupWP tries to purge page cache regardless of whether or not it is on. When it's not on, it passes a null value into the delete method, and that's when it fires the error in Breakdance.

@Nicscott01
Copy link
Author

Similar to what was reported in #64

@Jamesclark32
Copy link
Contributor

@Nicscott01 We've just released version 1.6 of the plugin which includes the fix from #64 as well as a few other improvements. Is this problem continuing for you with the update in place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants