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

[5] Privacy: Consents language file not loaded. #44054

Open
ceford opened this issue Sep 10, 2024 · 1 comment
Open

[5] Privacy: Consents language file not loaded. #44054

ceford opened this issue Sep 10, 2024 · 1 comment

Comments

@ceford
Copy link
Contributor

ceford commented Sep 10, 2024

Steps to reproduce the issue

Have a user confirm acceptance of the Privacy Policy on login (Enable the System - Privacy Consent plugin)
Go to the administrator Privacy / Consents page.

Expected result

The Subject should be a translated string: Privacy Policy

Actual result

The Subject is a string key: PLG_SYSTEM_PRIVACYCONSENT_SUBJECT

System information (as much as possible)

Additional comments

I have traced this problem to plugins/system/privacyconsent/src/Extension/PrivacyConsent.php where the following block of code is missing from line 39 and following:


    /**
     * Load the language file on instantiation.
     *
     * @var    boolean
     * @since  3.9.0
     */
    protected $autoloadLanguage = true;

It was present in Joomla 4.

@Fedik
Copy link
Member

Fedik commented Sep 10, 2024

I think it should be translated by com_privacy,
The consent plugin inserts untranslated string:

$userNote = (object) [
'user_id' => $userId,
'subject' => 'PLG_SYSTEM_PRIVACYCONSENT_SUBJECT',
'body' => Text::sprintf('PLG_SYSTEM_PRIVACYCONSENT_BODY', $ip, $userAgent),
'created' => Factory::getDate()->toSql(),
];
try {
$this->getDatabase()->insertObject('#__privacy_consents', $userNote);

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

No branches or pull requests

3 participants