Title: Broken edit link in ca_entities relationship bundle creates empty entity_id URL
Environment
- CollectiveAccess Providence 2.0.12
- Installation through Docker
- Default theme
- Entity → Related entities bundle
- File: themes/default/views/bundles/ca_entities.php
- Bug/error: EntityEditor/Edit/entity_id/
- Solution: {entity_id} → {id}
Description
When adding a new entity relationship, the edit arrow icon can generate an invalid URL:
/backend/index.php/editor/entities/EntityEditor/Edit/entity_id/
The URL is missing the entity ID, resulting in:
Something went wrong
There was an uncaught fatal error.
Steps to reproduce
- Open an Entity record.
- Go to the "Related entities" relationship bundle.
- Remove the existing empty relationship row using the X button.
- Click "Add relationship".
- Select or create a related entity.
- Click the arrow icon to edit the related entity.
Expected behaviour
The arrow should open the related entity editor, for example:
/backend/index.php/editor/entities/EntityEditor/Edit/ScreenXX/entity_id/123
Actual behaviour
The generated link is:
/backend/index.php/editor/entities/EntityEditor/Edit/entity_id/
Cause found
The problem appears to be in:
themes/default/views/bundles/ca_entities.php
The template for new relationship items contained:
caEditorUrl($this->request, 'ca_entities', '{entity_id}')
but the template value available in this context is {id}.
Changing it to:
caEditorUrl($this->request, 'ca_entities', '{id}')
restores the correct URL generation.
This may affect other users because the failure is only triggered when creating a new relationship row.
Title: Broken edit link in ca_entities relationship bundle creates empty entity_id URL
Environment
Description
When adding a new entity relationship, the edit arrow icon can generate an invalid URL:
The URL is missing the entity ID, resulting in:
Steps to reproduce
Expected behaviour
The arrow should open the related entity editor, for example:
Actual behaviour
The generated link is:
Cause found
The problem appears to be in:
The template for new relationship items contained:
but the template value available in this context is
{id}.Changing it to:
restores the correct URL generation.
This may affect other users because the failure is only triggered when creating a new relationship row.