User tests: Successful: Unsuccessful:
Pull Request for Issue # .
situation: when you need use the site part com_content article model outside of com_content or calling model using 'ignore_request' => true
Error: php error " __clone method called on non-object in ...." for line $data->params = clone $this->getState('params'); as the param object is empty and can not be clone.
So the quick fix can be
//$data->params = clone $this->getState('params');
$tempparams = $this->getState('params');
if(is_object($tempparams)){
$data->params = clone $tempparams;
}
else{
$data->params = new Registry;
}
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I have a query to experts. The issue I noted in this pull request same issue exists in another core model like site part single contact model, banner etc or if we look again. This is because extension developer like me try to use the core models without writing the sql query once again and can face same issue. I can send more pull request for same type issue in other core model,
I think it's reasonable to harden the code to cope with the possibility that params might be empty.
However, I think your code can be simplified to remove the else clause.
Also, please bear in mind that the core extension classes are NOT subject to our backwards-compatibility promise, so extending from them is something you should undertake only on the understanding that your code might break on a minor version upgrade, although the probability is very low for the remainder of the 3.x series.
Category | ⇒ | Components |
This PR needs to be synchronized to the current development branch to be tested/reviewed. Also, the commented out code should be removed.
Title |
|
Title |
|
Category | Components | ⇒ | Front End com_content Components |
Status | Pending | ⇒ | Information Required |
If this PR get no Response, it will be closed at 22th June 2017.
This PR is waiting from july 6, 2016 !
I don't know how can I resolve the conflict as the main branch code already changed after my PR. Either someone help on this or close this PR.
How to help @manchumahara to synchronize his PR?
ping @rdeutz as Release Leader 3.7 if he knows one who can help @manchumahara to synchronize.
This need a bit more, you are only checking is it is an object but the title says your check is if it is a registry. Closing because recreate a PR is easier
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-21 12:15:22 |
Closed_By | ⇒ | rdeutz |
@manchumahara Please see CS PR manchumahara#1