SQL Server View synchronization issue and “Object reference not set to an instance of an object”

I am currently testing the migration of a project from PHPMaker 2025 to PHPMaker 2026.13.0, using SQL Server, and I have encountered what appears to be an issue with the synchronization/loading of a specific SQL Server View.

The View is called dbo.Ticket_Cerrados and works correctly in the PHPMaker 2025 project.

When I open a copy of the PHPMaker 2025 project for the first time with PHPMaker 2026, PHPMaker detects that the database has changed and displays:

Database changed – Do you want to keep old definition or update to new definition?

If I select Keep, Ticket_Cerrados remains in the project and PHPMaker 2026 shows its ID field as the Primary Key.

However, if I select Update, PHPMaker removes all fields from Ticket_Cerrados. The synchronization log shows:

#Ticket_Cerrados
#
DELETED : (Field) Ticket_Cerrados->AgenteAsignado
DELETED : (Field) Ticket_Cerrados->Date_Created
DELETED : (Field) Ticket_Cerrados->Date_Done
DELETED : (Field) Ticket_Cerrados->Departamento
DELETED : (Field) Ticket_Cerrados->Descripcion
DELETED : (Field) Ticket_Cerrados->Descripcion_Agente
DELETED : (Field) Ticket_Cerrados->FotoLogin
DELETED : (Field) Ticket_Cerrados->ID
DELETED : (Field) Ticket_Cerrados->Imagen
DELETED : (Field) Ticket_Cerrados->ImagenSize
DELETED : (Field) Ticket_Cerrados->ImagenType
DELETED : (Field) Ticket_Cerrados->Nombre
DELETED : (Field) Ticket_Cerrados->Prioridad
DELETED : (Field) Ticket_Cerrados->Status
DELETED : (Field) Ticket_Cerrados->Tipo_Incidente
DELETED : (Field) Ticket_Cerrados->Titulo
DELETED : (Field) Ticket_Cerrados->UsuarioID

The SQL Server View itself still exists in the database and works correctly.

To determine whether the problem was related to the old PHPMaker project metadata, I created a new View called dbo.Ticket_Cerrados_Prueba, using essentially the same SQL definition as Ticket_Cerrados.

PHPMaker correctly detected the new View during synchronization:

#Ticket_Cerrados_Prueba
#
ADDED : (VIEW) Ticket_Cerrados_Prueba

However, after enabling/selecting the new View in the PHPMaker project, PHPMaker displays the following error:

Object reference not set to an instance of an object.

After this error, attempting to open Ticket_Cerrados_Prueba causes the same error again, and PHPMaker may become unusable/close, requiring me to restart PHPMaker.

I also performed several tests to isolate the issue.

The View definition is not unusually large:

Ticket_Cerrados          LEN: 1127
Ticket_Cerrados_Prueba   LEN: 1093
Tickets_Abiertos         LEN: 1150

I also have another existing View called dbo.Tickets_Abiertos with a very similar structure. It also uses a RIGHT OUTER JOIN, its ID column is also reported by SQL Server as nullable, and PHPMaker 2026 loads and synchronizes this View successfully.

During synchronization, for example, PHPMaker reports:

#Tickets_Abiertos
#
CHANGED : (Field) Tickets_Abiertos->ID - AutoIncrement (False to True), Attribute (36 to 32)

Therefore, the issue does not appear to be caused simply by the RIGHT OUTER JOIN, the nullable ID, or the length of the View definition.

As an additional test, I created a very simple View:

CREATE VIEW dbo.Ticket_Cerrados_Test_Min
AS
SELECT
    dbo.Ticket.ID,
    dbo.Ticket.Titulo
FROM dbo.Ticket
WHERE dbo.Ticket.FKStatus = '3';

PHPMaker 2026 detects, enables and opens this minimal View correctly without any errors.

Therefore, the issue appears to occur when PHPMaker 2026 parses/loads the metadata of the complete Ticket_Cerrados View.

For reference, this is the original View definition:

CREATE VIEW dbo.Ticket_Cerrados
AS
SELECT
    dbo.Ticket.ID,
    dbo.Ticket.Titulo,
    dbo.Departamento.Nombre AS Departamento,
    dbo.Ticket.Descripcion,
    dbo.Status.Nombre AS Status,
    dbo.Prioridad.Nombre AS Prioridad,
    dbo.Ticket.Imagen,
    dbo.Ticket.ImagenType,
    dbo.Ticket.ImagenSize,
    dbo.Ticket.Date_Created,
    dbo.Ticket.Date_Done,
    dbo.Agente.Nombre AS AgenteAsignado,
    dbo.Ticket.Descripcion_Agente,
    dbo.Ticket.FKUser AS UsuarioID,
    dbo.Tipo_Incidente.Nombre AS Tipo_Incidente,
    dbo.Users.Nombre,
    dbo.Users.FotoLogin
FROM dbo.Ticket
RIGHT OUTER JOIN dbo.Users
    ON dbo.Ticket.FKUser = dbo.Users.ID
INNER JOIN dbo.Departamento
    ON dbo.Users.FKDepartamento = dbo.Departamento.ID
INNER JOIN dbo.Status
    ON dbo.Ticket.FKStatus = dbo.Status.ID
INNER JOIN dbo.Prioridad
    ON dbo.Ticket.FKPrioridad = dbo.Prioridad.ID
INNER JOIN dbo.Agente
    ON dbo.Ticket.FKAgente = dbo.Agente.ID
INNER JOIN dbo.Tipo_Incidente
    ON dbo.Ticket.FKIncidente = dbo.Tipo_Incidente.ID
WHERE dbo.Ticket.FKStatus = '3';

Environment:

  • PHPMaker 2026.13.0

  • Project migrated from PHPMaker 2025

  • Microsoft SQL Server

  • The problem is reproducible with a copy of the original PHPMaker 2025 project.

Could you please confirm whether this is a known issue in PHPMaker 2026, or if there is a specific part of this View definition that PHPMaker 2026 cannot currently parse?

I am particularly concerned because I have other, considerably larger PHPMaker 2025 projects that need to be migrated to PHPMaker 2026, and I would like to determine whether Views may be lost or become unusable during synchronization.

I can provide the project or additional database/View information if needed to reproduce the issue.

Thank you.

A post was merged into an existing topic: "Object reference not set to an instance of an object" when loading a SQL Server view into the project