? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
3 Feb 2021

Pull Request for Issue #32264 .

Summary of Changes

Instead of getting $option directly from request (which is wrong in case category is created from add article/add contact... screen), we can just get $option (component) from type_alias(com_content.article, com_categories.category....) of the content type.

This solve error in case the content type is created using a different component (like category is created from com_contact or com_content) as shown in the issue #32264

Testing Instructions

  1. Follow instructions at #32264 to see the issue
  2. Apply patch, confirm the issue fixed

Actual result BEFORE applying this Pull Request

The link to category is wrong

Expected result AFTER applying this Pull Request

The link to category is right

Documentation Changes Required

If this change is accepted, similar change should be done to other methods in the plugin like onContentAfterDelete, onContentChangeState....

avatar joomdonation joomdonation - open - 3 Feb 2021
avatar joomdonation joomdonation - change - 3 Feb 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Feb 2021
Category Front End Plugins
avatar joomdonation joomdonation - change - 3 Feb 2021
Title
Fix wrong link to category on user action log
[4.0]Fix wrong link to category on user action log
avatar joomdonation joomdonation - edited - 3 Feb 2021
avatar richard67 richard67 - change - 3 Feb 2021
Title
[4.0]Fix wrong link to category on user action log
[4.0] Fix wrong link to category on user action log
avatar richard67 richard67 - edited - 3 Feb 2021
avatar toivo toivo - test_item - 3 Feb 2021 - Tested successfully
avatar toivo
toivo - comment - 3 Feb 2021

I have tested this item successfully on 3212df3

Tested successfully in Beta8-dev of 3 February using PHP 8.0.1.


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

avatar alikon
alikon - comment - 3 Feb 2021

humm...
after pr i've been redirected here
http://localhost/bs5/administrator/index.php?option=com_categories&view=category&layout=edit&id=13&extension=com_content

it should be &extension=com_contact or whatever

p.s
we have the same issue on j3

avatar joomdonation joomdonation - change - 4 Feb 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2021
Category Front End Plugins Administration com_categories Front End Plugins
avatar joomdonation
joomdonation - comment - 4 Feb 2021

Thanks @alikon . The extension in the edit link is default to com_content (get from extension variable in the request) instead of the extension of that category for some reasons

I modified code of category controller and the link is correct now. However, I'm unsure if that's the right way :(.

avatar alikon
alikon - comment - 4 Feb 2021

I'm unsure if that's the right way :(.

me neither, but at least, now it works ?

let's request some review

avatar alikon alikon - test_item - 4 Feb 2021 - Tested successfully
avatar alikon
alikon - comment - 4 Feb 2021

I have tested this item successfully on 7f01584


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

avatar joomdonation
joomdonation - comment - 5 Feb 2021

@alikon I made small modification to the code to only get extension from category itself in case no extension is passed in the request (like the link from action log http://localhost/joomla4/administrator/index.php?option=com_categories&task=category.edit&id=22 ). It should be OK now. But we will wait for review from @wilsonge .

avatar ceford ceford - test_item - 5 Feb 2021 - Tested successfully
avatar ceford
ceford - comment - 5 Feb 2021

I have tested this item successfully on e872ef1

I ran into trouble with this. After applying the patch I needed to delete the contact, the category and the log and go through the creation test again. Then it worked.


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

avatar richardfrederik67 richardfrederik67 - test_item - 5 Feb 2021 - Tested successfully
avatar richard67 richard67 - alter_testresult - 5 Feb 2021 - richardfrederik67: Not tested
avatar alikon
alikon - comment - 5 Feb 2021

old log item will have wrong url
that's ok

avatar alikon alikon - test_item - 5 Feb 2021 - Tested successfully
avatar alikon
alikon - comment - 5 Feb 2021

I have tested this item successfully on e872ef1


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

avatar alikon alikon - change - 5 Feb 2021
Status Pending Ready to Commit
avatar alikon
alikon - comment - 5 Feb 2021

RTC


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

avatar infograf768
infograf768 - comment - 8 Feb 2021

@wilsonge
Can you check this one before merge?

avatar infograf768 infograf768 - close - 10 Feb 2021
avatar infograf768 infograf768 - merge - 10 Feb 2021
avatar infograf768 infograf768 - change - 10 Feb 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-02-10 08:44:47
Closed_By infograf768
Labels Added: ?
avatar infograf768
infograf768 - comment - 10 Feb 2021

Tks.

Add a Comment

Login with GitHub to post a comment