to reproduce with a core component (com_contact)
On j3 site add the following function to ./components/com_contact/controllers/contact.php
public function test()
{
var_dump($this->input->getArray());die;
}
On J4 site add the same method in ./components/com_contact/src/controller/ContactController.php
Now lets call this method on both the J3 and J4 site:
[J3domain]/index.php?option=com_contact&task=contact.test
[J4domain]/index.php?option=com_contact&task=contact.test
array(5) {
["option"]=>
string(11) "com_contact"
["task"]=>
string(4) "test"
["language"]=>
string(5) "en-GB"
["Itemid"]=>
NULL
["lang"]=>
string(5) "en-GB"
}
array(7) {
["option"]=>
string(11) "com_contact"
["task"]=>
string(4) "test"
["language"]=>
string(5) "en-GB"
["view"]=>
string(7) "article"
["id"]=>
string(1) "8"
["Itemid"]=>
int(1142)
["controller"]=>
string(7) "contact"
}
J3.10.11 and J4.2.4
Been troubleshooting this on several sites / extensions and found that this is (IMO) a B/C break.
I think this is due to J4 adding the Itemid without that being called for. In the example given here it adds Itemid 1142 (which is my frontpage, com_content). This is not the issue,: the issue is that it also adds the view and when not specified on the url the id.
So if the extension reads if the id is present ($this->input->get('id', '')) and acts upon it, then in J4 it will always act upon it: not in this case on the contact id, but on the article id (8). So the id is not for the contact but for the article leading to unwanted behavior.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|
I can't: not doing anything J3 related anymore as it is not supported. In my extensions I worked around this issue in the code.
I think your proposed solution will cause problems for extension devs: one dev telling the customer to turn it on, the other telling the customer to turn it off.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-30 16:06:07 |
Closed_By | ⇒ | Hackwar |
Dont have access to
J3
, but can confirm this onJ4