Skip to content

Channel form #4899

@banditosway

Description

@banditosway

🐞 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:

  1. Set up a channel linked to the Pages module.
  2. Create one or more pages using the control panel.
  3. Build a front-end editing form using {exp:channel:form}.
  4. Submit the form after making changes (even no-op edits like saving without changes).
  5. Check the exp_sites table — the site_pages field 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 UPDATE is made to exp_sites, setting site_pages = ''.

Suggested Investigation:

  • Review any hooks or routines triggered during channel:form submission that may interact with the Pages module.
  • Investigate whether cache or routing rebuild logic is unintentionally resetting site_pages.
  • Ensure that site_pages is 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions