joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.73k stars 3.64k forks source link

Line missing from /plugins/fields/itemlist/itemlist.php #39316

Closed bascherz closed 1 year ago

bascherz commented 1 year ago

Steps to reproduce the issue

Try to modify or create and save a content (category or article) custom field.

Expected result

The field is correctly modified or created.

Actual result

An error has occurred. Class 'FieldsHelper' not found.

System information (as much as possible)

Joomla! 4.2.5

Additional comments

There is a line missing from near the top of itemlist.php:

use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;

It can be added right after this one on line 10.

use Joomla\CMS\MVC\Model\BaseDatabaseModel;

Adding that line resolves the issue.

brianteeman commented 1 year ago

There is no plugin at /plugins/fields/itemlist/itemlist.php in the core of Joomla. It must be an extension you have installed.

bascherz commented 1 year ago

That's interesting since it is just a Joomla content custom field that is causing the issue. I will make an attempt to see what other extension might own this, but I am already surprised.

richard67 commented 1 year ago

@bascherz Check the sources here and you will see it is not in: https://github.com/joomla/joomla-cms/tree/4.2-dev/plugins/fields

bascherz commented 1 year ago

I have already looked at the 4.2.5 distribution and confirmed it is not part of that. The extension manager reports that the author is "Joomla! Project" and it is version 3.9.0 of the Fields-Itemlist Site Plugin. Is this residue from before I migrated this site to Joomla! 4? I disabled the plugin and it doesn't appear to have made any difference (editing the field still works).

richard67 commented 1 year ago

When you use my link and then switch the branch from 4.2-dev to 3.10-dev, you will see it is also not part of Joomla 3.10. Sometimes extension devs just copy the copyright comments from the core.

bascherz commented 1 year ago

Well, wherever it came from, it doesn't appear to be needed. It also was singled-out with a core-extensions filter in extension manager. Gone. Thanks guys!

richard67 commented 1 year ago

Closing as not a core issue.