
I’ve reviewed the issue you mentioned regarding the table modification in RadSystems, specifically the error that appears when you try to publish after adding and removing fields. Below, I’ll explain technically what’s happening and how to solve it.
Technical Explanation of RadSystems and the Error
RadSystems is a tool for rapid application generation, as you know. However, its code generation engine, particularly in PHP RAD Classic Laravel Engine, relies heavily on the components and structures of the tables in the database and the application model.
The error “Object reference not set to an instance of an object” indicates that the system is trying to access an object or component that no longer exists or hasn’t been correctly defined. In this case, it seems to be related to the table modifications you made (removing and adding fields).
Causes of the Issue:
References to Deleted Tables or Fields: The error can occur if you deleted a table or field that was being referenced by some view, component, or internal relationship. Even though it may no longer be visible in your application, RadSystems might still have an internal reference that hasn’t been properly updated.
Unused Component or Page: If, as you mentioned, you created a page that is no longer being used but you didn’t remove it from the project or its internal configuration, RadSystems might still try to render that page or component. This can be particularly problematic if that page contains internal tabs or card views based on tables you’ve already deleted.
How to Fix It:
Review Internal References: Check whether the deleted tables or fields are still being referenced by other components in the application. If you deleted a field, make sure it’s not linked to any views, relationships, or controls.
Verify Page Relationships: Even though the component or page is no longer in use, RadSystems might still try to generate its relationships. Make sure to completely remove any unused pages or update the relationships to point to existing tables.
Regenerate the Entire Project: Sometimes, even after removing pages or fields, RadSystems may still show errors until the project is fully regenerated. Be sure to regenerate all routes, views, and relationships to reflect the changes you’ve made.
Here’s what I did in my case: I created a page that I no longer used, but it contained multiple internal tabs (card-view) that referenced deleted tables. Even though the tables no longer existed, RadSystems was still looking for those relationships, which caused the error you mentioned. After I removed the references and regenerated the project, the error was resolved.
If you need more details on how to fix it in your specific case, feel free to reach out.