cloudinary / cloudinary_wordpress

Cloudinary's WordPress plugin
GNU General Public License v2.0
39 stars 28 forks source link

Unable to install plugin - class Cloudinary\Utils does not have a method "install" #935

Open cedric-nxstar opened 6 months ago

cedric-nxstar commented 6 months ago

Bug Description

When trying to active the plugin, I get this error message:

Wordpress displays:

"Plugin could not be activated because it triggered a fatal error."

debug.log contains:

PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class Cloudinary\Utils does not have a method "install" in /wp-includes/class-wp-hook.php:324

Expected Behaviour

Plugin should be activated properly.

Steps to reproduce

  1. Install the plugin
  2. Click on 'Activate'
  3. See error

Additional context

I tried locally and on my staging server, same problem on both environments.

wp-core

version: 6.4.3 site_language: en_US user_language: en_US timezone: America/Toronto permalink: /category/postname/ https_status: false multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 5 dotorg_communication: true

wp-paths-sizes

wordpress_path: /shared/httpd/freno-website-back/htdocs wordpress_size: 70.48 MB (73903537 bytes) uploads_path: /shared/httpd/freno-website-back/htdocs/wp-content/uploads uploads_size: 114.05 MB (119591673 bytes) themes_path: /shared/httpd/freno-website-back/htdocs/wp-content/themes themes_size: 3.21 MB (3369064 bytes) plugins_path: /shared/httpd/freno-website-back/htdocs/wp-content/plugins plugins_size: 181.68 MB (190504344 bytes) database_size: 42.13 MB (44171264 bytes) total_size: 411.55 MB (431539882 bytes)

wp-active-theme

name: Headless Redirect (headless-redirect) version: undefined author: Anonymous author_website: (undefined) parent_theme: none theme_features: core-block-patterns, post-thumbnails, widgets-block-editor, menus theme_path: /shared/httpd/freno-website-back/htdocs/wp-content/themes/headless-redirect auto_update: Disabled

wp-themes-inactive (1)

Twenty Twenty-Four: version: 1.0, author: the WordPress team, Auto-updates disabled

wp-plugins-active (14)

Advanced Custom Fields: Extended: version: 0.8.9.5, author: ACF Extended, Auto-updates disabled Advanced Custom Fields Multilingual: version: 2.0.5, author: OnTheGoSystems, Auto-updates enabled Advanced Custom Fields PRO: version: 6.2.6.1, author: WP Engine, Auto-updates disabled Disable Comments: version: 2.4.5, author: WPDeveloper, Auto-updates enabled Enable Media Replace: version: 4.1.5, author: ShortPixel, Auto-updates enabled Nxstar - Algolia Custom Integration: author: (undefined), version: 1.0.0, Auto-updates disabled Nxstar Auto deploy: version: 1.0, author: Nxstar | Remi Tache, Auto-updates disabled Nxstar Features: version: 1.0, author: Nxstar, Auto-updates disabled SVG Support: version: 2.5.5, author: Benbodhi, Auto-updates enabled WPML Multilingual CMS: version: 4.6.9, author: OnTheGoSystems, Auto-updates enabled WPML SEO: version: 2.1.0, author: OnTheGoSystems, Auto-updates enabled WPML String Translation: version: 3.2.9, author: OnTheGoSystems, Auto-updates enabled Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates enabled Yoast SEO: version: 22.0, author: Team Yoast, Auto-updates enabled

wp-plugins-inactive (2)

Cloudinary: version: 3.1.5, author: Cloudinary Ltd., XWP (latest version: 3.1.6), Auto-updates disabled Wordfence Security: version: 7.11.3, author: Wordfence, Auto-updates enabled

wp-media

image_editor: WP_Image_Editor_Imagick imagick_module_version: 1691 imagemagick_version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org imagick_version: 3.7.0 file_uploads: 1 post_max_size: 72M upload_max_filesize: 64M max_effective_size: 64 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 786432 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 1 imagick::RESOURCETYPE_TIME: 9.2233720368548E+18 imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CR3, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HEIC, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIDEO, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: bundled (2.1.0 compatible) gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM ghostscript_version: 9.53.3

wp-server

server_architecture: Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 httpd_software: nginx/1.22.1 php_version: 8.2.1 64bit php_sapi: fpm-fcgi max_input_variables: 8000 time_limit: 120 memory_limit: 512M max_input_time: 120 upload_max_filesize: 64M php_post_max_size: 72M curl_version: 7.74.0 OpenSSL/1.1.1n suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: true current: 2024-02-16T17:48:30+00:00 utc-time: Friday, 16-Feb-24 17:48:30 UTC server-time: 2024-02-16T12:48:29-05:00

wp-database

extension: mysqli server_version: 10.6.12-MariaDB-1:10.6.12+maria~ubu2004-log client_version: mysqlnd 8.2.1 max_allowed_packet: 16777216 max_connections: 151

wp-constants

WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /shared/httpd/freno-website-back/htdocs/wp-content WP_PLUGIN_DIR: /shared/httpd/freno-website-back/htdocs/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 512M WP_DEBUG: true WP_DEBUG_DISPLAY: false WP_DEBUG_LOG: true SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined WP_DEVELOPMENT_MODE: undefined DB_CHARSET: utf8mb4 DB_COLLATE: undefined

wp-filesystem

wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable

Vdeub-cloudinary commented 6 months ago

Hi @cedric-nxstar, could you share how you are installing our plugin? Can you try to delete it and re-install it? Thanks!

cedric-nxstar commented 6 months ago

Hi @Vdeub-cloudinary,

I installed it through the WP admin, like any other plugin. Installation worked just fine, it's when I'm trying to enable it that the problem occurs. I just tried it on 2 other websites, same issue.

Vdeub-cloudinary commented 6 months ago

Hi @cedric-nxstar, that's strange because the method is definitely here: https://github.com/cloudinary/cloudinary_wordpress/blob/master/php/class-utils.php#L332-L343.

Any chance you could create a ticket to support@cloudinary.com and share the following information:

Vdeub-cloudinary commented 3 months ago

Hi @cedric-nxstar, Some other customers reported a similar issue and this is because they had both the Cloudinary PHP SDK and the Cloudinary WordPress plugin installed. You can't use both together in a WordPress instance. If it was the case for you, please confirm.