Skip to content

Properties Table in Partials w/ Static Pages Adds "Ghost entry" #1456

@nathanlesage

Description

@nathanlesage

Winter CMS Build

1.2

PHP Version

8.2

Database engine

MySQL/MariaDB

Plugins installed

Winter.Blog, Winter.Pages

Issue description

This is an issue I have had ever since I can remember (I think even in October CMS times). It was very rare, and I don't exactly know when it started, but whenever I work on a partial, every once in a while I would get an error on saving a partial saying "Please provide the property title":

Image

I quickly figured out that it had to do with a "ghost" entry being added to the "Snippet" tab table:

Image

Notice how the "code" is prepopulated with a zero, without me having clicked anything. Apparently, some event handler sometimes misfires and inserts an empty row. This can be easily mitigated by clicking somewhere in this empty row, and "deleting" it. However, it always does crash the workflow and inserts friction.

I have never reported it until now because it rarely occurred, and I didn't have to work too much on partials.

However, I am reporting it now because the issue suddenly started appearing almost always. Right now, I can barely edit a partial without having this issue, and it is getting annoying.


Some additional notes

  • I am reporting this here, not on the Winter Pages plugin repo, because it has increased in frequency a lot since the update from 1.2.9 to 1.2.10, maybe from 1.2.8 to 1.2.9 (I cannot fully pinpoint this, since the update to 1.2.9 and 1.2.10 followed very short upon each other.). In any case, there hasn't been a Pages update in between, so I believe the bug to be somewhere in the main backend code.
  • Also, I have found this old issue that had the reverse problem (not saving data, instead of inserting "ghost" data). The timing of this issue possibly hints to the fact that it might really have been the update from 1.2.9 to 1.2.10.
  • It could have to do with the saving-issues that some have been reporting in connection with the new Monaco editor. But that might be a spurious correlation.

Steps to replicate

  1. Have a partial and the Winter Pages plugin
  2. Open the partial. Note that, sometimes, there is a zero inserted.
  3. In that case, trying to save the partial throws an error.

Workaround

  • Click in the seemingly empty table row, and "Delete". Then, saving works again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions