-
Notifications
You must be signed in to change notification settings - Fork 130
Description
🐞 Issue Report: Channel Form Clears site_pages Data in EE 7.5
Affected Version:
ExpressionEngine 7.5
Severity:
High – Data Loss / Critical Functionality Broken
Summary:
When using {exp:channel:form} to edit an existing entry, the system unexpectedly clears the site_pages column in the exp_sites table. This field contains critical data for the Pages module (URL routing and page structure), and clearing it results in a complete loss of page routing information.
This behavior occurs even with minimal forms and does not appear to be caused by custom code or template logic.
Steps to Reproduce:
- Set up a channel linked to the Pages module.
- Create one or more pages using the control panel.
- Build a front-end editing form using
{exp:channel:form}. - Submit the form after making changes (even no-op edits like saving without changes).
- Check the
exp_sitestable — thesite_pagesfield has been emptied.
Example template:
{exp:channel:form channel="your_channel" entry_id="{segment_3}"}
<input type="text" name="title" value="{title}" />
<textarea name="body">{body}</textarea>
<input type="submit" value="Save" />
{/exp:channel:form}Expected Behavior:
Editing an entry via Channel Form should not alter the site_pages field unless explicitly triggered by a Pages-related action.
Actual Behavior:
After submitting the form, the site_pages column in the exp_sites table is cleared, causing all page routing and structure data to be lost.
Additional Information:
- No third-party add-ons were active during testing.
- System message logs did not show relevant errors or warnings.
- SQL query profiler confirms that an unexpected
UPDATEis made toexp_sites, settingsite_pages = ''.
Suggested Investigation:
- Review any hooks or routines triggered during
channel:formsubmission that may interact with the Pages module. - Investigate whether cache or routing rebuild logic is unintentionally resetting
site_pages. - Ensure that
site_pagesis not being overwritten unnecessarily during entry updates.
Let me know if you'd like this formatted as a GitHub issue template or need help attaching sample database output.