Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class "Factory" not found Error on Joomla 5.2.3 #40

Open
eyescream49 opened this issue Feb 4, 2025 · 1 comment
Open

Class "Factory" not found Error on Joomla 5.2.3 #40

eyescream49 opened this issue Feb 4, 2025 · 1 comment

Comments

@eyescream49
Copy link

Hello,
With the last commit, i've have an issue on a Joomla 5.2.3 with PHP 8.1 or 8.2 AND MySql 8.0.40-31

I can access to Component->MailJet->Preferences
But no way on
Contacts
Campaigns
Statistics

Class "Factory" not found

@rlack0913
Copy link

rlack0913 commented Feb 8, 2025

Hi,

Potential FIX for this:

  1. Make sure you can write to the directory /joomla/administrator/components/com_mailjet/lib/lib/
  2. Edit /joomla/administrator/components/com_mailjet/lib/lib/mailjet-api-helper.php
  3. Add the line 'use Joomla\CMS\Factory;' after the comment section at the top (line 11 or 12). Make sure it is before the line 'defined('_JEXEC') or die('Restricted access');'
  4. Save the file
  5. That fixed it for me.

I have the same issue with Joomla 5.1.4, php 8.1.29, and MariaDB 11.4.3. I can successfully send a test email from the Joomla Administrator MailJet Component Settings. But, selecting 'Contacts' results in a 'Class "Factory" not found' error. The following backtrace is generated in the log:

2025-02-08T16:00:28+00:00 CRITICAL 192.168.40.225 error Uncaught Throwable of type Error thrown with message "Class "Factory" not found". Stack trace: #0 [ROOT]/administrator/components/com_mailjet/views/contacts[TMP]l/default.php(20): Mailjet_Api_Helper::getMailjetIframe()
#1 [ROOT]/libraries/src/MVC/View/HtmlView.php(416): include('...')
#2 [ROOT]/libraries/src/MVC/View/HtmlView.php(204): Joomla\CMS\MVC\View\HtmlView->loadTemplate()
#3 [ROOT]/administrator/components/com_mailjet/views/contacts/view.html.php(44): Joomla\CMS\MVC\View\HtmlView->display()
#4 [ROOT]/libraries/src/MVC/Controller/BaseController.php(697): MailjetViewContacts->display()
#5 [ROOT]/administrator/components/com_mailjet/controller.php(41): Joomla\CMS\MVC\Controller\BaseController->display()
#6 [ROOT]/libraries/src/MVC/Controller/BaseController.php(730): MailjetController->display()
#7 [ROOT]/administrator/components/com_mailjet/mailjet.php(32): Joomla\CMS\MVC\Controller\BaseController->execute()
#8 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('...')
#9 [ROOT]/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}()
#10 [ROOT]/libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#11 [ROOT]/libraries/src/Application/AdministratorApplication.php(150): Joomla\CMS\Component\ComponentHelper::renderComponent()
#12 [ROOT]/libraries/src/Application/AdministratorApplication.php(195): Joomla\CMS\Application\AdministratorApplication->dispatch()
#13 [ROOT]/libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\AdministratorApplication->doExecute()
#14 [ROOT]/administrator/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#15 [ROOT]/administrator/index.php(32): require_once('...')
#16 {main}


I'd submit the potential change through Github but I'm a dinosaur - I stopped doing commercial development before git was in use. I think we were using cvs back then. Anyway, I'm looking into git. If I find that I'm looking at more code then I originally intended (not with MailJet, a different app) then I'll make a point of learning git and start contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants