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

[4.2] Action Logs Enabled #37571

Closed
wants to merge 4 commits into from

Conversation

brianteeman
Copy link
Contributor

This PR adds a check to the action logs component to determine if the plugin is enabled and if not theen it providees a modal link to enable thee modal. Exactly the same as in com_redirects

Testing Instructions

Disable the plugin "Action Logs - Joomla"

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

image

Documentation Changes Required

none

This PR adds a check to the action logs component to determine if the plugin is enabled and if not theen it providees a modal link to enable thee modal. Exactly the same as in com_redirects
@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.2-dev labels Apr 17, 2022
@toivo
Copy link
Contributor

toivo commented Apr 18, 2022

I have tested this item 🔴 unsuccessfully on 72abefb

Tested in Joomla 4.1.3-dev of 17 April in Wampserver using PHP 8.0.15.
The error notice was displayed but when clicking the link 'Action Log - Joomla Plugin', nothing happened. The page has the following error that is not displayed if the patch is reverted:

An error has occurred.
0 There is no "table.columns" asset of a "script" type in the registry.
Call stack

Function Location

1 () JROOT\libraries\src\WebAsset\WebAssetRegistry.php:132
2 Joomla\CMS\WebAsset\WebAssetRegistry->get() JROOT\libraries\src\WebAsset\WebAssetManager.php:277
3 Joomla\CMS\WebAsset\WebAssetManager->useAsset() JROOT\libraries\src\WebAsset\WebAssetManager.php:201
4 Joomla\CMS\WebAsset\WebAssetManager->__call() JROOT\administrator\components\com_actionlogs\tmpl\actionlogs\default.php:27
5 include() JROOT\libraries\src\MVC\View\HtmlView.php:436
6 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT\libraries\src\MVC\View\HtmlView.php:220
7 Joomla\CMS\MVC\View\HtmlView->display() JROOT\administrator\components\com_actionlogs\src\View\Actionlogs\HtmlView.php:137
8 Joomla\Component\Actionlogs\Administrator\View\Actionlogs\HtmlView->display() JROOT\libraries\src\MVC\Controller\BaseController.php:697
9 Joomla\CMS\MVC\Controller\BaseController->display() JROOT\administrator\components\com_actionlogs\src\Controller\DisplayController.php:69
10 Joomla\Component\Actionlogs\Administrator\Controller\DisplayController->display() JROOT\libraries\src\MVC\Controller\BaseController.php:735
11 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:146
12 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT\libraries\src\Component\ComponentHelper.php:389
13 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT\libraries\src\Application\AdministratorApplication.php:143
14 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT\libraries\src\Application\AdministratorApplication.php:186
15 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:278
16 Joomla\CMS\Application\CMSApplication->execute() JROOT\administrator\includes\app.php:63
17 require_once() JROOT\administrator\index.php:32


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37571.

@toivo
Copy link
Contributor

toivo commented Apr 18, 2022

Sorry, wrong dev version!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37571.

@richard67
Copy link
Member

@toivo I've altered your test result to "Not tested" in the issue tracker due to your last comment. When you want to correct a previous test result you can do that also yourself just by using again the "Test this" button in the issue tracker and then selecting the new test result, in this case "I've not tested this item" (or so).

@toivo
Copy link
Contributor

toivo commented Apr 18, 2022

@richard67 thank you.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37571.

@toivo
Copy link
Contributor

toivo commented Apr 20, 2022

I have tested this item ✅ successfully on 72abefb

Tested successfully in Joomla 4.2.0-alpha2-dev of 20 April in Wampserver using PHP 8.0.15


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37571.

*
* @since __DEPLOY_VERSION__
*/
public static function getActionlogPluginId()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method needs to be moved to the model as there you have the database object available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the exact same code used in multiple places in core then.

Really frustrating to copy paste code from one component to another and be told its wrong.

As you know core is wrong I now expect that you will fix it

@laoneo laoneo self-assigned this Apr 20, 2022
@brianteeman
Copy link
Contributor Author

Really frustrating to copy paste code from one component to another and be told its wrong.

As you know core is wrong I now expect that you will fix it.

@brianteeman brianteeman deleted the action_log_enabled branch April 20, 2022 08:35
@laoneo
Copy link
Member

laoneo commented Apr 20, 2022

I'm on it #37097, but stuff needs to be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants