ProjectNami / projectnami

WordPress powered by Microsoft SQL Server
http://projectnami.org
Other
267 stars 139 forks source link

Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2020_01\wp-includes\wp-db.php on line 748 #493

Open PHuhn opened 1 year ago

PHuhn commented 1 year ago

I'm running ProjectNami on my Windows 10 laptop. I updated to 3.0.3 (WordPress 6.0.3) on a test site and I'm getting a notice as follows:

Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2020_01\wp-includes\wp-db.php on line 748

I am assuming it is similar to the other one I reported.

patrickebates commented 1 year ago

You might have something else going on this time. I can't find $blog_versions at line 748, and so far can't find it anywhere in the file.

PHuhn commented 1 year ago

Hey Patrick:

It did not occur with every page load as the other issue. This occurred only once. I believe it was on a update of plugins or themes.

jigsdabhi commented 1 year ago

@PHuhn I'm facing the same issue in WordPress 6.0.3 & WordPress 6.2 but let me tell you I face this issue once I complete the setup of Easy WP SMTP plugin in both setups. Also, It occurs on every page. After off the error reporting, It is displayed. Can anyone have a solution to it?

PHuhn commented 1 year ago

Hey look at this post I created about a similar problem: https://github.com/ProjectNami/projectnami/issues/489 It has a solution for that issue. All of my problems, were corrected with version 6.2.0/3.2.0

PHuhn commented 1 year ago

Hey Patrick:

I got this again, this time in a different PHP file (class-wpdb.php). I believe I was logging in for the first time after deleting all of the tables.

Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797
Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797

I corrected it by adding a declaration at line 60:

class wpdb {

    var $last_query_total_rows = null;

    public $blog_versions = '';
patrickebates commented 1 year ago

I'm still trying to figure out how/why this is being a problem for you. I can't find any reference to blog_versions in class-wpdb.php in either WP Core or PN.

Have you found where it is being referenced yet?

PHuhn commented 1 year ago

It tells you the line #. I believe it is dynamic. It is not a part of the WordPress code base. You can google it and find the value.

dearman commented 1 year ago

Notice: Undefined property: wpdb::$blog_versions in C:\inetpub\WP5_GC_2021_01\wp-includes\class-wpdb.php on line 797

Just started a completely fresh on-prem install under Windows 2019 latest, PHP-8.2.6 and sqlsrv 5.11.0. I didn't git clone the repo but used the deployment from the zip file. Same error. Same fix. Let me know if there's anyway I can help provide more info also.