jce icon indicating copy to clipboard operation
jce copied to clipboard

🐛 Bug Report: Class "WFMediaManager" not found

Open uzielweb opened this issue 6 months ago • 1 comments

🐛 Bug Report: Class "WFMediaManager" not found

Environment

  • JCE Version: JCE 2.9.88
  • Joomla Version: Joomla 5.3.1
  • PHP Version: PHP 8.3.15

Error Description

0 Class "WFMediaManager" not found 

Call Stack
# 	Function 	Location
1 	() 	JROOT\components\com_jce\editor\plugins\browser\browser.php:17
2 	include_once() 	JROOT\administrator\components\com_jce\controller\plugin.php:121

Root Cause

Missing file: /components/com_jce/editor/libraries/classes/manager.php

The JCE system registers this class in /administrator/components/com_jce/includes/base.php:

JLoader::register('WFMediaManager', WF_EDITOR_CLASSES . '/manager.php');

But the manager.php file doesn't exist, causing plugins like WFBrowserPlugin and WFImgManagerPlugin that extend WFMediaManager to fail.

🔧 Fix/Workaround

Create the missing file /components/com_jce/editor/libraries/classes/manager.php:

<?php
/**
 * @package     JCE
 * @subpackage  Editor
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @copyright   Copyright (c) 2009-2024 Ryan Demmer. All rights reserved
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_PLATFORM') or die;

class WFMediaManager extends WFMediaManagerBase
{
    /**
     * Constructor
     *
     * @param array $config Configuration array
     */
    public function __construct($config = array())
    {
        parent::__construct($config);
    }
}

Expected File Structure

/components/com_jce/editor/libraries/classes/
├── manager.php          ← Missing file (WFMediaManager class)
└── manager/
    └── base.php         ← Existing file (WFMediaManagerBase class)

Verification

After creating the file:

  • ✅ JCE editor loads without errors
  • ✅ Image Manager plugin works
  • ✅ File Browser plugin works

Questions

  1. Should this file be included in the JCE package by default?
  2. Is this an installation issue or a missing file in the distribution?
  3. Are there any other dependencies that should be considered for this class?

This workaround resolves the immediate issue, but it would be great to have this addressed in future JCE releases to prevent others from encountering this problem.

uzielweb avatar Jun 24 '25 14:06 uzielweb

Should this file be included in the JCE package by default? Is this an installation issue or a missing file in the distribution?

Yes, the file should be in the package by default, but was ommitted due to a git commit issue. I have added it back - https://github.com/widgetfactory/jce/commit/82b5979086afe8512b2f7649bff986d233178d5a - and will release an update this week.

ryandemmer avatar Jun 24 '25 14:06 ryandemmer