PR-5.3-dev Pending

User tests: Successful: 0 Unsuccessful: 0

avatar joomdonation
joomdonation
6 Feb 2025

Pull Request for Issue # .

Summary of Changes

This PR removes code to set $application object for privacy plugins because these plugins do not have any code to use application at all. Look like these lines of code come from copy/paste while converting plugins to service provider

Testing Instructions

  • Use Joomla 5.3 nightly build
  • Login to administrator area of your site
  • Access to Users -> Privacy -> Requests, create a new Privacy Information Request
  • Check the email which you create the request to, there should be link to allow you to confirm the request (honestly, I just guess because I am not familiar with this feature and in my test, I looked at #__privacy_requests table, change status field of the request to 1 manually)
  • Access to the request again, press Export Data button to perform export

You can also test it by doing code review and confirm that in the following files, there is no $this->getApplication() code called there:

  • plugins/privacy/actionlogs/src/Extension/Actionlogs.php
  • plugins/privacy/consents/src/Extension/Consents.php
  • plugins/privacy/contact/src/Extension/Contact.php
  • plugins/privacy/content/src/Extension/Content.php
  • plugins/privacy/message/src/Extension/Message.php
  • plugins/privacy/user/src/Extension/UserPlugin.php

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works, with lesser code, mean it is a bit faster

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomdonation joomdonation - open - 6 Feb 2025
avatar joomdonation joomdonation - change - 6 Feb 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2025
Category Front End Plugins
avatar joomdonation joomdonation - change - 6 Feb 2025
Labels Added: PR-5.3-dev
avatar Fedik
Fedik - comment - 9 Feb 2025

Nope, sorry. It is in use for language loading, and these plugins have a few own lang strings.

$lang = $this->getApplication() ? $this->getApplication()->getLanguage() : Factory::getLanguage();

That is something that we still need to figure out how to improve.

avatar joomdonation joomdonation - change - 10 Feb 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-02-10 01:12:09
Closed_By joomdonation
avatar joomdonation joomdonation - close - 10 Feb 2025
avatar joomdonation
joomdonation - comment - 10 Feb 2025

Closing this PR because plugins still need application for loading language as @Fedik pointed out above.

Add a Comment

Login with GitHub to post a comment