- Posts: 13295
- Thank you received: 1734
All questions about EDocman extension
Feedback on language filter implementation in EDocman 3.0 (Joomla 5.4)
- Dang Thuc Dam
-
Topic Author
- Offline
- Administrator
-
Less
More
1 month 1 week ago #173864
by Dang Thuc Dam
We are excited to announce the release of Edocman 3.0, fully compatible with Joomla 6. In this latest version, we have re-engineered Edocman’s codebase to ensure seamless integration, removing outdated classes and unsupported functions for optimal performance. Enjoy our enhanced Mass Download feature, designed to support large file downloads with ease. Edocman 3.0 also comes with the Auto Clean plugin, which is automatically published to help you manage storage by deleting unnecessary PDF files from the edocmanviewer folder. Experience our brand-new, modern media player with advanced functionalities, allowing you to play audio and video files directly within Edocman. Upgrade now and take your document management to the next level!
Edocman 3.0 – The Ultimate Document Management Solution for Joomla 6! was created by Dang Thuc Dam
We are excited to announce the release of Edocman 3.0, fully compatible with Joomla 6. In this latest version, we have re-engineered Edocman’s codebase to ensure seamless integration, removing outdated classes and unsupported functions for optimal performance. Enjoy our enhanced Mass Download feature, designed to support large file downloads with ease. Edocman 3.0 also comes with the Auto Clean plugin, which is automatically published to help you manage storage by deleting unnecessary PDF files from the edocmanviewer folder. Experience our brand-new, modern media player with advanced functionalities, allowing you to play audio and video files directly within Edocman. Upgrade now and take your document management to the next level!
The following user(s) said Thank You: Alison
Please Log in or Create an account to join the conversation.
- hide10
-
- Offline
- Elite Member
-
Less
More
- Posts: 259
- Thank you received: 3
1 day 23 hours ago - 1 day 23 hours ago #175237
by hide10
Replied by hide10 on topic Bug Report: Undefined constant error in EDocman 3.0 on Joomla 5.4
Hello,
After updating to EDocman 3.0 on Joomla 5.4, I encountered an error when trying to open the frontend update page:
Since I am not a PHP expert, I asked an AI assistant for help. Based on the analysis, the issue comes from the following line in:
administrator/components/com_edocman/model/fields/edocmancategory.php (around line 101)
Current code:
Suggested correction:
I tested this correction locally, and it fixed the problem — the update page now works as expected.
It seems to be a simple syntax error (missing parentheses), but since this appears in the distributed package, I believe it should be addressed in an official update.
Could you please review and confirm?
Thanks
After updating to EDocman 3.0 on Joomla 5.4, I encountered an error when trying to open the frontend update page:
Code:
Undefined constant Joomla\CMS\Factory::getApplication
Since I am not a PHP expert, I asked an AI assistant for help. Based on the analysis, the issue comes from the following line in:
administrator/components/com_edocman/model/fields/edocmancategory.php (around line 101)
Current code:
Code:
$query->where('tbl.language IN (' . $db->Quote(Factory::getApplication->getLanguage()->getTag()) . ',' . $db->Quote('*') . ', "")');
Suggested correction:
Code:
$query->where('tbl.language IN (' . $db->Quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->Quote('*') . ', "")');
I tested this correction locally, and it fixed the problem — the update page now works as expected.
It seems to be a simple syntax error (missing parentheses), but since this appears in the distributed package, I believe it should be addressed in an official update.
Could you please review and confirm?
Thanks
Last edit: 1 day 23 hours ago by hide10.
Please Log in or Create an account to join the conversation.
- Dang Thuc Dam
-
Topic Author
- Offline
- Administrator
-
Less
More
- Posts: 13295
- Thank you received: 1734
1 day 20 hours ago #175238
by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Bug Report: Undefined constant error in EDocman 3.0 on Joomla 5.4
Hi,
I confirm the issue, this is the code after updating:
Thanks
Dam
I confirm the issue, this is the code after updating:
Code:
if ($config->get('activate_multilingual_feature') && Factory::getContainer()->get('language.filter')->isEnabled())
{
$query->where('tbl.language IN (' . $db->Quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->Quote('*') . ', "")');
}
Dam
Please Log in or Create an account to join the conversation.
- hide10
-
- Offline
- Elite Member
-
Less
More
- Posts: 259
- Thank you received: 3
1 day 19 hours ago #175240
by hide10
Replied by hide10 on topic Feedback on language filter implementation in EDocman 3.0 (Joomla 5.4)
Hi Dang,
Thank you for your quick response and for providing the updated code snippet regarding the multilingual feature.
I tested the suggested code:
However, when running it on Joomla 5.4, I received the following error:
Resource 'language.filter' has not been registered with the container.
Since I am not a PHP expert, I consulted an AI assistant again.
The analysis suggested that this error occurs because language.filter is not always registered in the container (e.g., when the multilingual system plugin is not enabled).
As an alternative, the AI recommended using Multilanguage::isEnabled(), which works correctly and avoids the container registration issue. I tested this approach, and the update page displayed normally:
This solution seems safer and more compatible with Joomla 5.x.
Could you please review and consider adopting this approach in a future release?
Thanks!
Thank you for your quick response and for providing the updated code snippet regarding the multilingual feature.
I tested the suggested code:
Code:
if ($config->get('activate_multilingual_feature') && Factory::getContainer()->get('language.filter')->isEnabled()) {
$query->where('tbl.language IN (' . $db->Quote(Factory::getApplication()->getLanguage()->getTag()) . ',' . $db->Quote('*') . ', "")');
}
However, when running it on Joomla 5.4, I received the following error:
Resource 'language.filter' has not been registered with the container.
Since I am not a PHP expert, I consulted an AI assistant again.
The analysis suggested that this error occurs because language.filter is not always registered in the container (e.g., when the multilingual system plugin is not enabled).
As an alternative, the AI recommended using Multilanguage::isEnabled(), which works correctly and avoids the container registration issue. I tested this approach, and the update page displayed normally:
Code:
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
if ($config->get('activate_multilingual_feature') && Multilanguage::isEnabled())
{
$langTag = Factory::getApplication()->getLanguage()->getTag();
$query->where(
$db->quoteName('tbl.language') . ' IN (' .
implode(',', [$db->quote($langTag), $db->quote('*'), $db->quote('')]) .
')'
);
}
This solution seems safer and more compatible with Joomla 5.x.
Could you please review and consider adopting this approach in a future release?
Thanks!
Please Log in or Create an account to join the conversation.
- Dang Thuc Dam
-
Topic Author
- Offline
- Administrator
-
Less
More
- Posts: 13295
- Thank you received: 1734
1 day 19 hours ago #175241
by Dang Thuc Dam
Replied by Dang Thuc Dam on topic Feedback on language filter implementation in EDocman 3.0 (Joomla 5.4)
OK, thank you for your suggestion
Regards,
Dam
Regards,
Dam
Please Log in or Create an account to join the conversation.
Moderators: Dang Thuc Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.