Hi Buddy,
Error is related to the CurrentObject parameter being missing.
What is happening here is that the page expects a CurrentObject in order to evaluate the XPath and load the data correctly. In your case the page is trying to run this XPath:
//TruckModule.TruckIncident[TruckModule.TruckIncident_Truck='[%CurrentObject%]']
This means the page needs a Truck object as the CurrentObject. That object is normally passed when the page is opened from another page or a microflow.
The typical flow usually looks like this: a Truck object exists, the page is opened with that Truck as a parameter, and then the page retrieves related records such as TruckIncident using that object.
The problem appears when you use the browser back button.
When you click the browser back button, the page is not opened again through Mendix navigation. Instead, the browser restores the previous screen from its history. Visually the page looks like it came back correctly, but internally the object that was originally passed as CurrentObject may no longer exist in the client state.
Because of that, when the widgets on the page try to load their data, Mendix tries to evaluate the XPath that depends on CurrentObject. Since the object is missing, the XPath cannot be resolved.
That is why you see the following behavior:
The data does not appear.
Some widgets fail to load.
Buttons stop working.
So the issue is not really that the back button removes the content. The real issue is that the page lost the object it depends on.
In Mendix applications it is usually better not to rely on the browser back button. Instead, using a Mendix back button or navigation action that opens the page again and passes the required object parameter will ensure the page always receives the CurrentObject it needs.
If this resolves your issue, please choose this answer as accepted so it can help others facing the same problem.
Hi,
The error you are seeing is not actually related to the Back button itself. The real issue is that when the page is opened again through the browser back navigation, the page expects a page parameter (CurrentObject) but that parameter is no longer available in the client state.
Your error message shows this clearly:
missing parameters: [CurrentObject]
and the XPath you are using depends on it:
/TruckModule.TruckIncident[TruckModule.TruckIncident_Truck='[%CurrentObject%]']
When you open the page normally through a microflow or page navigation, Mendix passes the CurrentObject parameter to the page. However, when the user presses the browser back button, the page is restored from the browser history and the original parameter context is not always reconstructed. Because of that, the XPath datasource cannot resolve [%CurrentObject%], and the page breaks.
The safe way to handle this is to avoid relying on page parameters when the page can be reached via browser navigation.
The usual solutions are:
Option 1 — Retrieve the object again using association
Instead of using:
[%CurrentObject%]
retrieve the object via association from a parent object that still exists on the page.
For example:
[TruckModule.TruckIncident_Truck = $Truck]
where $Truck is the actual page parameter.
Option 2 — Store the object in a helper object
Another common pattern is to store the selected object in a helper/session object and use that object as the datasource instead of relying on a page parameter.
Option 3 — Avoid browser back navigation
In many Mendix applications, developers disable browser back navigation and use a Mendix button instead:
Button → Close Page
or
Button → Show Page
This ensures the page always receives its required parameters.
Once the datasource fails due to the missing parameter, the page enters an inconsistent state in the client. That is why the widgets stop responding after pressing back.
The most robust fix is to change the datasource XPath so it depends on the page parameter object directly (e.g. $Truck) instead of [%CurrentObject%], or retrieve the object again in a microflow datasource.
That way the page will continue to work even if it is reloaded or opened through browser history.