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

error when downloading attachment #55

Open
etsc-webmaster opened this issue May 3, 2024 · 5 comments
Open

error when downloading attachment #55

etsc-webmaster opened this issue May 3, 2024 · 5 comments

Comments

@etsc-webmaster
Copy link

etsc-webmaster commented May 3, 2024

0 Call to undefined method JMCameron\Component\Attachments\Administrator\Model\AttachmentModel::setId():

No Function Location
1 () JROOT/components/com_attachments/src/Helper/AttachmentsHelper.php:1512
2 JMCameron\Component\Attachments\Site\Helper\AttachmentsHelper::download_attachment() JROOT/administrator/components/com_attachments/src/Controller/AttachmentController.php:1120
3 JMCameron\Component\Attachments\Administrator\Controller\AttachmentController->download() JROOT/libraries/src/MVC/Controller/BaseController.php:693
4 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
5 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
6 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
7 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
8 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
9 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
10 require_once() JROOT/administrator/index.php:32
@parapente
Copy link
Collaborator

Please specify the Joomla version, Attachment extension version and the browser you are using.

@etsc-webmaster
Copy link
Author

hi
thanks
it is ‎4.4.4

@etsc-webmaster
Copy link
Author

etsc-webmaster commented May 7, 2024

I have found the error
JROOT/components/com_attachments/src/Helper/AttachmentsHelper.php:1510

change
$model = $mvc->createModel('Attachment');

to 

	$model = $mvc->createModel('Attachment','Site');

this would point the code to the correct modle file in the site dir not admin
thanks

@parapente
Copy link
Collaborator

I cannot recreate the error with the latest version of attachments extension. Can you please try version 4.0.1 if you don't have it installed?

@JLTRY
Copy link
Collaborator

JLTRY commented May 13, 2024

@etsc-webmaster I did not reproduce the issue with latest version of attachment attachments 4.0.1 and joomla 4.4.4

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

3 participants