Skip to content

FE2 doesn't reload content when a contentLifecycle script updates the path configuration on save #8786

Description

@yacdaniel

CI Number

No response

Duplicates

  • I have searched the existing issues

Latest version

  • The issue is in the develop branch
  • The issue is in the latest released version
  • The issue is in an older release (specified in the ticket)

Describe the issue

When a content item is saved and a backend contentLifecycle script interceptor programmatically alters the content document's structural naming metadata (e.g., modifying the XML <internal-name> values or triggering an explicit file rewrite via lifecycleContent.write(path, doc)), the frontend editing form does not dynamically refresh all of its localized states.

POST/PUT Request to http://localhost:8080/studio/api/2/content/siteId returns amended: true for paths that modify theirs content using the contentLifecycle

Steps to reproduce

Steps:

  1. Configure a controller.groovy lifecycle script for a specific content type that reads the current document node tree, appends string criteria to an element (such as <internal-name>), and explicitly rewrites the path. For example:
import org.dom4j.Document

logger.info("QA-1.3: lifecycle triggered for path='${path}' operation='${contentLifecycleOperation}' user='${user}'")

Document doc = lifecycleContent.get(path).contentAsDocument()
def internalNameElem = doc.getRootElement().element('internal-name')

if (internalNameElem == null) {
    logger.error("QA-1.3: content type '${contentType}' has no <internal-name> element - pick a content type that has one")
    return
}

def before = internalNameElem.getText()
internalNameElem.setText("${before}-amended-${System.currentTimeMillis()}")
lifecycleContent.write(path, doc)

logger.info("QA-1.3: internal-name changed '${before}' -> '${internalNameElem.getText()}'")
  1. Edit an existing page item associated with the created content type controller.
  2. Modify a field in the FE2 and click Save
  3. Observe that Studio FE2 header automatically changes to show the appended -amended-{timestamp} suffix string but the Internal Name field in FE2 isn't updated.

Relevant log output

Screenshots and/or videos

2026-07-09.07-40-10.mp4

Metadata

Metadata

Assignees

Type

Projects

Status
Test and Validate

Relationships

None yet

Development

No branches or pull requests

Issue actions