Call to undefined method run()

Hi
I am still getting this error when i try a view a record
Log shows
Slim Application Error Type: Error Code: 0 Message: Call to undefined method PHPMaker2021\2021\ProposalView::run() File: /var/www/html/controllers/ControllerBase.php Line: 50

i have regenerated my files?
any ideas?thanks

  1. Make sure you have already re-generated ALL script files.
  2. Make sure you have already re-uploaded ALL the generated script files to your web server.

Same error
Any ideas welcome
Thanks

andyrav wrote:

Slim Application Error Type: Error Code: 0 Message: Call to undefined method PHPMaker2021\2021\ProposalView::run() File: /var/www/html/controllers/ControllerBase.php Line: 50 >


  1. I’m not sure it is related, but you may try to change the project name from “2021” to something starting with alphabet.
  2. Assume “Proposal” is your table name, open \models, make sure ProposalView.php exists. Open the file, make sure the method run() exists.
  3. Make sure you use Composer 2.0.7 or newer and do composer update again.

I have been facing this error a lot and i figured out that it is related to the naming of the tables and views.

For example, if i have a table with the name stock and if i have a view with the name stocklist, then PHPM will corrupt or get confused and can’t generate the StockList.php in model folder.

Make sure you have already used the latest version, as of today is v2021.0.8. After that, make sure you have already updated to the latest template, click Tools → Update Template, then re-generate ALL the script files again.

I am using the latest version and template.

hemin wrote:

For example, if i have a table with the name stock and if i have a view with the name stocklist

The List page of the table “stock” is named as “StockList” by default, so do not name your own view as “stocklist”, you may rename your view.