I am developing a component. At the site part model, inside getItem($pk)

I am using:

$params = new JRegistry;                                
$params->loadString($this->item->params, 'JSON');                               
$this->item->params = $params;
$params =clone $this->getState('params');   
$this->item->params = $params;

while in populateState method I created a params variable and got default.xml params in a JRegistry object and now merge only considers backend params. In other words, what I do in menuitem has no effect and changes nothing. Kian William


I solved it, Eureka, when I used getState() to obtain variable I created in populateState of model in site part, I had to change it or assign it to a registery object so that merge could work on two registry object.


clone() could not change a string to reg object.

In populateState, I create a Registry obj, but when I assigned it to setState variable, it turns back to a string again, it works now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.