Typo3 Form Finisher, class not found - forms

I use TYPO3 8.7.8
I followed this guide to add a finisher to a form.
https://www.marco.zone/typo3-formular-finisher-zum-editor-hinzufuegen
In back-end i can choose my finisher but in front-end i got this error:
Could not analyse class:
"MyVendor\MyExtensionName\Domain\Finishers\FluidFinisher" maybe not
loaded or no autoloader? Class
MyVendor\MyExtensionName\Domain\Finishers\FluidFinisher does not exist
and this is the base setup:
# BaseSetup.yaml
TYPO3:
CMS:
Form:
prototypes:
standard:
finishersDefinition:
CleverreachSubscribe:
implementationClassName: 'MyVendor\MyExtensionName\Domain\Finishers\FluidFinisher'
And this is the namespace of my class finisher that is inside my extension:
->\typo3conf\ext\myextensionname\Classes\Domain\Finishers\FluidFinisher.php
namespace MyVendor\MyExtensioneName\Domain\Finishers;
I miss some configuration?

Your code looks good as far as I can see. Try:
You use composer? Run composer dump to regenerate the autoloader.
Check for typos
Caches?

Related

TYPO3 v11 and fluidtypo3/flux v9.5.0: Class Page does not exist. Reflection failed

I did a fresh composer installation of TYPO3 v11.5.9...
composer require "typo3/cms-adminpanel:^11.5" "typo3/cms-backend:^11.5" "typo3/cms-belog:^11.5" "typo3/cms-beuser:^11.5" "typo3/cms-core:^11.5" "typo3/cms-dashboard:^11.5" "typo3/cms-extbase:^11.5" "typo3/cms-extensionmanager:^11.5" "typo3/cms-filelist:^11.5" "typo3/cms-fluid:^11.5" "typo3/cms-fluid-styled-content:^11.5" "typo3/cms-form:^11.5" "typo3/cms-frontend:^11.5" "typo3/cms-impexp:^11.5" "typo3/cms-info:^11.5" "typo3/cms-install:^11.5" "typo3/cms-lowlevel:^11.5" "typo3/cms-opendocs:^11.5" "typo3/cms-recordlist:^11.5" "typo3/cms-recycler:^11.5" "typo3/cms-redirects:^11.5" "typo3/cms-reports:^11.5" "typo3/cms-rte-ckeditor:^11.5" "typo3/cms-scheduler:^11.5" "typo3/cms-seo:^11.5" "typo3/cms-setup:^11.5" "typo3/cms-tstemplate:^11.5" "typo3/cms-viewpage:^11.5"
and added fluidtypo3/flux, composer installed v9.5.0:
composer require fluidtypo3/flux
I created a sitepackage with sitepackagebuilder.com.
In the ext_localconf.php I registered Flux like this:
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Vendor.Sitepackage', 'Content');
\FluidTYPO3\Flux\Core::registerProviderExtensionKey('Vendor.Sitepackage', 'Page');
After adding a root page, creating a main template record, including all static templates and adding the TypoScript to the page, I opened the page in the frontend. The following error occured:
(1/2) #1278450972 TYPO3\CMS\Extbase\Reflection\Exception\UnknownClassException
Class Page does not exist. Reflection failed.
No matter what extension settings are defined or if any templates are present in Resources/Private/Tempaltes/Content/, the exception persists.
But, if I change the version of Flux to dev-development, the frontend loads perfectly fine.
Does anybody know what's going on here? What am I doing wrong?
I found the problem.
The file ext_localconf.php has a faulty condition to check the TYPO3 core version, which leads to a wrong $pageControllerName (row 136). It's Pageinstead of \FluidTYPO3\Flux\Controller\PageController::class which explains the exception message. (The wrong condition also occurs in file Classes/Integration/ContentTypeBuilder.php).
This bug has been fixed in branch development commit #19279684f1792f373d3a1fafdbde4dea0e4e12d9.

TYPO3 Fluidpages not loaded or no autoloader

I got error in Fluidpages on frontend:
TYPO3 v6.2.11
Flux v7.2.0
Fluidpages v3.2.0
vhs v2.3.1
As before I have setup many projects with Flux and Fluidpages but in latest version I am in stuck.
The problem is probably that you use old class names (the ones with underscores). EXT:flux removed support of old class names in version 7.2.0 (see changelog), same for EXT:fluidpages.
To fix this, just replace your occurrence of Tx_Fluidpages_Controller_PageController with its new name: \FluidTYPO3\Fluidpages\Controller\PageController.
Of course you need to do the same thing for all classes in PHP as well as in all namespace declarations in your fluid templates.
Hey Ghanshaym,
5 >
5 = USER
5.userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
5.extensionName = Fluidpages
5.vendorName = FluidTYPO3
5.pluginName = Page
10 >
May be helps

FuelPHP Upload Class not found

I am trying to upload an image using FuelPHP framework Upload class and I am getting the following error:
Fatal error: Class 'FuelPHP\Upload\Upload' not found in
/projects/clients/client0/web61/web/fuel/fuel/core/classes/upload.php
on line 90
This is the code I am using after the form is submitted:
Upload::process($config);
if (Upload::is_valid()) {
Upload::save();
}
Thanks!
It's a bug in FuelPHP_1.6.1.zip file. Update Fuel to 1.6/master or
Edit composer.json with:
"fuelphp/upload": "2.0"
to
"fuelphp/upload": "1.*"
and then,
$ composer update
From the looks of it, you don't have the FuelPHP/Upload package installed. Have you ran:
composer install
on your root folder?
The current Upload class just translates the old class interface to the new one, as Harro describes here.

How to move Symfony Admin Generator files to a plugin?

I try to move my module which generated by the Admin Genrator to a plugin.
Error:
Fatal error: Class 'BaseFooGeneratorConfiguration' not found in ...
The action.class.php includes to files:
fooGeneratorConfiguration.class.php
fooGeneratorHelper.class.php
Both classes extends of an base class (BaseFooGeneratorConfiguration,BaseFooGeneratorHelper).
The problem is that those classes only exist in the cache.
Do i need to copy the class from cache into my plugin ?!
Have you tried clearing your cache after moving the module to your plugin?
./symfony cc

generate-migrations-diff failing with Zend framework

I am trying to generate a migration script using Doctrine with Zend Framework. I am getting the following:
$ php doctrine.php generate-migrations-diff
$ PHP Fatal error: Cannot redeclare class Avo_Model_AccessType in
$ tmp/fromprfx_doctrine_tmp_dirs/AccessType.php on line 16
I can successfully build the models form the yaml file. I am using Zend Framework 1.10.5 and Doctrine 1.2.2 I think the issue might be with the autoloader and the fact that Zend Autoloads the classes that doctrine is trying to re-create.
I've got the same error today. The problem was that in bootstrap I preloaded all models with
Doctrine_Core::loadModels($options['models_path']);
So, I just removed that line and it helped.