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

Can't upload any files #38

Closed
ineswillenbrock opened this issue Mar 15, 2025 · 1 comment
Closed

Can't upload any files #38

ineswillenbrock opened this issue Mar 15, 2025 · 1 comment

Comments

@ineswillenbrock
Copy link
Collaborator

TYPO3 v12 composer based
jobfair v5.0.2
PHP 8.1 as well as 8.3

If I use the default application template to apply for a job, I get this error regardless if I add an attachment:

Call to a member function getOriginalResource() on null
in /var/www/html/vendor/hov/jobfair/Classes/Controller/JobController.php line 648

Seems like $newApplication->getAttachment does nothing

$newApplication->getAttachment()->getOriginalResource()->getName()

If I add a var_dump($newApplication-getAttachment()); I get this:

`Call to undefined function Dan\Jobfair\Controller\getAttachment()
in /var/www/html/vendor/hov/jobfair/Classes/Controller/JobController.php line 641

        'jobfair',
        ['jobTitle' => $job->getJobTitle()]
    );
//    print_r($newApplication->getAttachment()->getOriginalResource()->getName());
var_dump($newApplication-getAttachment());`

Any ideas? Might be connected to the v12 compatibility.

a var_dump($newApplication) does yield a result:
object(Dan\Jobfair\Domain\Model\Application)#59575 (13) { ["uid":protected]=> int(238) ["_localizedUid":protected]=> NULL ["_languageUid":protected]=> int(0) ["_versionedUid":protected]=> NULL ["pid":protected]=> int(99) ["_isClone":"TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject":private]=> bool(false) ["_cleanProperties":"TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject":private]=> array(8) { ["uid"]=> int(238) ["pid"]=> int(99) ["title"]=> string(22) "AG25SprN - Willenbrock" ["name"]=> string(11) "Willenbrock" ["email"]=> string(23) "[email protected]" ["message"]=> string(14) "no attachments" ["attachment"]=> NULL ["jobs"]=> object(TYPO3\CMS\Extbase\Persistence\ObjectStorage)#58517 (6) { ["warning":"TYPO3\CMS\Extbase\Persistence\ObjectStorage":private]=> string(228) "You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\CMS\Extbase\Persistence\ObjectStorage. To retrieve the first result, you can use the rewind() and current() methods." ["storage":protected]=> array(0) { } ["isModified":protected]=> bool(false) ["addedObjectsPositions":protected]=> array(0) { } ["removedObjectsPositions":protected]=> array(0) { } ["positionCounter":protected]=> int(0) } } ["title":protected]=> string(22) "AG25SprN - Willenbrock" ["name":protected]=> string(11) "Willenbrock" ["email":protected]=> string(23) "[email protected]" ["message":protected]=> string(14) "no attachments" ["attachment":protected]=> NULL ["jobs":protected]=> object(TYPO3\CMS\Extbase\Persistence\ObjectStorage)#59573 (6) { ["warning":"TYPO3\CMS\Extbase\Persistence\ObjectStorage":private]=> string(228) "You should never see this warning. If you do, you probably used PHP array functions like current() on the TYPO3\CMS\Extbase\Persistence\ObjectStorage. To retrieve the first result, you can use the rewind() and current() methods." ["storage":protected]=> array(0) { } ["isModified":protected]=> bool(false) ["addedObjectsPositions":protected]=> array(0) { } ["removedObjectsPositions":protected]=> array(0) { } ["positionCounter":protected]=> int(0) } }

@ineswillenbrock
Copy link
Collaborator Author

This fixes #34 too

nhovratov added a commit that referenced this issue Mar 23, 2025
Fixes: #38
Fixes: #34
(cherry picked from commit 1947a4b)
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

1 participant