Carbon Issues
-
Hey Guys, just installed a fresh copy of Simple Calendar from the WordPress directory on my local to test out some of the plugins options for a client. After activation, my front end is displaying this error:
Fatal error: Class ‘Carbon\Carbon’ not found in /Applications/MAMP/htdocs/wpcli/wp-content/plugins/google-calendar-events/includes/functions/shared.php on line 230
My admin section if fine. I am not seeing any errors in the admin.
Thanks!
-
I have the same issue. It seems something is messing with the Autoloading of classes contained within the plugin. I figure in my case it might be due to me using a Composer based WordPress installation. Though none of the other plugins have any issue at all with this setup.
I’m able to run it by adding the missing classes (like Carbon, Google API Client, PHPColors, etc.) as Composer dependencies in my project and then manually requiring the Composer autoloader into the files that need these classes but of course this isn’t the way to go.
Any recommendations for a Composer based install guys!? This is what my current setup looks like:
. ├── README.md ├── composer.json ├── composer.lock ├── index.php ├── tags ├── vendor │ ├── autoload.php │ ├── composer │ ├── google │ ├── johnpbloch │ ├── mexitek │ ├── nesbot │ ├── symfony │ └── vlucas └── wp ├── composer.json ├── index.php ├── license.txt ├── readme.html ├── wp-activate.php ├── wp-admin ├── wp-blog-header.php ├── wp-comments-post.php ├── wp-config.php ├── wp-content ├── wp-cron.php ├── wp-includes ├── wp-links-opml.php ├── wp-load.php ├── wp-login.php ├── wp-mail.php ├── wp-settings.php ├── wp-signup.php ├── wp-trackback.php └── xmlrpc.phpCan you see if this is resolved in 3.0.16 and let me know.
Thanks!
@nickyoung – Yup. 3.0.16 fixes the issue just fine. Thanks for the prompt action. Much appreciated. Now just waiting for the plugin to be available thru wpackagist so I can switch back to a composer based plugin install.
Thanks a ton!
@nickyoung – So on 3.0.16 this issue of missing classes is resolved as long as you have those classes in composer’s vendor directory. So in my case I had to ‘composer require’ these 3 classes:
"nesbot/carbon": "1.21.0", "google/apiclient": "*", "mexitek/phpcolors": "dev-master"The plugin is still not using it’s own bundled classes but rather the global versions.
Thought I’d add this here in case someone else is using a Composer based install.
Nick,
I upgraded the plugin to the new version and I am still getting an error: Fatal error: Class ‘Carbon\Carbon’ not found in /Applications/MAMP/htdocs/wpcli/wp-content/plugins/google-calendar-events/includes/functions/shared.php on line 230
Thanks for the extra information I will have to take a look into that.
Are you also installing it through Composer?
NO. I installed the plugin from the WordPress directory. When I did the update I was on the plugins page of my local WordPress site.
As a developer, I am sure I could find a fix but my worry is when the site gets delivered to the client and an issue like this happens. The client will have NO idea what to do.
Thanks for all of your help!.
Darren
Could you paste in your system report from the plugin?
Nick,
sorry it took so long. Here is the report:
### WordPress Installation ###
Site Name: wpcli
Home URL: http://localhost/wpcli
Site URL: http://localhost/wpcli
Version: 4.4.2
Locale: en_US
Timezone: UTC
Multisite: No
Permalinks: /%postname%/
WP Memory Limit: 40 MB
WP Debug Mode: Yes
Script Debug: No### Active Theme ###
Theme: Twenty Fifteen – 1.4
Child Theme: No
Parent Theme: –### Active Plugins ###
Local Admin Bar Color: 1.0.1
Tesla Login Customizer: 1.3.2
Simple Calendar: 3.0.16
User Switching: 1.0.9
TinyMCE Advanced: 4.2.8
User Switching in Admin Bar: 1.0.6### Server Environment ###
Web Server: Apache/2.2.29 (Unix) mod_wsgi/3.5 Python/2.7.10 PHP/5.6.10 mod_ssl/2.2.29 OpenSSL/0.9.8zg DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.22.0
PHP Version: 5.6.10
MySQL Version: 5.5.42
Server Timezone: UTC
Display Errors: Yes
Safe Mode: No
Memory Limit: 256M
Upload Max Filesize: 32M
Post Max Size: 32M
Max Execution Time: 30
Max Input Vars: 1000
fsockopen: Yes
cURL: Yes
SOAP: Yes
SUHOSIN: No
WP Remote POST: Yes
WP Remote GET: Yes### Client Information ###
IP Address: ::1
Browser: Firefox 45.0 (Apple)I don’t really see anything that sticks out as an issue. Your WP Memory Limit is a little lower than suggested, but I don’t think that would be the issue here.
I am curious though since your site name is wpcli is this a command line installation of WordPress?
Yes,
it was it is a command line installation of WordPress. That was my first attempt thus the name wpcli.
Thanks,
Darren
Hmmm, just out of curiosity are you able to test it on a standard installation of WP? I just want to see if there is a difference for you so I know which direction to look in here.
Hello,
I am going to assume this has been resolved since there has not been a reply here. If you continue to have issues please let us know and we will be glad to continue with helping.
Thanks!
The topic ‘Carbon Issues’ is closed to new replies.