Error in Welcome Screen

Error thrown on test site using Migration Plugin:

Fatal error : Uncaught Error: Call to undefined function classicpress_version() in /home/forge/TESTINGIP.STRIEBEL.CA/www/wp-admin/about.php:23 Stack trace: #0 {main} thrown in /home/forge/TESTINGIP.STRIEBEL.CA/www/wp-admin/about.php on line 23

Notes:

  • Normal Install
  • Had Gutenburg plugin installed
  • Had one post that was edited using Gutenburg

ClassicPress was still installed though, even with error thrown.

When you refresh the page, does this error go away?

I see the (W) logo on the screen, but it is definitely executing ClassicPress code in wp-admin/about.php.

The error indicates that wp-includes/version.php has not been updated. So this looks like a partial migration.

1 Like

Ya it does, and the (W) changes to our CP logo.

As I said, everything seems fine, it just looks scary.

1 Like

Ok. I can think of a workaround for this, but it would be nice to understand more about why it’s happening. What hosting provider is this on?

Maybe more difficult to answer: Does this happen on every migration using this host?

Using Forge (WordPress install) on Digital Ocean.

In regards to “every time” the screenshot was from my second attempt to recreate it after seeing it on one of my production sites.

1 Like

So, this is going to be pretty annoying to work around. I think what is going on is something like this:

  • The ClassicPress version of wp-includes/version.php is written during the migration, and everything appears to succeed
  • wp-admin/about.php loads, and reads wp-includes/version.php, but gets the old version of the file
  • After a page refresh, the filesystem (or whatever caching layer is in play here) has caught up and everything starts working again

There are old versions of some other PHP files being read too, this is why the (W) logo appears in the admin bar.

I think this is a broken server configuration, because the filesystem and PHP should never see the old, previous contents for a file after it is overwritten with new contents.

Anyway, if it is a common error, we will find out about it here, and something like the following hack should work OK:

Allow wp-admin/about.php to refresh itself up to 5 times if the classicpress_version function does not exist.

Testing this change will require a customized build of the migration plugin + ClassicPress, which will be easier to do after this task is completed:

Gutenberg does not appear to be compatible with ClassicPress? This would not surprise me since (at least in theory) you have two very different editing experiences, one being known and the other still largely in beta with known bugs. If you remove Gutenberg, how does it respond?

The GB plugin should be compatible, it seems this was the issue:

Once you leave the welcome screen (and everything refreshes) everything goes back to normal (with no errors, with GB installed) :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.