dsifford / academic-bloggers-toolkit

WordPress plugin providing an all-in-one solution for effective academic blogging.
https://wordpress.org/plugins/academic-bloggers-toolkit/
GNU General Public License v3.0
120 stars 38 forks source link

5.0.1 update breaks admin section with "Recoverable Fatal Error" #539

Closed glorious1 closed 5 years ago

glorious1 commented 5 years ago

ABT Version: Attempted update to 5.0.1 from last version before 5.0

PHP Version: 7.2

Theme:

Plugin List: Many plugins, I can't access wp-admin to see them now

Browser: Firefox 64.0.2

Expected behavior: Update ABT and go on about my business

Actual behavior: Now I can't access the admin pages at all; instead I get this error: "Recoverable fatal error: Object of class WP_Post could not be converted to string in [ . . . ]/wp-content/plugins/academic-bloggers-toolkit/academic-bloggers-toolkit.php on line 73"

Console messages:

// Paste messages here
Request to access cookie or storage on “https://cdnsure.com/assets/style” was blocked because we are blocking all third-party storage access requests and content blocking is enabled.

I went into plugins via FTP and saw that ABT did update to 5.0.1. Considering deleting the plugin to see if I can regain admin access. Please advise.

glorious1 commented 5 years ago

I changed the extension of academic-bloggers-toolkit.php and was able to regain admin access.

EDIT: I then deactivated all plugins, changed the plugin file name back to *.php, and activated it. I again lost access to wp-admin.

dsifford commented 5 years ago

Looks like it has something to do with how I attempt to salvage user "custom CSS" by turfing it into the customizer.

I'm just gonna delete that and users who have custom CSS will just have to rewrite it. Not worth the effort to debug.

dsifford commented 5 years ago

Duplicate of #538

glorious1 commented 5 years ago

I think I do have custom css (probably why this bit me and not others). Would I be able to revert to the older version to copy out my css? Wouldn't be database problems?

dsifford commented 5 years ago

Not after you update unfortunately. The ABT custom CSS was added early in the life of the plugin and it's always been a mistake to have it. It was saved as part of the plugin options and those options get pruned/reset/adjusted on every update. CSS should go in the "customizer" or in a child theme.

glorious1 commented 5 years ago

Well, I was able to access the custom css from the plugin's settings when I reverted to 4.13.3. I deleted them from there and put them in the child theme's stylesheet as you suggested.

dsifford commented 5 years ago

Were you able to then update back to the latest version without any problems?

glorious1 commented 5 years ago

I was afraid to try, but since you asked, I went ahead, and had no problems. I guess deleting the css was the trick.