[SOLVED] Joomla3.6.4 & Flexi3.1.1 update: "Class 'JFolder' not found"

More
7 years 5 months ago - 7 years 5 months ago #64902 by othbert
Hi guys,

Having a strange issue after upgrading Joomla from 3.6.2 to 3.6.4.
Upgraded Flexi 3.1.0-rc3 to 3.1.1.

When in the administrator and going to edit an item that is of any type which has an "image" field associated, Joomla fails with the error:

"[0] Class 'JFolder' not found"

Enabling the debugger gives the following:
Code:
Call stack # Function Location 1 JApplicationCms->execute() .../administrator/index.php:51 2 JApplicationAdministrator->doExecute() .../libraries/cms/application/cms.php:261 3 JApplicationAdministrator->dispatch() .../libraries/cms/application/administrator.php:152 4 JComponentHelper::renderComponent() .../libraries/cms/application/administrator.php:98 5 JComponentHelper::executeComponent() .../libraries/cms/component/helper.php:380 6 require_once() .../libraries/cms/component/helper.php:405 7 require_once() .../administrator/components/com_flexicontent/flexicontent.php:22 8 JControllerLegacy->execute() .../administrator/components/com_flexicontent/admin.flexicontent.php:291 9 FlexicontentControllerItems->edit() .../libraries/legacy/controller/legacy.php:702 10 FlexicontentViewItem->display() .../administrator/components/com_flexicontent/controllers/items.php:1464 11 FLEXIUtilities::call_FC_Field_Func() .../administrator/components/com_flexicontent/views/item/view.html.php:372 12 plgFlexicontent_fieldsFieldgroup->onDisplayField() .../components/com_flexicontent/classes/flexicontent.helper.php:6154 13 FlexicontentFields::getFieldFormDisplay() .../plugins/flexicontent_fields/fieldgroup/fieldgroup.php:96 14 FLEXIUtilities::call_FC_Field_Func() .../components/com_flexicontent/classes/flexicontent.fields.php:456 15 plgFlexicontent_fieldsImage->onDisplayField() .../components/com_flexicontent/classes/flexicontent.helper.php:6154

Unfortunately after attempting to debug why this is happening I am lost as to why the plugins/flexicontent_fields/image/image.php isn't seeing the JFolder class.

Adding the following:
Code:
JLoader::register('JFile', JPATH_LIBRARIES . '/joomla/filesystem/file.php'); JLoader::register('JFolder', JPATH_LIBRARIES . '/joomla/filesystem/folder.php');
to the top of the file (after the _JEXEC or die check) registers the classes naturally, but I'm concerned about the deeper cause of the issue.

I see the way the plugins are being instantiated and called has switched around a little bit in administrator/components/com_flexicontent/flexicontent.helper.php (~6116 etc.)
Would appreciate any insight you can give!

Many thanks!
Last edit: 7 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #64905 by ggppdk
Hello
Code:
When in the administrator and going to edit an item that is of any type which has an "image" field associated

yes, i confirm,
that the method -onDisplayField- used to create field in form,
does not import the needed files:
Code:
JLoader::register('JFile', JPATH_LIBRARIES . '/joomla/filesystem/file.php'); JLoader::register('JFolder', JPATH_LIBRARIES . '/joomla/filesystem/folder.php');

3 other methods of image field that need JFolder , import the needed files

- you can leave that code there,
- the fix will be in next release

thanks for reporting


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
The following user(s) said Thank You: othbert

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #64906 by othbert
Thanks for the confirmation! :)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.259 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline