post by CodeGC on Oct 12, 2023

i am using Version 3.13 | Enterprise.. i noticed 2 problems :
1- the subject defined on the function setSubject on the
$crud->setSubject(‘Customer’, ‘Customers’);
if you make 2 or 3 cruds the last subject for last crud will be applied on all above subjects on edit and add pop up forms..


on the image you will find the subject for all cruds shown as last crud subject on edit and add forms.

2- on the working example on the link: Multiple Grids | Grocery CRUD - A PHP CRUD Generator Library
it have a mistake on line:
$output2 = $crud->render();
it have to be : $output2 = $crud2->render(); //crud2 not crud

post by CodeGC on Oct 18, 2023

post by johnny on Oct 18, 2023

Hello @CodeGC ,

I didn’t have the time to check this specific issue. I will try to check it during the weekend.

If you can see if you change the configuration url_history to false to see if this is still reproducible in your end.

I will also update the documentation asap.

Regards
Johnny

post by johnny on Oct 19, 2023

Hello @CodeGC ,

I have updated the documentation and I’ve also checked by copy-pasting the examples to see that they are actually working. I can’t reproduce the issue that you are referring to unfortunately.

Please make sure that you have the correct minimal input for the main multigrid function. For example somethign like this:

public function demo_multigrid() {
    $crud = $this->_getGroceryCrudEnterprise();

    $crud->setApiUrlPath('/demo_example_films');
    $output = $crud->render();

    $crud2 = $this->_getGroceryCrudEnterprise();

    $crud2->setApiUrlPath('/demo_example_customers');
    $output2 = $crud2->render();

    $output->output .= '<br/>' . $output2->output;

    return $this->_example_output($output);
}

If this still doesn’t work, maybe can you share your Controller to see if anything obvious is missing?

Regards
Johnny

post by CodeGC on Oct 19, 2023

Hi @johnny
Kindly try to make 3 curds not only 2.. may be you will produce the error for subject if you try it with more than tow cruds..

post by CodeGC on Oct 19, 2023

can you please put the running example for multiple grids on the documentation also like you did with another functions

post by johnny on Oct 20, 2023

:astonished: :astonished: :astonished: You are right. For more than 2 CRUDs it is actually reproducible. That’s really really weird. I will investigate and let you know.

I have updated also the documentation.

Regards
Johnny

post by johnny on Oct 20, 2023

post by johnny on Oct 21, 2023

post by CodeGC on Oct 22, 2023

1 / 10
Oct 2023