Call to a member function on null on one server while working on another

I have this weird behavior. In my developing computer all works flawlessly, while in testing server on several pages it throws this error./var/www/html/models/EventsPricesList.php(2765): Call to a member function setQueryStringValue() on null
(on other pages happens on searchExpression() or getDetailFilter() eg. /var/www/html/models/CyclesView.php(842): Call to a member function getDetailFilter() on null )The debug:

#0 /var/www/html/models/EventsPricesList.php(712): PHPMaker2024\AfmcNew\EventsPricesList->setupMasterParms()
#1 /var/www/html/controllers/ControllerBase.php(34): PHPMaker2024\AfmcNew\EventsPricesList->run()
#2 /var/www/html/controllers/EventsPricesController.php(22): PHPMaker2024\AfmcNew\ControllerBase->runPage()
#3 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): PHPMaker2024\AfmcNew\EventsPricesController->list()
...

The MailingAutomationList.php file:

        // View row  ======> ( row 2337)
        if ($this->RowType == RowType::VIEW) {
            // id
            $this->id->ViewValue = $this->id->CurrentValue;

            // event_id
            $curVal = strval($this->event_id->CurrentValue);
            if ($curVal != "") {
                $this->event_id->ViewValue = $this->event_id->lookupCacheOption($curVal);
                if ($this->event_id->ViewValue === null) { // Lookup from database
   $filterWrk = SearchFilter($this->event_id->Lookup->getTable()->Fields["id"]->searchExpression(), "=", $curVal, $this->event_id->Lookup->getTable()->Fields["id"]->searchDataType(), ""); // row 2347
                    $lookupFilter = $this->event_id->getSelectFilter($this); // PHP
                    $sqlWrk = $this->event_id->Lookup->getSql(false, $filterWrk, $lookupFilter, $this, true, true);
                    $conn = Conn();
                    $config = $conn->getConfiguration();
                    $config->setResultCache($this->Cache);
                    $rswrk = $conn->executeCacheQuery($sqlWrk, [], [], $this->CacheProfile)->fetchAll();
                    $ari = count($rswrk);
                    if ($ari > 0) { // Lookup values found
                        $arwrk = $this->event_id->Lookup->renderViewRow($rswrk[0]);
                        $this->event_id->ViewValue = $this->event_id->displayValue($arwrk);
                    } else {
                        $this->event_id->ViewValue = FormatNumber($this->event_id->CurrentValue, $this->event_id->formatPattern());
                    }
                }
            } else {
                $this->event_id->ViewValue = null;
            }

The database is exactly the same and the generated folder was entirely copied everytime.
I think that it also can’t be a permission issue since I am logged in with the hardcoded admin role.This is even more weird since for the same table throws the error on the view page while working ok on edit page.
The only common point I’ve been able to see is that the error comes always from “models” pagesI will really appreciate if someone can enlighten me to find the right way to solve this issue…
Thanks a lot in advance. <3

What database are you using?

The error means a field, .eg. Fields[“id”], does not exist on your testing server, you better compare the table schema or migrate your database to the testing server again.

:heart: Thank you both for your answers. :heart:I am using MySQL and I exported a SQL file from my dev DB and imported it in the testing srv.
The development pc is with W10 Pro (in fact is my only computer that still have Windows… :sweat_smile::sweat_smile::sweat_smile:) and servers are all with Ubuntu 22.04
Projects on server are all on Docker containers (one container for each service: db, frontend, backend, automations, etc.) which I am managing with a docker-compose.yml file.I checked that the user declared in the PHPMaker project to connect to the db has all the needed rights to use all tables, views, etc. so, the db structure and data are identical and same charset used on both instances: utf8mb4_general_ci.
I have not used FKs on the DB side because all relationships between tables and referencial integrity rules are set on the PHPMaker project.In fact, as I mentioned before, for most of the tables I can even edit the info, but I am facing issues only on viewing the data and if I am not wrong, the issues are when more than a table/view is involved.
I also thought that maybe there can be some node/php/SO dependency issues, however I discarded this because on some tables all options are working: view in pop-up, edit, copy record, etc.On the other side, on “Events” table I have a Master/Detail with multiple detail tables: Prices, Mailing, Bookings and Sponsors. If I open the view page, I can’t see the embedded image and pdf files while if I open the edit page, I can see and change correctly all the info. This is nuts… :grimacing:And in view mode, it counts the total records of all detail records, but if I click the Prices or Mailing tabs:
/var/www/html/models/EventsPrices.php(1386): Call to a member function searchExpression() on null
/var/www/html/models/MailingAutomation.php(1351): Call to a member function searchExpression() on nullIf I click edit, the edit popup page opens but if on the upper left corner I click the popup menu, it opens and shows me the total of detail records and:

  • if I am clicking on the first two sections (Prices or Mailing) which have detail records it throws:
    /var/www/html/models/EventsPricesList.php(2765): Call to a member function setQueryStringValue() on null
#0 /var/www/html/models/EventsPricesList.php(712): PHPMaker2024\AfmcNew\EventsPricesList->setupMasterParms()
#1 /var/www/html/controllers/ControllerBase.php(34): PHPMaker2024\AfmcNew\EventsPricesList->run()
#2 /var/www/html/controllers/EventsPricesController.php(22): PHPMaker2024\AfmcNew\ControllerBase->runPage()
#3 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): PHPMaker2024\AfmcNew\EventsPricesController->list()
  • if I am clicking on the last two sections (Bookings or Sponsors) which have NO detail records, the page opens correctly and I have the + sign to add a new record. When I click the + sign it throws:
    /var/www/html/models/BookingsAdd.php(1566): Call to a member function setQueryStringValue() on null

:cry::cry::cry:This afternoon I will upload to the testing server a backup of the current working (old) version of the project to see what will happen with it… :thinking:

Finally, after trying many things without success, I decided to rebuild the project from scratch because I suspect that something is wrong with the project file, as several menu text items are missing in the Multi-Language Property Editor and other minor inconsistencies I’ve seen when analyzing it.However, thank you guys for trying to help me.