Skip to content

[com_actionlogs] - fix article link when edited from frontend#22554

Closed
alikon wants to merge 2 commits intojoomla:stagingfrom
alikon:patch-108
Closed

[com_actionlogs] - fix article link when edited from frontend#22554
alikon wants to merge 2 commits intojoomla:stagingfrom
alikon:patch-108

Conversation

@alikon
Copy link
Contributor

@alikon alikon commented Oct 8, 2018

Pull Request for Issue #22551 .

Summary of Changes

translate to backend url

Testing Instructions

#22551

@alikon
Copy link
Contributor Author

alikon commented Oct 8, 2018

3 lines of code 2 @Quy yellow card collected 🤕
🤣

@Quy
Copy link
Contributor

Quy commented Oct 8, 2018

I have tested this item ✅ successfully on 25258a3


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

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Oct 8, 2018

Perhaps move this to the plugin? And add component check?

@infograf768
Copy link
Member

@alikon
@SharkyKZ is right. This should depend on the plugin.

I propose this as a solution.

diff --git a/plugins/actionlog/joomla/joomla.php b/plugins/actionlog/joomla/joomla.php
index 0fb7e27..2d06e50 100644
--- a/plugins/actionlog/joomla/joomla.php
+++ b/plugins/actionlog/joomla/joomla.php
@@ -78,5 +78,12 @@
 		}
 
-		list(, $contentType) = explode('.', $params->type_alias);
+		if ($option === 'com_content')
+		{
+			$contentType = 'article';
+		}
+		else
+		{
+			list(, $contentType) = explode('.', $params->type_alias);
+		}
 
 		if ($isNew)
@@ -191,5 +198,12 @@
 		}
 
-		list(, $contentType) = explode('.', $params->type_alias);
+		if ($option === 'com_content')
+		{
+			$contentType = 'article';
+		}
+		else
+		{
+			list(, $contentType) = explode('.', $params->type_alias);
+		}
 
 		switch ($value)
@@ -470,4 +484,9 @@
 		$option = $this->app->input->getCmd('option');
 
+		if ($table->get('module') != null)
+		{
+			$option = 'com_modules';
+		}
+
 		if (!$this->checkLoggable($option))
 		{

@infograf768
Copy link
Member

Oh, I see it contains the check for com_modules which is already taken care in another PR.
I will merge that one now.

@infograf768
Copy link
Member

@alikon
can you modify PR?
RC is for tomorrow

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22554

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

Successfully merging this pull request may close these issues.

5 participants